Showing posts with label jodersome. Show all posts
Showing posts with label jodersome. Show all posts

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?

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!

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

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