Friday, December 18, 2009

Just when you thought all hope was lost...


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 for punch and D for kick. ENTER to interact with buttons and things. S to use objects.


I'm back!

Yes, I know, it's been a month. The blog hasn't been progressing, but the game certainly has!

The thing is the game has got to a point where I have lots and lots and lots of little things to do, and the sheer number is pretty intimidating. The problem was that if I were to do a new blog post for each advance (and therefore have to design a level demonstrating these things) it would take forever!

So instead I just rushed through lots of things I wanted to do, making sure they worked, then made a level that demonstrates all of these things. I won't tell you what those new elements are - I'll let the level do the talking (in fact, a lot of the new additions allow me to explain these things in-game!).

I'm very excited about how things are going, though obviously my self-imposed Christmas deadline was wildly ambitious. Anyway, it's very late, and I'm tired, so it's time to go to bed.

Enjoy!

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, November 12, 2009

Speaking fun!


Walk up to Pendy and press ENTER to have a conversation with him.

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. Press L then use the arrow keys to look around, and press M to bring up the map (- and + zoom)

If you want to check out the combat go here



Right, time for me to start having lots of fun giving Dreg people to interact with!

So a warm welcome please for my new class: the NPC!

At the moment, the NPC doesn't actually do anything, apart from speak to you, which is pretty bloody cool in my opinion. I've made it so that their heads appear in the right place and everything! Press enter when you're near Pendy (a character from the comic strip) to see what I'm talking about.

The thing I'm happiest about is how I've integrated this into the ever-growing chaos that is my level editor. The thing is, I want to keep the mechanics of level design as simple as possible so that I can get on with the fun of inventing puzzles and whatnot.

I've also worked a lot on the underlying architecture for the HUD to work (which is my warped mind include speech boxes). I'll be adding to it as I see fit, because it's my game which makes me the boss.

Later these NPCs will animate, walk around (perhaps) and generally be very cool. I wanted to get the conversations down so I knew that was sorted, and later I'll have to integrate them into mission progress and stuff... oh so much work ahead of me! The Christmas deadline is looking ever more ludicrous, I have to admit. It doesn't help that I've clearly slowed down recently. But never fear - I will not give up! This bloody game will be made!

Oh and I've made him stripey. Isn't it cool?

Be sure to tell me what you think!

Thursday, November 5, 2009

I'm back!


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. Press L then use the arrow keys to look around, and press M to bring up the map (- and + zoom)

If you want to check out the combat go here


Hello!

Ok, so it's been a while. I think I was working myself up over my self-imposed Christmas deadline, and I needed a Dreg holiday. I know that makes my Christmas deadline somewhat less realistic, but let's face it, as well as world fame and massive amounts of money, I'm making this game to have fun, and there's no point in getting stressed, yeah?

Anyway, the hiatus has given me lots of energy to delve right in. I think one of the main reasons that I needed a break was that I'd found a whole bunch of small bugs and issues that needed resolving, and I didn't have the heart to face them. After a week and a half of doing bugger all I was able to sort most of them out (a couple of big bloopers are still lurking around though).

As for actual real changes that are of interest to you, I decided to focus on navigation. With a such potentially confusing level design, full of tricky little platforms and such, I needed to give the player the ability to check out his or her surroundings, so I've added two things: the ability to look around, and a map.

To look around, press L, then use the arrow keys to look around. For the map press M and press - or + to zoom in and out.

