Thursday 4 December 2014

Platformer: Karate Orton

We're leaning strongly towards some sort of 2/2.5D platformer/beat 'em up for our Ludum Dare entry (pending theme), so in service of that I resolved to look into scripting a double jump mechanic that we could potentially plug into the game. The end result of this was Karate Orton.

There are three elements to this prototype:

1. Jump
A satisfying double jump didn't actually take long to put together. To produce the jump I simply apply upwards force to the player on a 'W' key press and control the number of times this can be done before returning to the floor with a variable called jumpLimit (set to two for the double jump).

2. Dash
In fact, the jump turned out to be so simple that I had time to apply the same concept to a 'dash' attack that applies force left or right depending on rotation. The colour of the texture changes when this dash is occurring and any enemies the player hits are destroyed.

3. Enemy type
I then started working on an enemy type that spawns at random points inside the camera's view. These enemies use the same jumping mechanics as the player, only the enemies jump every time they collide with something and also change direction based on their position on the X axis relative to the player.

This creates a kind of mindless swarm of enemies that will cluster and kill the player if they don't pick them off early.

====================

To play the prototype, click here.

Check out the files on github here.

No comments:

Post a Comment