Showing posts with label combat. Show all posts
Showing posts with label combat. Show all posts

Monday, April 5, 2010

And a warm welcome to our newest member!


Press Q to use the health dispenser. 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. Press S to hold a grenade, the release S to throw it (be careful - hold it too much and you'll blow up!


Meet Crog!


Aaaaw! So cute!


Crog is a fast, nasty little animal that pounces at you and chews your knees off. If you encounter a bunch of crogs, they're likely to flank you and cause all kinds of damage.

Crogs come in all combinations of eye-watering colours that clash so much it makes my teeth feel tingly.

The best way to kill a crog is to be quicker than it is - they don't have much health, and though they can block a few blows, they're most likely to take damage.

The hardest thing about crogs is that I've never done a four-legged run-cycle. This was the best I could come up with. I'm happy with it, though obviously it could be a hell of a lot better.


Yes, it's a bit dodgy, but when he's running around biting your bum off you won't notice


Crogs will probably appear mid-way through the game, because they can be tricky. But once you get the hang of them they're not too tough (just big puppies really).

To help you get better acquainted with crogs, I've given you extra health, and a fully-upgraded health dispenser (press Q to use it). You can buy extra doses for it at the shop.

Next for me is to make a weaker enemy that'll appear at the beginning of the game. I hope I'll get this one done quicker than crog. But I enjoyed making crog.

Crog crog.

Wednesday, March 24, 2010

More stuff to buy!


Press Q to use the health dispenser (once you've bought 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 for punch and D for kick. Press S to hold a grenade, the release S to throw it (be careful - hold it too much and you'll blow up!


Hello!

I know! After four months of nothing Dreg is a hive of activity once more!

Actually, this update is not such a huge advance - mainly it's tweaks to the shop and combat and a new object to purchase...

The thing is, I just want to say thanks to everybody who has given me advice and criticism - it's all been so helpful. For this particular post, you'll see I've dealt with the comments by Todorus from the previous post (thanks todorus!). As for the difficulty, you start now with more health and money that should hopefully help the beginners among my fans (the new object should help too - more on that later).

Also, on the NewGrounds forum (in which most the posts are mine!), some guy called AdmittingZero wrote the following:

I don't understand how to buy anything in the shop or make him shut up.

Also I can just keep beating on the guys (when they're all standing on top of eachother), my punches hit all of them and none of them have a chance to fight back. The fighting needs to be a little bit more complex.


Ouch - he doesn't like snotty sam, and the combat, which I spent so long working on, isn't any good!

But the thing is, I went and tried what he was talking about, and he was right - you could just spam the A button over and over, and you'd eventually kill the thugs. It would take a long time, but it worked, because they could never hit back!

See, I'd originally thought that by having them block if you do the same move too often, players would be encouraged to vary their fighting. But that wasn't enough!

So now what I've done is that whenever a Thug blocks, there's a chance he'll do a quick counter. That way, if you keep spamming the same move you'll just get punched in the face. Haha!

It's also led to the nice emergent behaviour of apparent arguments between Thugs. If you've got two thugs in front of you and you kick, you tend to hit both. Now imagine both of them block. Then imagine that the one behind the first one does the quick counter, but just ends up hitting the one in front of him. Then the front one blocks and counters too, and it looks like they're just pissing each other off. It's hilarious and I love it. Wheeeee!

Anyway, it all goes to show the value of getting criticism.

Other changes include constantly visible instructions for the shop, and keeping health visible as you make your purchases - this is particularly important now with the addition of the Health dispenser! Yay, a new object!

Press Q to use the Health Dispenser, and it will replenish some of your health. You can upgrade the health dispenser both in the number of doses it can carry, and the amount of health it replenishes with each dose. To get the upgrades you need to leave the shop then enter again.

I went through a similar process in the design of the health dispenser as I had with Snotty Sam and the Holotec armour - the final version is much simpler (and better) than what I started out with.

I'm still not happy with the holotec armour but I really can't be bothered anymore!

Obviously, in the actual game there will be no shop like Snotty Sam's - different upgrades to armour and equipment will be found in different shops that the player will have to find.

Anyway, I'm ever closer to actually starting the game. There are still several tasks I need to deal with:

- More enemies! Argh! That'll be a fair amount of work, but I have to do it. That'll probably be my next task, to be honest - no point designing levels if I can't populate them.

- Getting lots of artwork done: I want to have a whole bunch of buildings, objects, and people to litter the world with to make it feel lived in, but also to make the background design faster (in the background I did a long time ago, I just drew each house individually, but that took too much time - I could still do that for some buildings, but it's best just to have a bunch of building blocks I can stick into the level)

- Figuring out scene-specifics like cut-scenes and boss battles

- Sorting out the ability to save. I've already got quite a lot of ideas how to do this and I think I'll be able to get it sorted pretty quickly, with small save files.

And I guess I also need to think about all the sound effects.

It still feels like there's a lot of work to do, but at the same time the light at the end is definitely getting bigger.





Wheeeee!

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.

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

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