I had to think for a while about what form the map should take - I want it to show information, but only for those places the player has visited. But you can see the dark red shape that indicates the general shape of the level. But I didn't want to show secret paths, so they're not included in the silhouette of the map (but if you use them, they'll show up on the map).

I also wanted some way to indicate the gravity in a certain part of the level. I've gone for a gradient, but I'm not sure if that's clear enough. Maybe I should just physically stick some arrows in there!

I also couldn't decide whether the player should still be able to move while looking at the map, or if the game should be paused. I've gone for the former - what do you guys think?

The reason why the map isn't centred is that the right hand side will contain information and instructions - I want to make it so that important buildings and objectives will appear on the map, and the player can add markers on the map. Maybe that'll be my next update!

In any case, as always, feel free to point out all the bugs/issues you come across!

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...

Sunday, October 18, 2009

Now, now boys


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. Press refresh to have it all start again!


This is a bit of a silly update, but I find it incredibly fun, as no doubt you will too!

I'm working on techniques for saving my input, so as to be able to quickly and easily create cut-scenes within the game (or have NPCs perform actions for demonstration / race purposes). I need to make something that isn't too processor expensive, but reliably reproduces the actions I tell it to. I think I have it, though they may still be some bugs around.

To test it, I had lots of different versions of Dreg running around, falling into pits, getting squished etc. for a relatively long time to see if he'd end up where he was supposed to (in this case, the secret room - though one sort of falls off by being an idiot). The final result was so wonderful I had to share it with you all!

I admit this is a silly post, and there still isn't anything incredibly exciting for you to do, but I find the sight of all those little Dregs gleefully bouncing around to be hilarious. Don't you?

Thursday, October 15, 2009

Suited and Booted


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 and D to attack.

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



Urgh, today was a lot of work...

I did to Dreg what I'd done to the thugs, and it was generally a rather horrible experience. As I mentioned in the previous post I had to do a few changes to the Thug MovieClip for the variety of clothing to work, and this had to be done for each bit of animation. I spent a good five hours today just converting graphic symbols into MovieClips. It was horrible.

But after I'd done all that, I was able to give Dreg a suit! I think he looks dapper, don't you? With his cheesy big collar and his cheesy white socks...

Also, after all the fine tuning I'd done with collision detection regarding moving objects, I'd screwed things up in other areas and had to fix them today. I also added a very simplistic preloader (I had to read my own tutorial to remember how!). It was all rather difficult work. So I decided to cheer myself up by doing this:


I think it's hilarious. I might use as a billboard within the game. Disarea is the name of the world, by the way.

Anyway, I feel that things are shaping up!

Once again, for newbies, here are the fighting moves:

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.

Wednesday, October 14, 2009

Variety is the spice of 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 and D to attack.

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



Wahey!

Well, for those of you who come regularly, I'm afraid there's nothing new gameplay wise for you to enjoy. I've been working on an essentially aesthetic thing... the thugs are all different now!

I've taken advantage of the ability to play around with movie clips to give each thug his own look. It's all rather simple, really, but the problem was that I had set up the characters awkwardly, and I spent a lot of my time going through the thug movieclip and fixing it (namely, replacing graphic symbols with MovieClips). It was slow, dull and annoying. Now I have to do it with Dreg too, argh!

But at least what this means is that in the future I can make a character, then whenever an instance of that character is created he'll be a little different to the other instances, making the game feel that tiny bit more varied and organic.

I've also made them slightly different sizes, to add to the fun!

It also means that as the player buys new items for Dreg, they can alter his appearance, making everything very cool.

This is also an opportunity for you to immortalize yourself on the rankings page. For those of you who are new to this, these are the fighting moves:

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.

Wednesday, October 7, 2009

Tweakage galore!


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.

If you haven't already tried it and want to know what the combat is like, go to this post.



"Hey Awoogamuffin!" I hear you cry, "What's the big deal? You haven't changed anything! You're so boring and unsexy!"

Well, I won't lower myself to your frankly insulting level, but I'll happily dignify your uncalled-for comment with an explanation.

And anyway, I still haven't received any proof that any of you have found the secret room. There's nothing in the room. But it's secret. Go find it.

Though it may not seem that anything has changed, the collision detection has undergone a revamp. The version in the previous post was plagued with lots of bugs - Dreg often would get stuck to walls, and worst of all, in several places he could actually drift right through them!

Here are a couple of examples:


This one is relatively easy to replicate - if you jump as if you're going to grab the ledge of the bottom cube just as the top one is moving towards you, this happens. It's horrible.



This one is more difficult to replicate - you have to jump just as the block is coming down on you and it'll push you through the floor. The line underneath was to "catch" this happening, and though it works (more or less) it annoyed me that it was necessary


There were also plenty of plenty of places where Dreg would get "squished" for no apparent reason, other places where he would fall through the geometry and the whole thing was generally plagued with nonsense. But now it's all fixed! I'll go into a longer explanation later in the geek section...

I've also made a few visual changes - giving the platforms a foreground element so that Dreg can get hidden behind rails or walls that are facing away from the camera. It looks a lot better when Dreg gets squished now because he's half-obscured by the right-hand block.

I also made it so that it doesn't look stupid if you roll off an edge (down + jump to roll).

So now the geekiness!

< geekment >

So yeah, I realised what was happening with the first bug picture I showed was that when the collision detection saw that dreg was in position to grab the ledge, the game would simply teleport Dreg straight to the ledge. This would sometimes teleport him right through a wall!

Now even though I knew that to keep collision detection functional you should never directly modify the x and y values, I had been doing that regardless because I'm lazy and a little stupid. Anyway, I wrote a function that would perform a new collision detection test before placing Dreg on the ledge (I had to do clever things to avoid the wall underneath the ledge counting), and it worked!

This was when I thought I should comb through the whole game and make sure that the x and y values are only ever directly changed once all the collision detection has been completed, which meant performing additional checks whenever Dreg ran into a wall, landed on the floor or hit a ceiling. Now Dreg never gets teleported anywhere unless I want him to!

I also completely re-wrote the stuff that handled Dreg's interaction with moving floors and walls to avoid the stickiness I mentioned earlier.

In any case, the lesson learned is that with collision detection, you can't cut corners - every time you want to move a character, check whether there's nothing blocking him first. Tralaaaa!

</ geekment >

Monday, October 5, 2009

It's squishtastic!


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.


Yay! More stuff!

Well I've considerably worked on the whole moving platforms thing, the best bit being the implementation of squish mechanics (that's the technical term) so that Dreg can be crushed and squeezed to your delight. It also allows for some fun pseudo-puzzle acrobatics which test your block negotiation skills (also a technical term).

