Archived

This topic is now archived and is closed to further replies.

iancasti

Bring Back the days of old action-packed Martial arts games

Recommended Posts

I''m programming a simple 2d martial arts game along the lines of Streetfighter 2: No 3D, no advanced effects, just simple, balls-to-the-wall martial arts. Most of the game is programmed, and the only thing missing is a decent AI engine for the computer opponent (in a one player game). I don''t know where to start - theory, technical stuff, etc. I know the programming has to be simple, yet scalable so that the computer increases w/intelligence as the game progresses. BTW, I''m using an object oriented language similar to java-script: Macromedia Flash 5''s actionscript Thanks Ian Bring back the old games.

Share this post


Link to post
Share on other sites
quote:
Original post by iancasti
I''m programming a simple 2d martial arts game along the lines of Streetfighter 2: No 3D, no advanced effects, just simple, balls-to-the-wall martial arts. Most of the game is programmed, and the only thing missing is a decent AI engine for the computer opponent (in a one player game). I don''t know where to start - theory, technical stuff, etc.
I know the programming has to be simple, yet scalable so that the computer increases w/intelligence as the game progresses.

BTW, I''m using an object oriented language similar to java-script: Macromedia Flash 5''s actionscript

Thanks

Ian



Bring back the old games.


Share this post


Link to post
Share on other sites
Just a random note: StreetFighter 2''s characters originally responded in a purely pattern-driven fashion: back up, flip forward, slap, jab, uppercut. And so forth. Even their defense was largely patterned (the old Ryu/Ken small flying uppercut, big flying uppercut trick against Guile...) You should be able to create some decent patterns in no time.

Share this post


Link to post
Share on other sites
i''m not sure what you mean by ''data driven'' or ''code'' - Very simply, here''s how it wrks:

Flash''s actionscript works with a ttimeline system. I ccreate a character with it''s own internal timeline. I also create controls inside this character which tell it do do certain things based on which keys are pressed (i.e. go to frame ''punch'' if ''p'' is pressed). I have created the characters and users''ability to choose. Now I would like to understand exactly how AI works in computer driven opponents.
Hope this somehow answers your Q

Ian

Share this post


Link to post
Share on other sites
Oluseyi ,

When you say pattern driven do you mean that the computer ''learns'' your fighting style and is ''trained'' to react accordinggly? Or does it simply have a trained response to every possible situation? And how does it react? I mean, does it react based on what key the human presses or what movement his character executes?

Share this post


Link to post
Share on other sites
You can use patterns in ways from simple to quite complex...

The very simplist (is that a word?) is to have a set of patterns which the AI uses randomly during the game. A pattern is a sequence of events by the way - so for example pattern 1: move left, punch, duck, jump, kick, end... pattern 2: jump, uppercut, flying kick, defend, end... etc.

This would look naff though.

With a bit more work you could have say 2 or 3 patterns to respond to each type of key press/action the human player uses. So if you press the ''lowkick'' button, the pattern could cut into a ''lowdefend'' mode, perhaps followed by a high attack?...

If you chuck in a couple of decent random patterns as well, to make the computer look less perfect, it would be OK. In other words, when the player does a low kick, use a random variable to decide whether to use a response pattern or a random one. If it always uses a response that works against that attack, it will be very hard to beat. If it sometimes gets ''flustered'' - ie uses a random pattern - it will be better.

You also need some patterns for attack, which could be used randomly when the player isn''t beating you up or aggressively in response to the player as well - like following a low defend pattern with a high attack one.

You can make it seem really clever if you don''t just respond to the player but to the environment as well... but I don''t know if the 2d game you''re doing has environmental cues - probably not so ignore this...

Anyway. My typing fingers are knackered now - so I hope this helps a bit!

Share this post


Link to post
Share on other sites
I strongly suggest you brwse the Web and look for a 2D fighting engine called MUGEN.
It basically allow you to recreate any of your favourite arcade fighting games. THere are tons and tons of characters available ripped from console ROM. I have seen DragonBall characters, King of Fighters, Street Fighter, Last Blade, Samurai Shodown, and quite a few others I didnt know about.
If you are serious about your project and you dont want to bother with the graphic part, I am sure you will be delighted by this engine.

good luck :-P

Share this post


Link to post
Share on other sites