Monday, September 28, 2009

transportational joy


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.


I have moving platforms!

This is still just a simple demo of new stuff. If you want something more involved, and haven't done it yet, go fight some thugs and upload your high score here.

Yeah, they're glorified collision lines that have velocity. I had to do a lot of fiddling to get everything working just right, but I'm happy with the final result.

I was going simply to have a platform helping you get across the pit, but that would be too boring, so I've given you a very simple puzzle - can you get to the other side? a brain teaser that should take you all of two minutes to figure out! Fun fun fun!

So, the nice things about what I've done in these last two posts is that there are multiple uses for each - the line that kills Dreg then resets him could also be used to avoid game-breaking bugs. If for dodgy collision code or dodgy level layout Dreg falls through the floor, I could have a sort of "safety net" that will put him back where he should be...

As for the moving platforms, they could also be things like floating objects, or cars, or whatever, to keep the level layout interesting.

So what's next? Well I still need to integrate moving platforms into the level editor, as well as design different kinds (those that move in loops, those that are only activated when Dreg jumps on them, etc.)

After that, here's my "to do" list:

- menu screens
- NPC interaction
- the HUD
- items
- cut scenes
- stitching zones together (as in, the whole game can be explored freely, but to avoid too many demands on the processor, the world will be split into zones that are loaded as the player enters them...)
- level design - how are events triggered? how are missions given and stored?
- potentially other acrobatics (monkey bars, ladders etc.) but I'm not sure I can be bothered with them

Once I've got all these engine elements together I'll be able to get down and busy with making the actual game - designing, animating and maybe doing some extra coding for enemies, designing levels etc.

The plan is to have the whole game done before Christmas. Excitement.

Sunday, September 27, 2009

Environmental hazard


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.


I'm back!

After a very relaxing week of teaching English to Spanish people and playing Xbox, I'm back on the Dreg project.

Quick note: this update is just to let you know how I'm getting on. If you actually want something interesting to do, go to the previous update and try to beat up all of the thugs.

I'm quite satisfied that one of my many fans is so good at my game that I can't beat his high score. It's a mixed feeling - getting beaten at your own game, but it's also vaguely satisfying.

That said, I also know some people haven't been able to get onto the rankings at all! I guess I can't expect the very, very casual player to want to play this game in its entirety, though maybe the first couple of missions should be easy enough for all.

Anyway, I've had enough of working on combat, and I'm starting to work further on level elements. On this particular update, you'll notice that the red line at the bottom of the level is bad, and you're not supposed to touch it.

Now I don't want this game to have cheap deaths. I see this more as a Zelda type game, where falling into an abyss doesn't kill you - it just resets you somewhere and takes some health away. So Dreg will do the same, but that meant programming a reset function.

So whenever Dreg is standing on safe ground, that position is recorded so that should he jump, or drop off a surface and land in some lava / poison gas / toxic waste etc. he'll be placed back in that position. Hopefully the threat of being boiled alive should add an incentive to the acrobatic sections of the game!

