Samureye - basic fighting engine
Posted: Thu Sep 25, 2008 10:34 pm
Here's a basic fighting game I've made over the past week.
Controls
A, D: run left and right.
S: crouch
spacebar: jump
numpad 8, 4, 5, 6: attack
The faster you run, the higher you jump. You also jump higher if you're crouching, so to get maximum height, run fast, then quickly crouch and press jump.
To wall-jump, run at a wall and jump. Press jump again in the air before you hit the wall to kick off it.
Attacking press the attack key in the direction you want to attack in. There are eight attacks:
On the ground:
The player is made up of four actors:
Actors use the stats variable as a set of bits to know how to interract with each other:
to
On his attacks creation, you'd set stats to
Conclusion
That's about it for now. At the moment, the game is simple: just run and jump around and have fun smashing balls everywhere.
Graphics were made using Pivot Stick-Figure Animatior and Graphics Gale. Sounds were made in your imagination
I don't really have any particular plans for future development of this game, so feel free to modify it, add stuff to it and improve it at your leisure (why not have a contest to see who can make the best game from it?) If you have any further questions about how it works, ask here.
That's all for now.
PS: I'm getting weird problems with the key-ups not always being received, especially when lots of them happen at once. Anyone else get this?
Controls
A, D: run left and right.
S: crouch
spacebar: jump
numpad 8, 4, 5, 6: attack
The faster you run, the higher you jump. You also jump higher if you're crouching, so to get maximum height, run fast, then quickly crouch and press jump.
To wall-jump, run at a wall and jump. Press jump again in the air before you hit the wall to kick off it.
Attacking press the attack key in the direction you want to attack in. There are eight attacks:
On the ground:
- 4/6 (in the direction you're facing): basic kick.
- 4/6 (the other way): back punch.
- 5: slide kick.
- 8: uppercut punch.
- 4/6 (in the direction you're facing): fly kick (hold the key down and then release to attack).
- 4/6 (th other way): double spin kick.
- 5: dive kick.
- 8: double flip kick.
The player is made up of four actors:
- The graphic (the part you see)
- The actual player actor (purple)
- A base to detect when you leave the ground (yellow)
- An attack sensor to do the attacking (red)
- It's easier to have certain areas count as collisions, and others not (ie. If your player carries a sword, you don't want him do pe able to be killed when someone punches the sword)
- It makes the player a better shape for collisions, so the shape stays the same, especially since in this case, the player is a stick-figure, so lots of things could easily miss him because he's so thin
Actors use the stats variable as a set of bits to know how to interract with each other:
- bSolid: This is for solid things like walls
- bAttack: This is for things that are attacks, or do damage; they use the variable 'dir' as the direction the object they should hit should fly, and 'strength' as the strength of the attack (for how fast to make things fly, how much damage to do, etc.)
- bSide: The 'side' the attack is on (true = enemy, false = you). This is primarily for the making sure you can't hit yourself (you can go flying all over the shop if you disable this check, but once you add health it will get really bad).
- bUseSide: whether to count bSide (ie. things like balls want to hurt both you and enemies. They have this value false. You have it true. An enemy would also have it true).
- Code: Select all
if ((collide.stats & bAttack) && ((collide.stats & bSide) || (collide.stats & bCountSide) == 0))
to
- Code: Select all
if ((collide.stats & bAttack) && (((collide.stats & bSide) == 0) || (collide.stats & bCountSide) == 0))
On his attacks creation, you'd set stats to
- Code: Select all
stats = bAttack | bSide | bCountSide;
Conclusion
That's about it for now. At the moment, the game is simple: just run and jump around and have fun smashing balls everywhere.
Graphics were made using Pivot Stick-Figure Animatior and Graphics Gale. Sounds were made in your imagination
I don't really have any particular plans for future development of this game, so feel free to modify it, add stuff to it and improve it at your leisure (why not have a contest to see who can make the best game from it?) If you have any further questions about how it works, ask here.
That's all for now.
PS: I'm getting weird problems with the key-ups not always being received, especially when lots of them happen at once. Anyone else get this?