It's still a little buggy in places - sometimes Dreg grabs onto a ledge when he shouldn't, and there's the occasional odd sticking to walls. I've uploaded it anyway because I need more attention!

I'm certain there are plenty more bugs. That's where you, my play-testing monkeys, come in - I want to hear all of the weird bugs and quirks you find, and I'll do my best to fix them!

This has got me really excited about the possibilities for level design. This little demo is only scratching the surface - I can make the moving lines be at any angle, and travel along a path of my choosing (I've even half-coded something that would allow me to use the paths within Flash to create paths for my platforms).

The nice thing about this being a science-fiction world, and a 2D computer game, is that I can get away with crazy level design, involving huge moving parts and whatnot (I'm toying with the idea of a giant robot, trapped and spanning across various gravity zones and feeling generally unhappy with the world).

So can you navigate Dreg through the fun? There's also a little "secret" room (not much of a secret now that you know about it) of which I hope the game will have plenty!

Tell me what you think!

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...

Sunday, August 23, 2009

And a big round of applause for generic thug!


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


Wahey! An update! Life has meaning after all!

Despite having just discovered the Xbox live marketplace and bought Banjo Kazooie (one of the best games ever), Castle crashers (waiting for my brother to come back to play it with), Splosion man (brilliant game, hooked on it right now) and Battlefield 1943 (played a bit, got killed a lot), I've found the time to get on with the project.

The thing you've probably already noticed is that the yellow rectangle is no longer a yellow rectangle, but a rather effete looking young man.


Charmed, I'm sure


He can also take a beating, always turning the other cheek, mainly because I haven't programmed him to do anything else yet! Also, you can't just run through him anymore.

I've also been playing with the fighting system. Hopefully you'll find Dreg's moves string together more fluidly now. I've also added a little jump he can do while crouching. This'll be useful for evading blows or quickly getting to the other side of the guy.

The other big thing, programming wise and visually, is the throwing. To throw the thug, you have to be running against him, and then press A. It was pretty tough getting it so that it'd work. Obviously all the collision detection and gravity shifting had to continue while Dreg was throwing people, and it caused several headaches. But I'm mostly happy with it so far.

There's still more to do before I think about the Thug's AI:

- Extend Dreg's list of moves, including a few longer combos.

- Have different throws depending on whether Dreg is in front, or behind the enemy (the throw from behind will be much more deadly).

- Have the thug fall back when you trip him over, or do an uppercut

- I want the way the thug lands after being thrown to depend on the angle he's at when he hits the ground (basically, I want an amusing animation with him falling on his head. hohoho.)

Then the AI! That'll be exciting, won't it?

Monday, August 17, 2009

Kill the yellow rectangle! Kill it!!!


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. Click on the game to start interacting with it


Hello!

Long time no see. The thing is, as with many other people, it seems I can only work properly on my personal projects when I don't have enough time. As soon as I get a weekend, or a holiday, which I've been anticipating as a wonderful opportunity to get on with it, I find myself suddenly afflicted with accute laziness. It's the stolen hours between obligations that have the highest yield.

Anyway, all that to justify the apparent lack of progress, but don't you worry, I've been keeping the project on a simmer, and I thought I'd share what I've done so far.

As I said in my previous post, I wanted to get on with the fighting system. I knew this would be a lot of work, but I still didn't realise quite how much. Several little niggling problems turned up, of which more in the geek section later.

Anyway, as you can see, Dreg can now punch and kick. So far I've done a three punch combo, a single kick, a flying kick (which fighting purists among my friends say simply does not exist in real martial arts, but this is a computer game!), uppercut and a low kick. I plan to add several more in the future, with all sorts of silly combos. I'm quite happy with the way I've set the combat up, because it makes adding moves, and combos, very easy. Now I "just" need to animate them.

Also, seeing as I wanted low attacks, I had to make Dreg crouch. That meant I also had to animate, and program, him crawling. All this silly work!

Anyway, for now, all you have to practise on is a yellow rectangle. But it's there to show that it reacts to your hits, so I have the collision detection sorted. It also reacts correctly with the world collision lines, and gravity rifts, of course.

Don't worry, there's still more for me to do. This is the plan:

- More moves! Especially fun little combos. Also, it'd be nice to have a different jump kick depending on whether Dreg is moving sideways or not...

- The big one: Throws. This means intricate character interaction which I need to have work so that it looks like the character is being held by Dreg, but that also the character continues to perform collision detection on the scenery. I have a few ideas how to do this, but I'm worried about it.

- Maybe I could try improving on the enemy character design. Not that I have anything against yellow rectangles...

- after all that, I have to go through the same process for the enemy as for Dreg - animating movement and fight moves.

- The HUGE one: programming enemy AI. urrrrgghh! Only second to collision detection in the head-ache department.

Time for the nitty gritty:

< geekology >

First, for those who care, some silly statistics!

So far in the game, I've got 24 classes, though some of those inherit from others, and aren't particularly complicated.

The biggest class, Character, is currently at 961 lines, though that's including blank lines, braces and comments. It has 26 functions, excluding getters and setters (some of which are quite complicated) and it inherits from another class (MovingObject) which handles things like gravity shifts and whatnot. It's a bit of a mess.

So far, Dreg has 428 frames of animation, which is to say about 17 seconds, seeing as the game runs at 25 fps.

I have 65 symbols in the library (including various parts of Dreg, and level decoration).

The compiled .swf file is 116 KB big. I should write a preloader soon...

As for the work I've done so far, I had a couple of issues here when it came to gravity rifts. In a previous post, I mentioned that as Dreg passes through a rift, he is simply added to the new gravity zone sprite. The problem with this approach, now that I have multiple characters (yes, the yellow rectangle is a character) was that depending on the relative positions of each gravity zone within the level display list, and depending on when characters entered each gravity zone, Dreg would sometimes end up behind, and sometimes in front of the other character. My solution was to have each character placed in his or her own container sprite, which was added to the level in the order of my choosing, and when a character entered a new gravity zone, the container sprite's coordinates would be set to those of the new zone. That made so much sense I feel all nice and warm inside.

I also had to sort out a system to allow punches and kicks to register through a gravity rift...

I'm increasingly starting to embrace what I used to consider bad practice - that is to say, coding within a MovieClip's timeline. But that's exactly what I'm doing with all the fighting animation - the variable which defines the next move in a combo, as well as the function which does a collision test when Dreg punches, are all done within the timeline. I think it makes sense, seeing as these actions are all dependent on Dreg's current frame (it only checks for collision at the frame that Dreg's arm reaches out the furthest, for example...). It might come back to bite me in the bum when I get confused about where a certain variable is being set, but I'm hoping it'll all be fine!

</ geekology >

Anyway, hopefully the next installment should be more graphically pleasing...

Wednesday, August 5, 2009

Garish jodericity


Arrow keys for movement, 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. Click on the game to start interacting with it


Yup, I've done it. It's jodersome.

You all thought I was slacking off, didn't you? You thought I was just playing loads of GTA4 and looking at internet porn. Though I did do some of those things, I actually spent a lot of my time slaving away, finding out just how awfully orange and purple clash.

So now we have a background! The level is just the same. I fixed a few ongoing bugs: the swinging is broken in my previous post for some reason, and as always, collision detection issues, of which I am sure there are many more. It's just the beginning - I want to add plenty more details, such as cracks in the walls, hanging washing, benches etc. I'm hoping these details should help indicate which way the gravity is going each time. And look cool.

Here's how the foremost part of the background looks:



Watch out, time to geekify! Though I'm talking about geeky things, I'm also trying to use something approaching layman's language. If you feel brave enough, you can try to follow. It really isn't all that difficult and I've provided lots of useful links (wikipedia).

< geekicity >

As everybody and their mum knows, flash graphics (as in, the ones you create within flash) are vector based. Flash is also happy to deal with bitmaps. Now I know you all know the relative advantages and disadvantages of vector graphics and bitmaps, but here's a reminder...

Vector graphics:

advantages: they take up very little memory, seeing as they only consist of a series of instructions on how to draw something (curves and points etc.). You could make a vector graphic that's more memory intensive than a bitmap, but that would be dumb. Also, vector graphics have no resolution, you can scale them up all you want and they're still crisp.

disadvantages: Seeing as vector graphics are being redrawn every frame (hence their crispness), this does demand a hell of a lot from the processor. Slower computers would not be able to cope with large, complex vector graphics moving and rotating all over the place.

Bitmap:

er... pretty much the opposite of vector graphics - they take up a lot of memory, but they're quick to draw.

So for the backgrounds, I didn't want them to be bitmaps because something that big would make the file unacceptably large (and slow to download). But with vector graphics older computers would have a hard time.

By the way, my computer is my benchmark. It's a two-year-old macbook (one of the first white ones). Not too shabby, but not all that amazing either, and what with macs never having dealt that well with flash, I feel it's a sensible benchmark. If your machine is slower, well, poo!

So what have I done? Well the Actionscript aficionados among you will know that the bitmapdata class has a function called draw which will take a display object as its argument and create bitmap data from that.

So for everyone I just lost in that previous paragraph, there's a way that I can take my memory-efficient vector graphics and convert them into processor-efficient bitmaps. Wonderful, no? This means I can continue adding details to the backgrounds with relatively little impact on application size and performance. This is awesome, in case you hadn't realised.

</ geekicity >

So now you can see what Dreg's world might look like. The reason I spent so long on all this was to see how long it would take to create these backgrounds, as well as have an idea what they would look like. I haven't strayed too far from the look of the comic and film. It's allowed me to establish a work-flow and make sure it was possible to do more or less what I had in mind.

So though the acrobatics still aren't finished, nor are the background details, I feel it's time to attack the next big challenge - combat. This means animation, other characters, and AI. Urgh... I expect I'll be happily spending a lot of time just drawing more objects for the background before I'm ready to face such a daunting challenge...

Saturday, August 1, 2009

Dreg's wonderful adventure playground


Arrow keys for movement, 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. Click on the game to start interacting with it


Hello! And welcome to yet more tweakage.

Amidst the adulation, praise and sexual offers of you, my multitudinous fans, a couple of hesitant words of constructive criticism have emerged.

For example, several people have whinged about wall jumping being too tricky. I don't know, in my day we stuck to these things until we got them right. I still can't reliably pull off a wall jump in Metroid Prime, but hey, this is a flash game, so I have to pander to people with a very tenuous grasp on their motor skills.

A good friend of mine suggested people might be pressing jump again before Dreg has reached the wall (the fools!) so I should have Dreg jump off the wall so long as the jump key was pressed very close to the point that Dreg hit the wall. Fair enough, I guess, so I did that.

I've also noticed several of my female colleagues moan about how difficult the pole jumping is. So I've also made that more flexible. Again, I realised a lot of them were pressing space bar too early, so I just made that acceptable. Look at me, pandering to the masses.

I also made it so Dreg doesn't go crazy with the letting and go and the grabbing of poles. Now he just falls off.

As for the camera being slower, opinion has been mixed. Some love it, some get confused and cry. So I've gone for a slightly faster camera, but I still want Dreg to sometimes appear almost upside down on the screen, just to confuse my fans. Yeah!

There have also been lots of other tweaks, mostly to collision detection, which will forever be a headache. The horrendous mess that is my "level-editor" is slowly starting to become usable, and as a result I've created an adventure playground for you all to test out the new and improved mechanics. Are you able to access all areas? There'll be plenty of wall and pole jumping for you to do. Enjoy!

Level editing is pretty fun, and has the added benefit of being possible to do while drunk (in fact, it might help). For the curious among you, here's what the level looks like:



I like the sketchy look of it, don't you?


Anyway, the next thing I want to do is draw. Lots of drawing - I want to make the background. There'll be a minimal bit of programming, but mostly just lots of clicks of the mouse, which should make a nice change.

My problem is that seeing as this is already incredibly awesome, I don't know what word I'll have at my disposal once I upload a version with funk backgrounds and what not. The English language has no word to encapsulate just how... well good it's going to be. So I'll have to invent a new one. What do you think of jodersome?

Thursday, July 30, 2009

Lazy camera


Arrow keys for movement, 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. Click on the game to start interacting with it


Just a quick post

I was thinking that the gravity shifts maybe don't have enough of an impact, and that they would be cooler if the camera doesn't correct itself so quickly. Here's the same game as last time but with a slower camera. What do you think? Should I keep it like that?

Personally, I think it's awesome.

straddling is fun


Arrow keys for movement, 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. Click on the game to start interacting with it


Yeah, so gravity shifts are obviously out of this world and wonderful and I can be incredibly proud of myself. That said, in the previous post, one crappy bit was the nonsense that would happen around gravity rifts - I went a little crazy with crossing over collision lines and other such nonsense to keep Dreg from losing his cool and shifting into an alternative reality.

As I mentioned in the previous post, I wanted to create special collision lines that straddle multiple gravity fields, including floors which Dreg could run along without the collision detection giving up and stomping off in a huff as soon as he hit a gravity rift. This meant making funky collision lines that would return different values depending on which gravity zone Dreg was in. I also had to integrate it all into the chaos that is my "level-editor".

Hopefully the rather non-fun demo at the top of this post should demonstrate that it works!

The exercise also allowed me to do lots of tweaking on the collision detection itself, and Dreg is now even less likely to casually walk through walls, though I wouldn't like to claim it's impossible. I've tried to minimise the need to limit the actual level design possiblities, but there are a couple of things I have to keep in mind- if I try to make a floor behave as a wall it gets upset with me.

That aside, I now feel I have a system which is flexible enough for me to make the kind of levels I want to make, so look out for the next post - it's going to be fantastic.

I'm sure you, my avid fans, were a bit upset about how long it took me to get this update up and running. The reason? Well, this project was my topmost priority for a week, and I was seriously riding a wave of enthusiasm. The enthusiasm has dissipated a little, so now it's a case of trying to maintain a certain level of discipline and making sure that I keep on working. My having finally started playing GTA4 hasn't helped either.

Oh and I've finally caved in and made Dreg move with the arrow keys!

Friday, July 24, 2009

Yup. Now it's getting serious.


A and D for movement (ok, ok, I'll change it to arrow keys soon), spacebar to jump. Use A and D 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. Click on the game to start interacting with it



The game now has gravity shifts, and it is awesome.

I've actually done quite a lot of work behind the scenes. The gravity shifts are clearly the very incarnation of amazing, but the seriously cool thing I did was a simple way to quickly create, and more importantly, tweak the collision lines (hence their rather scrappy appearance). There's still a couple of issues with dodgy collision detection as Dreg passes through a gravity rift, but I think I've found the solution, which I'll talk about here, but if you don't care about geeky nonsense, ignore the following section:

< geekfest >
Each gravity Zone is actually a separate Sprite within Flash, and all the gravity calculations are done within the sprite's local space. Passing through a gravity rift, which is just a modified collision line, will the removeDreg from his current gravity zone, then add him to the next. Some calculations are required to put him in the right position, rotation, and velocity, but it's all pretty simple stuff.

All the collision detection is done within the local space of the sprite Dreg is currently occupying. But I think certain objects, namely walls around a gravity rift, should be detected globally, regardless of which gravity zone Dreg is in. This'll be a bit more expensive, but I've got lots of nice ideas to keep it fast.
</ geekfest >

Another problem is that at the moment I can't have Dreg experience a gravity shift while running on the ground - the solution is the same as for the previous problem.

In any case, give it a go. If you start by running to the right, it's easier than if you start by going up (the latter option requires a lot of wall jumping).

On another note, it's been very interesting to see how non-gamers interact with this - I've tried to make the swinging and wall jumping a bit more instinctive, but retaining some challenge. If anyone's having trouble wall jumping, remember you have to hit the spacebar again to jump off the wall...

See if you can complete the circuit in both directions.

Tuesday, July 21, 2009

Swingtasticism tweaked


New and improved! You can now easily jump from one pole to the next, and I've tweaked several other issues as well


Ok, I was a little premature in my celebration of swing. You see, I'm really impatient to get into the nitty gritty of gravity shifts, but I also have a bunch of acrobatic abilities for Dreg to have at his disposal. I thought I get swinging out of the way, do the gravity fun, then get back to his moves. Mainly I want the following moves:

- crouching and associated moves (crawling and doing a kind of low, evasive jump)
- wall running (running up a wall so as to be able to jump off of it)
- double jump (a totally unrealistic ability to boost your jump with a second one in mid-air. Unrealistic yet somehow satisfying)

These are all video game staples. There's not an ounce of originality in my game design for this game - it's more an amalgamation of ideas from different games that I like...

Anyway, so the swinging. Well, I thought I could do it quickly by just making a swing animation which plays automatically when he jumps on a pole, then a default jump from said swing. The problem was that the animation was crap. Have a look:


Yup, pretty crap


And besides, it looked stupid, him just swinging and swinging. I liked the idea of the player being able to control the swing, and of the swing just diminishing if not encouraged, but that would mean using maths and stuff, and maths makes my brain hurt. But indeed I did resort to maths, and I think it turned out much better, don't you?

I'm sure most of you have guessed that for his movements while swinging I just made 90 frames of animation of him leaning backwards and forwards, then had the maths control the actual rotation, the angle determining which frame to display. I'm sure that made sense to at least one of you.

Anyway, I then went crazy with maths. Maths will do that to you. It eats into you, and suddenly you want absolutely everything to be determined by ratios, fractions and the more sine you can stick in there the better. Then we had what I uploaded yesterday, where the particular angle, speed and general disposition of Dreg would determine how he jumped.

This sucked for several reasons. One - you'd often end up with weird looking restults, and it was very hard for me to predict what would happen. This made it very difficult for the player to have Dreg jump from one pole to the next accurately.

So I ended up with a compromise - keeping the funky mathematically inspired spinning, but a much more predictable way of jumping. So long as Dreg is spinning sufficiently fast (not very fast) he'll do a standard jump, and it doesn't matter which way he's facing. This makes it much easier to have him jump from pole to pole, and will make life easier for player and level designer (me) alike.

I want Dreg's acrobatics to be relatively easy to pull off. It should feel fluid and intuitive, like in Prince of Persia Sands of Time (which as far as I'm concerned set the bar for video game acrobatics). Tell me if you think it's worked out that way...

Monday, July 20, 2009

It's Swingtastic!


press A and D to run, and spacebar to jump. A and D also help you spin faster while on a pole


Right, I have to go teach a class in a second, but I wanted to stick this up.

I have poles from which Dreg can swing! Wheeee!

By the way, those black circles are the poles in question. As in, they're stuck in the wall behind. foreshortening, ok?

You can make him swing by pressing A and D at the opportune moments. The timing of your jump matters - if you're swinging fast you'll jump further. If you time it right, you can go really far. See if you can get to the tower at the top left, and wall jump all the way up. There's nothing up there of any interest, but it's a challenge, ok?

Here's a hint: start by wall jumping off the right hand wall...

I've also been working on stuff behind the scenes. I think I have all the collision testing sorted, but please tell me if Dreg has the audacity to casually float through some of those lines. He's had a tendency to do that in the past, the bastard.

I've already started working on gravity shifts, and I'm glad to report it's as unsightly a mess as I predicted, but I think I'll be able to muddle my way through...

Saturday, July 18, 2009

First update of the game!


press A and D to run, and spacebar to jump.


WARNING: I’m going to talk about my plans for the project, making references to other games, so if you’re not a gamer (which is probably most of the people reading this) you might not know what I’m talking about. I guess at least wikipedia is there to fill in gaping holes in your gaming knowledge, which obviously you want to fill.

As usual, I’ve decided that the best approach to making the game of my dreams is to be as stupidly unrealistic as possible, and see how far I get. So I’ll talk about my ideal game, though I doubt I’ll get anywhere near it…

Acrobatics: I want to have the acrobatics of the newer Prince of Persia games, complete with wall-jumping, pole swinging etc. but with the added fun of gravity shifts! This is what I’ll start with, so in further detail for this to work I need:

- responsive controls: unlike the first Prince of Persia, this game won’t make sacrifices in control for the sake of protracted animation. I’ll try to keep responses fast, with the jumping feeling more like Mario than Another World.

- Flexible collision detection: The platforms won’t be Axis Aligned Bounding Boxes, but instead line segments of any angle. The angle of the segment relative to local gravity will dictate whether the segment is a ceiling, wall or floor.

- Gravity shifts: I’m hoping I can make this work by simply having all the game mechanics rotate between each zone.

Fighting: I’d like something approaching the fluidity and depth of Bungie’s Oni (an underappreciated game in my opinion). I want to encourage the player to vary his/her style by having enemies increase their ability to block a certain type of attack each time the player uses it. It makes sense in my head, ok? More details when I get to it.

Story: I imagine progression in the game to be like Zelda – relatively controlled, but rewarding exploration. Just like Zelda (or Metroid), as the player progresses they’ll get more objects/abilities allowing them to access new areas in parts of the world they’ve already been in. So a player could just plough through the game’s main story in a relatively short time, or spend time exploring for extras and secrets. Oh, and I also want boss battles.

Anyway, I’ve been working on this game for three days, and thanks to my aborted earlier efforts at making games, progress has been surprisingly fast. I’ve already got most of my first two goals regarding acrobatics done, with gravity shifts hopefully coming soon.

My previous game involved space ships, which was bad for several reasons. A lot of casual gamers have real problems grasping the press-right-or-left-to-turn-and-forward-to-thrust way of controlling things, and also a space ship has considerably less personality than, well, a person.
With Dreg I already know the guy from previous projects, and it also allows me to flex my animation muscles. Throughout my life I’ve been ok at several disciplines (music, drawing / animation, programming, story-telling, programming) but not excellent at any of them. Computer games allows me to bring these skills together and hopefully get a whole greater than the sum of its parts.

Anyway, at the top of this post is the game so far: A and D control movement, and SPACEBAR is to jump. You can wall-jump by jumping against a wall, then pressing spacebar again to jump off it.

Dreg is back!

Dreg is back! If you don’t know who Dreg is, read this. Or go to this site. The film is in some ancient compression that many computers can't play. I'll have to go back and recompress then stick it on youtube or something. Anyway, now he’s back in computer game form!

This blog will be to document my progress and provide little playable demos for people to see how things are going. I’d love to hear feedback/ideas as I go.

This particular game has been in my head for a long time, down to its basic mechanics, and it’s already proving quite easy to develop because of my previous attempts at making games, and because I know exactly what I’m aiming for. More on what that is exactly in my next post…