The Daily Click ::. Forums ::. Klik Coding Help ::. Any opensource, fighting game engines around?
 

Post Reply  Post Oekaki 
 

Posted By Message

Mr G



Registered
  31/12/2008
Points
  178

VIP MemberPS3 OwnerI like Aliens!Attention GetterDos Rules!
1st January, 2009 at 09:26:43 -

I was aiming to make a fighting game but I need help with the engine. So I searched for opensource fighting engines on TDC but I couldn't find any fighting games that made use of combos, special attacks whatsoever

Can anyone tell me how it's possible on MMF2?
I have the basic kick/punch thing ready but no combos or special attacks

 
Image

http://create-games.com/project.asp?id=1549

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
1st January, 2009 at 14:58:09 -

One extremely simple way to do it is to have a counter. Say X is a basic attack and X > Y is a combo.

-Pressed X (and whatever other conditions are needed) > Make character attack; set counter to 5.
-Counter is greater than 0 > Subtract 1 from counter
-Pressed Y + Counter is greater than 0 + X attack animation is playing > combo attack.

I've never done this before, but that's one way to do in-sequence button combos. You may have to fiddle with the particulars to get it to work right.

Edited by OMC

 

  		
  		

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
1st January, 2009 at 15:28:44 -

I'd probably try storing the player input in a string, and then compare the string to your combination. You'd also need to constantly remove characters from the start of the string to force the player to press buttons quickly for a combo to work.

eg.

* Player presses "UP"
-> set string to string + "U"

* Player presses "DOWN"
-> set string to string + "D"

* Right(string, 3) = "UDU"
-> have player do what ever special you want to associate with "Up-Down-Up" combo
-> set string to ""

* Every < Some short space of time >
-> set string to Right(string, length of string - 1)

I've never tried it, but I don't see why it shouldn't work.

Edited by Sketchy

 
n/a

Mr G



Registered
  31/12/2008
Points
  178

VIP MemberPS3 OwnerI like Aliens!Attention GetterDos Rules!
1st January, 2009 at 16:40:59 -

Thanks for the replies

The second method sketchy mentioned looks a bit easier but I'm also more familier with counters

Also, does anyone know if there is a good opensource engine that also shows these examples? or can someone make one please ?

 
Image

http://create-games.com/project.asp?id=1549

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
1st January, 2009 at 17:15:02 -

http://cid-b1e7ee094271bbda.skydrive.live.com/self.aspx/Public/Combo.mfa

not using proper sprites or anything, but it should give you the general idea

 
n/a

Mr G



Registered
  31/12/2008
Points
  178

VIP MemberPS3 OwnerI like Aliens!Attention GetterDos Rules!
1st January, 2009 at 18:20:11 -

Thanks a lot mate, I think I got it

 
Image

http://create-games.com/project.asp?id=1549
   

Post Reply



 



Advertisement

Worth A Click