Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Tips on street fighter like game  (Read 1472 times)
0 Members and 1 Guest are viewing this topic.
Offline cunkrlunken

Junior Newbie





« Posted 2012-01-02 21:00:36 »

Hi guys. I have an idea in mind for a street fighter like game, but much simpler.
I am an experienced web programmer and I like to make games for fun in my free time, cause it's much better than selecting stuff from a database and showing it on screen  Wink

I am not very familiar with Java yet but I have created some simple games; like a tetris game and a basic side scroller.

So street fighter. I am just looking for some hints and advice to put me in the right direction. I am guessing these kinda games are all about collision detection (on a much more complex scale than tetris Wink), but what else should I look for? How can I get started?

Thanks for any advice.
Offline Damocles
« Reply #1 - Posted 2012-01-02 21:15:25 »

You actually dont need a fancy collion detection.
Everything can be expressed by the single dimension "distance" between the 2 sprites.

So A Kick/Punch will land when the player punching is within a specific distance range to its opponent.

Such a game is more about making a matrix of combinations/events. You could handcraft that.

Lets say player1 does action A(punch straigt), and player 2 is in pose B (arms down), the action will be successfull if they
have the distance C (+-30cm) to each other, else the attacker punches into the void.

To juice up the gameplay you should make complex actions chains,
such that each action would have a working counteraction (block, or step back)
And each missed action leves the attacker in a vunurable pose, that has a fitting counterattack.


But I would start first by getting the rendering working, using some (ripped) sprites, to get some prototype to
work further from, and implement the fighting AI.

Offline cunkrlunken

Junior Newbie





« Reply #2 - Posted 2012-01-02 21:27:46 »

Cheers for that.
The collision detection doesn't sound too hard the way you put it.

I am just wondering how 'precise' you make it when your character has, say, a round face. It will use an entire coordinate on the X/Y axis, so a punch which isn't visually hitting your character, might still hit the grid your character is on, thus him taking damage while air is peing punched. Or am I missing something vital here?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Damocles
« Reply #3 - Posted 2012-01-02 21:40:22 »



See here, the one guy takes a swing.
All you need to know is the distance between the 2 characters to evaluate if the hit will land or not.
-> next to other factors, like the pose of both, the powerlevel or previous combination (or however complex the sim is)

What is not important (to the simulation logic) is how the sprites look.

Making it look good-> Thats the manual part. You could just (by hand) measure the best distance to make the animation look right.
And if you have several characters, try to make their Heads have the same hight to reduce the amount of
special animations for each character combo.

Offline cunkrlunken

Junior Newbie





« Reply #4 - Posted 2012-01-02 21:44:19 »

Ah right, I am guessing as long as you don't use any obstacles (which I don't plan to), you don't even need a grid - you just calculate based on the frame's X and Y.
Offline Damocles
« Reply #5 - Posted 2012-01-02 21:48:22 »

BeatemUp Games are actually very simple and straigforward.

Most of the fun comes from having good-looking animations and
a complex META-System of how the attacks are combined, and how to time the
attacks.

A complex collisiondetection would rather draw down from the fun, as the actions
(the character make complex moves) would get quite unpredictable, and harder to
learn for the player.

Offline cunkrlunken

Junior Newbie





« Reply #6 - Posted 2012-01-02 21:52:31 »

Cheers for the input Smiley Will see what I can come up with!
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #7 - Posted 2012-01-02 22:28:08 »

All you need to know is the distance between the 2 characters to evaluate if the hit will land or not.

That's not really a viable system in the long run, especially when it comes to different poses, whether in the air or starting/finishing a move etc.

What I've done before (and what I believe SF and Mugen both also do) is that every single animation frame has two sets of collision rectangles which specify the attacking and vulnerable areas. So a regular standing pose would be a single vulnerable rectangle over their body and legs. A straight standing punch would be a similar vulnerable rectangle and an attacking rectangle around the arm/fist. Resolving collision just becomes a matter of checking if any attacking rectangles of one player overlap the vulnerable rectangles of the other player.

This is why if you listen to hardcore SF players they'll talk about 'invincible frames' - parts of a move where (either deliberately or accidentally) the character has no vulnerable frames. These can be used as counters against attacks to hit your opponent out of their move.

Once you've got that far it's largely just a case of mapping all the animation frames and stringing the frames together into moves. The whole thing can be made data driven quite easily.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #8 - Posted 2012-01-02 22:34:39 »

A quick search came up with this link, which shows the Mugen character editor adding vulnerable/attack collision areas: http://www.elecbyte.com/mugendocs/tutorial3.html

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Damocles
« Reply #9 - Posted 2012-01-02 22:38:11 »

Im trying to keep it simple here.
Plus: without "freemoving" Airjumps, the system works the same as having collision rectangles defined,
as then there is no change in the y coordinates (of the collision areas)

You can of course go with using collision-rectangles on the body and libs, wich might help in visualizing the
collision-spaces in the development-version.

---

You could also beef it up as by using several collision-circles along the character skeleton, and
use a boneanimation and a much move realistic  collitionsystem.
This way you could freely animatie the characters, and dont need to manually edit frames.
The punchstrenght is determined by the velocity of the limbs.

This boneanimation is then mapped onto the actual artistic spriteanimation.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #10 - Posted 2012-01-02 22:50:31 »

Im trying to keep it simple here.
I don't see how your method is simpler - it actually makes things more complicated because you've got to guesstimate collision ranges for different moves and they won't match up with what the player is looking at. And it'll fall apart as soon as you add anything other than just walking back and forth.

Quote
You could also beef it up as by using several collision-circles along the character skeleton, and
use a boneanimation and a much move realistic  collitionsystem.
This way you could freely animatie the characters, and dont need to manually edit frames.
The punchstrenght is determined by the velocity of the limbs.

I don't think this would work well either - you're effectively taking all of the important gameplay data and putting it in the hands of your animators. Directly mapping velocity onto punch strength for example is far too simplistic - you want different moves to have different trade-offs - a fast move might be a weak jab, or it might be a powerful attack with a very small attack area. Those are easy to visualise and describe with the rectangle approach.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Cero
« Reply #11 - Posted 2012-01-03 02:04:16 »

every frame has a number of rectangles for collision
so yes http://www.elecbyte.com/mugendocs/tutorial/atkbox.gif
this is accurate

but making a versus fighter like street fighter... for fun... alone...

let me put it this way - in "Melty Blood", my favorite 2D fighter, one single character, has about 1000 sprites
all hand drawn

so doing a 2D Versus fighter is the most work, drawing-wise, that there is.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!