This meant I also had to play around with the camera movement (the nice little catch up movement the camera does when Dreg is reset) and some little tweaks like not having Dreg spawn right on the edge of the floor (so that if the player happens to be pressing a direction key as Dreg is reset he doesn't just go falling off the floor again) and the invulnerability flashing stuff.

Next step will be moving platforms! I foresee all sorts of potential headaches!

One thing I've noticed is that as I'm programming, the "right" way of doing something is obvious to me, but it feels like too much work trying to set it all up. So I'll try to hack my way to an easy solution, often resulting in hours of experimentation and wasted time. It's only the next day, when I've exhausted all lazy potential solutions, that I try what I always knew I should have done, and get it working within half an hour. I really need to learn that if I can't be arsed to program it correctly, I should stop programming...

Anyway, thanks for everybody giving me support on this project. Don't you fear - it's definitely going to get finished. I've already started doodling with pen and paper the details of level layout. It's great fun, as I'm sure you can imagine!

Sunday, September 20, 2009

Something to do! Finally!


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. A is punch and D is kick. Press A while running against an enemy to throw him. Click on the game to start interacting with it.

To avoid the thugs, your best friend is the roll - jump while crouching, and you'll avoid those nasty punches and kicks

See further below for a list of Dreg's fight moves


Wahey!

As I predicted, this new update is probably the most awesome you've had yet - you actually have something to do now! Yup - there are 10 thugs hanging around in the level, and your mission is to defeat them all. They have health now, and they die once you get them enough times.

But the extra fun thing that I've done is I've dusted off my php and MySQL skills to cobble together a little ranking page. Once you've defeated all 10 thugs, you get a score which is the sum of the seconds it took you, and the damage you received (both of which can be seen in the crappy little HUD at the top left). So the lower the score, the better.

Then you can write your name into the little textbox and upload your score to this horribly ugly page. Maybe when I'm bored one day I'll play around with CSS and stuff to make an attractive page that isn't the very, very bare minimum...

I know some people get personally offended by the use of Comic sans. But the thing is I'm kind of trying to recreate the aesthetic of the comic strip, so comic sans makes sense... sort of.

Now I'm pretty happy with the combat, but I want to hear from you - I've been playing it so much, that maybe it's actually far too difficult and I only find it easy because I'm used to it. Or maybe it's too easy. Or maybe you have some suggestions for new moves.

One thing I think would be a good idea is to give some indication of how much health a thug has left. The best system I've seen so far is, once again, from Oni. Each time you hit a character in that game, you have some attractive particle effects, and the colour of said effects depends on the character's health (green, to yellow, to orange and finally red). I feel like I've ripped Oni off enough for one game, so maybe you can come with some good suggestions. I'm not a big fan of the enemies health bar appearing in the corner like in... er... Street of Rage, is it? I find that I don't notice the health bar. The genius thing about Oni's system is that it's integrated into what I'm focusing on.

Now it's not like it's a big map or anything, but here's an image of the level editor, so you can see where the thugs are waiting for you:



So, just to remind you, here are all the moves again. Remember, you need to vary your moves or the thugs will start blocking you all the time. Also, the throw from behind (breaking his neck) does considerably more damage.

punch him in the face lots:
A + A + A

kick'im:D

upper-cut:
DOWN + A

get his ankles:
DOWN + D

dirty my trousers:
D while running

flying kick:
D while jumping

kick 'im onto 'is butt (more powerful kick with ever-so-slightly different animation):A + A + D
OR
DOWN + A + D (this one is fun - you fling him into the air then kick him off into the distance)

Sort of roll over backwards then then kick him in a sensitive place, thereby flinging him away:
A OR D while moving into him

No, look over there!
move into him and press A while he's facing away from you

slingshot! (my favourite):
Run towards him and press A just as you get to him

Double dragon rip-off:
DOWN, release DOWN and press D while rising.

Also, while trying to remember how to embed text again, I had a look in an old project of mine - a remake of pong. It's pretty simple and stupid, but it's quite fun if you can find another person to play it with. It was a fun little project that I did in two weeks (unlike this project which is taking months!)

So here, have a blast! Two games in one!

Thursday, September 17, 2009

Combatalicious!


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. A is punch and D is kick. Press A while running against an enemy to throw him. Click on the game to start interacting with it.

To avoid the thugs, your best friend is the roll - jump while crouching, and you'll avoid those nasty punches and kicks



Yes! I think I've done it!

So I've just gone ahead and added the one major missing ingredient - blocking. Blocking for Dreg was pretty easy to program - so long as you're not moving, or attacking, and their attack isn't one of the slow powerful ones, and you're facing the right direction, you'll automatically block the attack.

As for the thugs (let's call them 'Arry and Manphred), well, here's where I was really clever. Like, seriously clever. So clever I simply don't know how I could possible do my cleverness justice. Anybody reading this will think it's simply empty showing off, but no, seriously, this isn't anything like show-offy enough, believe me.

Anyway, the thing is that now the Thugs learn as they suffer - each time they get hit, they'll develop a certain resistance to that type of attack. So if you think you can just go ahead and spam the same move over and over again, you've go another thing (think? my brother insists the expression should be "you've got another think coming" which kinda makes sense) coming.

I like the little animation Dreg does when a throw gets blocked.

I'm going to go into further geeky detail, so look away ye laymen

< geektion >

Whenever a character does a fight move, at the moment of impact a collision object (which I, entirely unprofressional, have called "DeathBall") is created. Obviously DeathBall contains size and position information, but it also has a "type" variable (which is modified and check using bitwise operators).

There are six types - air (jump attacks), high, low, strong (the slow, powerful attacks), weak (fast attacks) and throw.

Accordingly, the thug has and array of six numbers - each number represents the Thugs resistance to an attack type. If the number is 100, he will always block, and if it is 0, he will certainly get hit. If the thug is attacking when he gets hit, this resistance is reduced somewhat.

Some attacks can be of more than one type - so the double-dragon spin kick thing is both "strong" and "air", and the little kick you do while crouching is both "low" and "weak". In this case, the Thugs resistance is the average of the resistance numbers he has for each type.

At all times, the total of all the resistance numbers is equal. I refer to this as the "resistance pool". In the case of the demo above, the thugs has a resistance pool of 200, so 1/3 of the 600 points available (six attack types).

Following me so far?

So when the thug is hit, we get some redistribution of points. 40 points will be removed from those resistance types that are not involved in the attack, and they are distributed among the resistance types that are. It makes sense, trust me.

In any case, the idea is that the player has to vary his or her attacks, hopefully making the game more challenging and fun!

</ geektion >

So yeah, enjoy!

Tuesday, September 15, 2009

AI refined


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. A is punch and D is kick. Press A while running against an enemy to throw him. Click on the game to start interacting with it.

To avoid the thugs, your best friend is the roll - jump while crouching, and you'll avoid those nasty punches and kicks



Ok, after the beating you probably got in the last update, let's hope it's a little easier now, eh?

Well, to be honest, they're still as blood-thirsty as ever. But I've made a few changes that I think are cool.

After they try to attack you, they'll pause for a short while - this is your window to get behind them and perform the neck breaking move (move into them from behind and hit A). This also gives you time to run away if you find yourself getting pummeled.

Also, they'll try to knock you out of the air if you jump over them, so if you jump onto the pole at the beginning, for example, you'll quickly be brought back down.

You may have noticed a multitude of bugs in the last update involving characters weirdly floating upwards at inopportune moments. I think that's all been dealt with now (God I hope so...).

Some fun things happen - if they're close together and you jump over them, chances are that in trying to get you, they'll end up getting each other. Hohohoho.

Oh, and notice all of the new moves they have!

Also, the fun spin-round-his-neck move (run towards him and press A just before you reach him) will also get the other guy if he's behind. If you do the normal throw (press A or D while moving into him) and you throw him into the other one, they both fall down. Yes! Fun fun fun!

Anyway, my next step is to get blocking in place. But for now, enjoy!

Sunday, September 13, 2009

Generic thug fights back! And he's brought a friend.


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. A is punch and D is kick. Press A while running against an enemy to throw him. Click on the game to start interacting with it


Hullo!

Last week I was rather lazy and neglected poor old Dreg, but these last three days have seen a flurry of programming activity, resulting in the rather hectic mess you see above this.

So as you may have noticed, the thug now has a mind of his own! Wheee! He'll no longer just passively take what you dish out - he'll punch back!

Ok, so this is still very early days. I was just getting started giving the thug some AI and having Dreg react to being hit, when I thought "let's see what happens when I add another bad guy". I enjoyed the result so much that I haven't done any more work since, hence my decision to update my blog!

There's still lots more to do:

- I want to give the thug several new moves, and the interaction between characters needs some more cleaning up. At the moment the two thugs can hit each other, which seems silly (but it does add to the fun, I think).

- I also want to give them the ability to block attacks, so that you can't just keep hitting the same buttons to defeat them.

- You can get hit while rolling or performing a throw, which I want to change.

- The pace is a little too fast. Maybe the thugs should stop when they're near you and sort of side step backwards and forwards... as it is, they feel a little bit too aggressive...

- I want thugs that you have thrown to knock down any other bad guys they hit.

In any case, I have to admit this isn't really worthy of a full update, but it's been so long I feel the need to let you know how things are coming along. Please point out any bugs you notice, of course...

Wednesday, September 2, 2009

Dreg is FIGHT!!!


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. A is punch and D is kick. Press A while running against an enemy to throw him. Click on the game to start interacting with it


Hello!

Oooh, I'm very excited about this update. I feel like Dreg has reached a satisfyingly fluid level of mindless violence that should keep people like myself entertained. There's still plenty of room for more moves, but I'm happy with what there is so far. So, with no further ado, here is the list of moves (I've used their technical names) and how best to pull them off:

