Hopskitch

Along with the pathfinding (which I still haven’t got back to yet), there’s a thing with forced perspective platformers.

I think I can have some fun with this, as a technology, but there’s a few key bits I need to get sorted:

  • Tiles that look correctly perspectivised (that a word? is now!)
  • Lining them up programmatically (so I can generate the play area from code, not pre-built)
  • Accurate movement, without ruining the 3d effect (ie, instead of moving left right, you have to move on angles)
  • Collision detection. This is slightly tricky, because if a char is standing ON a tile, it’ll actually be overlapping it, but in a specific way.

So, some interesting math to get “just so” in order for it all to work. Gonna be a push to get it together in a single day, but so far so good.

My plan is (for this game) to just have a super small play area – only a handful of tiles. But moving, with jumping between them.

Oh, and of course, I then also have the long winded process of getting a decent looking character, static, moving and jumping in all four directions. Tedious.

So I figured out a cool way to a) store information about grid layouts and b) test them super fast. Basically, spin up a local web server, do a call to get the config (have to do it this way since Flash can’t easily access the local filesystem). That way I can test and retest new levels without having to restart the app – a major time saving. However, given that I only have a day, I have to put that to one side, and just work with something crude and simple – for now.

Right, basic tile movement is in. Now to get a jumping character. If I’m smart about this, I’ll swing the whole thing around to the right (ie, typical left-to-right movement), so then I can use any of the old school platformer right facing characters – they have heaps of available jumping animations. That should save me a bunch of time.

Eg, a typical character: facing L, R, U, D standing = 4 frames. Walking in each direction = another 4 * 2 or 3 frames (ie, from 8-12 frames in total). Now, there are some dupes there, but still, you’ve gotta wangle them all. Make a mistake on one frame and you may have to rebuild 3 full animation sequences. Add jumping in there (four directions, 3 frames per) and you’ve got another 12 frames. If you spend ten minutes per frame (quick, but possible), we’re talking 10 * (4 + 4*3 + 4*3) = 280 minutes = 4 and a half hours. For one character. In one outfit.

Now obviously, as you get better, you can speed this up – but not much. You’ve still got all the little details – and I’m only talking about key frames here. Even if you were tweening (getting the computer to draw the in between frames) you’d still need those key points – start and end of each movement. If there’s a faster way out there to get characters drawn, I’d LOVE to know about it, but right now, I’m stuck with the super slow way.

Ugh. Ok, so diagonal movement is fraught with subtle complications. Stopping the guy falling off. Moving from tile to tile (without getting stuck on a corner). Jumping – which direction? Identifying when we’re on a tile or not, etc etc. None of it is particularly complex, but there’s a LOT to consider. It’s not going to get done today – not if I have any chance of getting today’s actual game done. Lame.

play