TheHermit

LD27

Declaration of code libraries

Getting ready for LD this weekend! Since I do have some basic code I’d rather not use the 48 hours to rewrite, I’m posting it publically here as per the rules for personal code libraries. Basically these are a handful of UI classes I wrote on top of Quintus, along with my modified version of the Quintus library that includes a few fixes and tweaks.

Here’s the class library

Here’s the modified version of Quintus

Here goes: Rebound Recon

reboundreconI’ve decided, I’m going to be making a game called Rebound Recon. I was going to call it Rebound Rendezvous or Rebound Reconnaissance but I realized that it will never be spelled consistently, even by me.

The idea is that you’re piloting a sort of scouting drone, a remote-controlled balloon filled with air that can release air to change its direction. However, you must plot its course such that it completes each level in ten seconds, before the security forces manage to close in and capture the drone and the sensitive information it has extracted. The good news is you have powerful computers at your disposal that can exactly calculate what the trajectory of the balloon is going to be before you commit to it. I’ve got a basic idea of the components, the UI, and what needs to be done.

This will be the first time I’ve used JSON tile-based levels in an HTML5 game, so that will be interesting. Hopefully there won’t be too many nasty surprises.

 

First night progress report

rebound_shot1As I head to sleep on the first night, here’s a screenshot of my progress so far. The red line is the pre-computed trajectory of the little balloon thingy. The airlock is the target you’re trying to get to. The HUD displaying the timeline and where you’re using your fuel isn’t in place yet, but collision detection with the tiles and the trajectory computation stuff is roughly in place. I have a feeling I’m going to need to speed it up, but I can get a factor of 3x just by using fewer frames for the simulation and interpolating between them when I draw it all out.

I’m debating whether or not to cache the trajectories of every object, or just cache the player’s trajectory and figure out everything else on the fly. I probably should cache them, honestly – its not that much memory to record 300 frames of motion, and that makes play-back a breeze.

I pronounce this a game

rebound_shot2Much like the nervous moments in Kerbal Space Program when you’re making the transition from a long fall to a true orbit, Rebound Recon has reached the point at which I think it can be safely called ‘a game’ rather than a non-interactive trajectory plotter. You can now place points at which you expel some of your supply of air, changing your trajectory and the game checks to see if you get to your destination before the 10 seconds are up (even if it doesn’t actually do much yet when this happens). You can also click to play through your trajectory, jump to different points in time using the timeline, etc.

There’s still some UI confusion, part of me trying to design this so that all interactions take the form of a single click (but the plus side is it should play fine on mobile). For one thing, clicking to go somewhere on the timeline can overlap with clicking to remove one of your ‘burns’ – oops! I think I need to make some space for a special slider-bar that moves you along the timeline, or else I need to place the ‘remove node’ button somewhere else.

There’s a little over half of Ludum Dare left, and I haven’t touched music or polish aspects at all – this will end up biting me, I’m sure. I would like to have a few tiles just there to break up the monotony, a few animated tiles, and a pass to make the game ‘juicy’ – have things squash and deform when they collide with each other, that sort of thing, but the priority for now is getting the core gameplay in.

The list of things to do, roughly in order:

  • Go to the next level when you beat the current level
  • Slider-bar for the timeline
  • Implement all three of the buttons at the bottom, not just Go!
  • Put in translucent indicators of relevant events that occur along the trajectory (collisions with entities mostly)
  • Make a main menu with a How to Play screen
  • Code up the Button, the Airlock, the Spikes, etc. Decide if I really want Bouncers to collide with Buttons (its kind of cool, but then I have to do entity-entity collisions which would slow the trajectory calculation down)
  • Animations for jetting air, arriving at the exit, popping when you hit spikes, etc
  • Make 5 levels
  • Music
  • Make another 5 levels using more advanced concepts – fans, refuelling stations, etc

Rebound Recon finished and submitted!

rebound_shot4Rebound Recon is done and submitted with about an hour left on the clock. It took a bit longer than I’d hoped to make the levels look pretty rather than sparse, and I would have liked to do custom graphics for the three endings, but all in all I’m pretty satisfied with this. The game is playable on the web (no specific plugins needed, and tested in Chrome and Opera so far), and should also run on mobile browsers, though I’d recommend a decent screen size –  it will be really awkward on a tiny cellphone.

Now for dinner and to maybe play some games instead of coding them.

The submission page is: http://www.ludumdare.com/compo/ludum-dare-27/?action=preview&uid=25451