(note: you need to get the timing right for some of these)

punch him in the face lots:
A + A + A

kick'im:
D

upper-cut:
DOWN + A

get his ankles:
DOWN + D

dirty my trousers:
D while running

flying kick:
D while jumping

kick 'im onto 'is butt (more powerful kick with ever-so-slightly different animation):
A + A + D
OR
DOWN + A + D (this one is fun - you fling him into the air then kick him off into the distance)

Sort of roll over backwards then then kick him in a sensitive place, thereby flinging him away:
A OR D while moving into him

No, look over there!
move into him and press A while he's facing away from you

slingshot! (my favourite):
Run towards him and press A just as you get to him

Double dragon rip-off:
DOWN, release DOWN and press D while rising.

Any of you who have played Oni will see that I've ripped off about three moves from the game... but they're so good, and besides, I said in my previous post that Oni's fighting system is my model for this... I don't expect to reach Oni's depth and fluidity, but don't forget, this game isn't just about the fighting.

People have been moaning about the fact that there isn't enough in the demo for them to do. But it's a demo guys!

Lots of thanks to all the people who have pointed out bugs or things that could be better - I hate to think what this game would be like now if it weren't for this blog. So keep up the good work!

Hopefully the next update should challenge you a little more - I'm going to start working on the AI.

Now this is going to be quite some work, because I now have to animate the other end of the conflict - so the thug's moves, and Dreg's reactions. It might be even longer before the next update. And I know, this one was a while in the making...

The thing is, I had a bit of cleaning up to do. As I mentioned in a previous post, the Character class was getting out of control, and it was horrible to edit. So I've separated it out into different classes, each with its little theme. That's made it much easier to work with.

I also found (as always) a few glitches with the collision detection, and I'm sure there are more to help me in my mission to go completely gray.

Anyway, hope you like the new moves, and expect a bit of a fight in the next update...