Showing posts with label level design. Show all posts
Showing posts with label level design. Show all posts

Saturday, November 14, 2009

Collision revisited... again... please may it be for the last time!


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump. Try to make the collision detection fail!

If you want to check out the combat go here



Today's been a good day. I like it when I figure out solutions to long standing problems. Do you remember a while ago when I did a whole update about the bugs I'd fixed? Well this is more of the same, really.

I'm sure you've all noticed that I've always had floors sort of overshoot the walls they're over. This was due to several reasons, all of which would have Dreg happily drop through a floor/wall into oblivion. This is not good for gameplay.

I'd resigned myself to the fact that I would I'd have to make the floor extend beyond the wall whenever designing levels.

But then I noticed some other problems. If Dreg jumps just high enough to be above the wall, but not quite high enough to land on the floor above, this happens:


oh noooooooooooooo!


Yeah, that sucks. You can try to do it on the previous post - it's not so difficult once you realise it's there.

Also, You can very easily fall through the geometry of the little podium at the end. As I said before, I'd simply decided that this would be a limitation of the game engine, so I couldn't have that kind of geometry.


Dreg and the podium are one


But today, as I said, was a good day. My brain was working even better than usual, and I though up a solution. Well, specifically it was to solve the problem presented in the first picture, but the solution was so simple and effective, I realised I could extend it to everything, and it would even work for the podium!

Then I did more stuff to deal with all the little problems I knew existed. Somehow the programming muse was on my side today, and I sorted them out. What a good day it's been!

This is a much bigger deal than you might think. I means I've suddenly liberated myself from constraints while designing my levels. I can have the geometry all over the place and not have to worry about the issues from before. It's amaaaaazing. Did I mention this is a good day?

So I quickly cooked up the level you see above, and it shows all the sorts of things that couldn't be done before, but now can. You'll see there's still some overlap at the corners, but this is done automatically - in the level editor I just have the lines meet each other (of course, don't forget that in the final game you won't be seeing any of these lines - just beautiful, beautiful backgrounds, yeah?).

Play around with it - I'm pretty sure the collision detection doesn't fail, though obviously if it does for you, pleeeeaaaaase tell me!

Thursday, October 22, 2009

Time to flex those platforming muscles


Arrow keys for movement and crouching, spacebar to jump. Use arrow keys while swinging to increase his spin. Hold down spacebar to make the jump last longer. Hit spacebar again when holding on to a wall to wall jump.


This post is mostly focused on acrobatics. If you want to see what combat will be like in this game go to this post!

Look - a new place to run around in! Try to find the little podium - there's more than one way to get there (the more difficult the path, the faster it is).

But what's the point?

Well the thing is I've been thinking about how the game is going to be set up, and it dawned on me that I had a whoooole lot of level designing in front of me, so I wanted to work on my "level editor" to make it quicker and easier to use. I found lots of nice little tricks and techniques, as well as programming a lot of stuff that would automate the boring bits.

There are still a few issues - it's annoying that I have to have floors overshoot walls, instead of having nice, clean corners. This is a collision detection problem (as always), though I've already started working on a solution for that.

In any case, I thought I'd give you something to do as well as try out my new level building tools by making this little area (I say little, but it's the biggest I've made so far).

It was a useful experience because it showed up several bugs that I had to sort out (more collision detection fun!). The nice thing is that my collision detection engine is getting better and better, all without having too big of an effect on the frame rate (animation and big images are still the big processor hoggers). Increasingly I feel completely free in how I design my levels - just that corner thing that still needs to be sorted out...

In any case, please, feel free to try to break the game! Find walls that let you drift through, areas that are too difficult/easy/stupid. Any ideas you think could improve level design etc. As always, your feedback is really, really useful to me!

So what's next?

Well I want to start making the game elements that make up a real level - a sense of progress. This means NPCs, items, switches and all of that nonsense. This also means developing a talking mechanic to have Dreg interact with other characters. I imagine the next update will be just that...