2D-Fighting Game

Started by
1 comment, last by sakky 19 years, 6 months ago
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?
Take back the internet with the most awsome browser around, FireFox
Advertisement
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.

Steven Bradley .:Personal Journal:. .:WEBPLATES:. .:CGP Beginners Group:. "Time is our most precious resource yet it is the resource we most often waste." ~ Dr. R.M. Powell
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 &lt;= Acceptable Collision Distance.<br>Then<br>Player-2 HITS Player-1<br> Post Collision Message<br>Else<br> Player-2 HITS Air<br> Player-1 laughs @ Player-2<br>End<br>[/DEMO ]<br><br>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<br>
Take back the internet with the most awsome browser around, FireFox

This topic is closed to new replies.

Advertisement