jpverkamp

LD26

VTanks – A six hour jam entry and excuse to learn Flash/Haxe

Long story short, I didn’t have time over the weekend to enter the main competition, so the Jam it is (although I’m 95% sure I still followed all of the competition rules other than the deadline). Overall, I had three goals:

  • Make a game
  • It has to be web-based, so I have to figure out either Flash or JavaScript
  • Actually enter it (I missed the last two Ludum Dares as well)

The end result isn’t great. Full stop. Basically, it’s a vector graphics (that’s the minimal part) tank game, a la Scorched Earth. But it is playable / winnable and I learned a lot, so I’ll count that as a win.

VTanks

I ended up starting around 1 am and finished about half an hour ago at 7am. I don’t have a title screen or anything in the way of sounds/music and I’m not expecting to do particular well in the rankings at all, but that’s really all of the time I can put into it. And technically, it does meet my goals. :)

And hey. I learned how to use Haxe. I’ve been meaning to do that for years. Perhaps now I can get out a few of those other ideas I’ve had.

Here are some the relevant links:

And last but not least:

Play VTanks

 

LD30

Sandbox Battle!

And we’re off!

Taking about an hour at the start of the compo to both work out and think, I ended up basically going in two directions:

  • falling sand style game, only with discrete ‘bubbles’ with different particles / physics
  • puzzle platformer based around portals that split you into two realities you play at the same time

Of the two, the second has the advantages of 1) actually sounding like a game (that’s always been my problem with falling sand style simulations) and 2) being much easier to code. I’ve worked on falling sand style games before (Sandbox) and they take a lot of tuning to get reasonable performance. Certainly worth doing… but not the best idea for a 48 hour time window.

So of course I’m going with option A. :)

About 6 hours in, and so far this is what I have:

screenshot

You can click and drag the blocks around and the sand will from from box to box. At first, I was trying to figure out goals where you could–for example–use water in one box to put out fire in another. But right at the end, I had an even better idea (hopefully not just the long day talking): SANDBOX BATTLE! Basically, some sort of multiplayer / AI madness, where you are trying to steal the other box’s sand before they can steal yours… I’m going to have to think about that…

Anyways, if you’d like to see a bit more (some of the cooler bits of the code, along with a functioning prototype), head over to my blog: Ludum Dare 30: Sandbox Battle! @ jverkamp.com

Hints of a game

Hey, it’s actually starting to feel playable:

screenshot

There’s still no way to actually calculate a winner, but you can move each of the boxes (worlds O:)) individually for a minute, up until the timer runs out. Now I’ve got about six hours to finish off making it actually gamelike and I can spend the next 24 hours on polish.

If you’d like to read a bit more about the technical details, I have a much longer post on my blog: Ludum Dare 30: Hints of a Game @ jverkamp.com.

There’s also a demo. That’s the best part about JavaScript, easy demos! Check it out.

Ludum Dare 30: Hints of a game

24 hours in… we have a game!

24 hours in, and we’ve actually turned it into a game. Using some nice HTML tricks to layer everything correctly, we now have an options screen:

options

It’ll fade in and out as you want. When you actually start playing, all of the instructions fade out:

in-game-2

I actually had to spend a few hours re-factoring here too, unfortunately. Originally, I had everything as ‘threaded’ as JavaScript can get, with setTimeout chains for each tile, along with for controls. Unfortunately, I was getting a bit of an issue with synchronization, so I had to make it single threaded. Amusingly, that’s a bit harder in JavaScript, but it worked out for the best.

And then at the end, I spent a few hours making the scoring look nice. You can’t see it here, but there’s a nice animation running from the bottom to the top of each player counting up the total types of sand. At the moment, the overall most sand wins, but I’m probably going to play with that.

scoring-in-progress

And that’s it. It’s going pretty well.

For a full demo and the rest of the write up (along with a fully playable demo!), check out the full length post on my blog: Ludum Dare 30: 24 hours @ jverkamp.com.

Sandbox Battle!

Entry ] [ Web ] [ Source code ]

Note: Runs best in Chrome.

Instructions

  • You have 60 seconds to collect as much sand as you can
  • Each player’s sand falls to the bottom of their tile
  • Colliding with other players will steal their sand
  • Choose options for keyboard controls and to enable multiplayer

Comments

  • Libraries used: jQueryBoostrap
  • Graphics generated in Photoshop CS6