Sign in to follow this  

2D-Fighting Game

This topic is 4818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was thinking about making this 2D fighting game and I had a few questions about one. How do you display the scrolling background? Would you use tiles for that? I think it would be best to use tiles, but I’m not sure how big to make them. How big should I make them? How does the collision detection work? Do you check collision only when an action occurs, such as punching, kicking or fire projectiles? A simple bounds checking would suffice wouldn’t it?

Share this post


Link to post
Share on other sites
Quote:
Original post by sakky
I was thinking about making this 2D fighting game and I had a few questions about one.

How do you display the scrolling background? Would you use tiles for that? I think it would be best to use tiles, but I’m not sure how big to make them. How big should I make them?

How does the collision detection work? Do you check collision only when an action occurs, such as punching, kicking or fire projectiles? A simple bounds checking would suffice wouldn’t it?


It sounds like you should maybe try some more fundamental games that will build your skill in doing the things you are asking. Scrolling backgrounds and collision detection can be done in so many different ways it will boil down to your personal preference and experience. As for how big to make your tiles, I would say, make them to fit your game. If that means one huge pic to use as a background or 20 smaller ones that make up your background that is dependant on what you want. Sorry, I know this isn't much help but your details are kind of vauge.

Share this post


Link to post
Share on other sites
This topic seams miss leading. I’m not a newbie, but I though the question should be placed here.

The aspects of creating this game sound easy enough to complete but I was wondering about speed. If I draw the background with one huge image I think the game will lag. I don’t even think that that could be done any ways. So I think one hue image broken down into 32x32 or 64x64 tiles would be better. Something that is a multiple of the sprite dimensions.

So I guess I just solved that problem. A level composed of 32x32 tiles at 1920 pixels (60 tiles) wide by 480 pixels (15 tiles) tall = 900 tiles. A level composed of 64x64 = 255 tiles. I guess I just need to figure out how I want to store the world imagery. Scrolling it shouldn’t be hard. I mean it isn’t hard because I know how to do that.

So I need a really fast way of checking collision (like every one else). The cool thing is that I don‘t have to check for collisions until a character performs an action: punching kicking, firing projectiles. I either use a distance formula or some other bounds checking for collision detection.

Another bonus is that here is only two primary objects with about 2 – 4 auxiliary objects for projectiles. So my collision detection is cut down even farther. To help out, projectiles only fly at a certain distance. All I got to do for them is check the X-Axis value and either post a collision message or remove the sprite (flew off screen). Hmmm, maybe I can extend this for using it with the characters to.

[ DEMO ]
Player-1 is @ point (A) and Player-2 is @ point(B)
Player-2 punches

If [B – A] <= Acceptable Collision Distance.
Then
Player-2 HITS Player-1
Post Collision Message
Else
Player-2 HITS Air
Player-1 laughs @ Player-2
End
[/DEMO ]

That seams easy!? But it is ambiguous because it dose not support a character in the air. Example: Player-2 KICKS Player-1 in HEAD. This would fail because the...... Wait! It might not fail because the X-Axis is the same no matter what the Y-Axis is. So my procedure would support characters jump-kicking each other after all. That was easy

Share this post


Link to post
Share on other sites

This topic is 4818 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this