BGE 2.6 +2.49 Fighting Game Tutorial

[Teddy striker is 2.49][Shaggy is 2.6]
Hi, Today im going to be covering how to make a fighting game. The only things i wont be teaching is ai, im very hopeless in this area.
Here are the steps you should have before you start programming:

  • Model character ( Done!!)
  • rig the character (Done!!)
  • animate the character( Done!!)
  • Basic enemy ragdoll ( Done!!)

Ill start you off with animating :slight_smile: . Fist parent 1 cube on your models head, 1 on its Right hand, 1 on its left hand, 1 on its right foot, 1 on its Left foot. When you animate your attacks, remember your character will be static, so a basic punch and kick should start you off.
For movement, Left and right will be enough ( because it youll be viewing the game from the side ).
Now go to the logic bricks and select four Keyboard Sensors. the keys will be A, D ( for movement ) and G,H ( for attacks ).
Now get 4 controllers an connect the Sensors to the controllers.


I Keyboard (G) I ------ And ---- Action

As you can see that was an attack so you dont need motion. Get an action Actuator and connect And to it ^^.
Do the same for Your char walking except add motion.

For physics leave the armatures, character and hit boxes static but the boundries have to be set to Sphere. you shouldnt press add to parent.-- Compound and add to parent everything but the hit boxes.

Thats all you need for your character, for the ragdoll, go into this blend file of this tut and use whatever you want.

EDIT:22/06/13
[First port]

Okay, I’m Back and working on The fighting game tutorial again.
i’ll do as much as i can in logic bricks… lol
To do:
-Basic Strikes: Punch+Kick = Done
-Basic Movement: Left+Right = Not Done (50%)
-Basic Grappling: Throw = Not Done
-Basic Weapons: Grab+1Hit = Not Done
-Basic Dynamics: Collision dynamics = Not Done
-Basic Enemy AI: Near+Radar Sensor movement+attack = Not Done
-Basic Menu’s: not done

Current Controls:
W-Forward
H-Unspecified Move
G-Attack1 (Punch)
Shift-Powerful Addition.

If anyone wants to join this project ( Just PM me )
this tutorial will actually be made into functioning game(S)… depending on how i we go. later on or so i’ll put everything into python.
Critique needed.

Attachments

Teddy striker.blend (678 KB)Shaggy.blend (1.25 MB)

Thanks cliven, this is very usefull!

If you have any questions, ill answer them. On the next tutorial im gonna show reactions to moves.

Were there any problems with this tut, or was it fine?

It was cool cliven, pretty direct but it was enough to understand what you ment, thanks!

Keep up the good work!

I see problems occurring when two dynamic hand cubes collide during the game.

Ill be right on that

Sorry to necro a thread, but I believe this is an extremely helpful example here.

BUT there are a few problems with the .blend file, namely that the animations stop playing correctly- luckily I know how to fix them.

  1. First, go into game logic of the player armature object. Look for the punch and kick action actuators.
  2. There you will see a box called layer, it’s on the left side of the actuator brick. It should have a box to the right of itself with a . 0 inside it.
  3. Change this 0 number to another number, let’s say 1.
  4. ???
  5. Profit! The animations now play fine on repeated uses instead of getting stuck.

The game can play actions simultaneously if they have different layers. So if you want to be able to punch and kick at the same time, set one of them to be on a different layer- say 1 for punch and 2 for kick.

Great work XMegaManiX! This is INSANELY helpful, so stupidly simple too!

Ported and restarted in 2.6
Enjoy!

I Have a question:
Any Idea on Combo chains?
And vfx effects like in every game?

When are you going to finish the tutorial?