Home > Gruedorf > It’s a platformer!

It’s a platformer!

November 28th, 2008

After finishing Order of Ecclesia (small aside: utterly awesome game), I felt sufficiently inspired to finally start coding the platformer I’d been working on ideas for. A couple days ago I started writing the actual meat of the platforming mechanics and fiddling around with things like animation and collision detection, to start moving towards having an actual game!

After a couple days of work, so far I’ve got:

  • Basic player character animation (running, jumping, falling, etc) using a (stolen) sprite from Castlevania: Dawn of Sorrow.
  • Moving platforms (though vertical motion is a little busted)
  • Running up/down slopes
  • Falling when running off a ledge
  • Jumping

I even allowed myself to get distracted by shiny things, and got it to run smoothly on my XBox 360.

So far the most interesting bit has been figuring out how to properly implement moving platforms in a game like this without a bunch of hacks. Getting the details just right for things like falling off a platform, being pushed by a platform, and so on is actually quite difficult - there are lots of edge cases where the simplest possible solution just doesn’t work. Once I figure it out I’m planning to try and explain the details of my solution, since people rarely talk about this problem when building platformers.

Getting slopes working was also a bit of a challenge - so far I’m using a bit of a hack where, if the player’s next location is obstructed, I iteratively check to see if the location slightly above it is unobstructed, a fraction of a pixel at a time. This allows the player to run straight at a sloped surface and have his character automatically climb the slope, without too much hassle. Going down slopes wasn’t quite as hard, since the falling physics automatically took over there.

The next few items on my milestone list:

  • Textured level geometry
  • Viewport scrolling
  • Loading level geometry from a file

Stay tuned! Hopefully the threat of being shamed by my gruedorfian brethren will keep me focused!

Gruedorf , , , ,

  1. No comments yet.
  1. No trackbacks yet.