Jump to content
  • Advertisement


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


Platform game questions

This topic is 5616 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 have a few questions regarding making a platformer. It''s the kind of game I''ve always wanted to make. The game will be in SDL. Here are my questions. 1) The game will involve complex sprites and weapons (such as swords), so obviously I can''t just try to detect collisions by using a bounding box because it''s too inaccurate. How would I have to do it? Using bitmasks? 2) How would I handle jumping in the game? I read the other thread but I''m not sure if it helps me all that much. It''s gonna be sort of like a Ninja/Samurai thing...anyone have any ideas. Or have any examples of games with good jumping motions? 3) Level design...overall...any suggestions? How I''ll hold information...XML or whatever...Really open-ended on this one. --SuperRoy [ Author:: Linux GameDev Articles ] [ Programmer:: WhitespaceUnlimited ] [ Webdesigner:: CTH3.com Webdesign ]

Share this post

Link to post
Share on other sites
Personally, I would suggest that you start off with just using bounding boxes, just to get into the swing of things, and then maybe later add some more accurate collision-detection.
Jumping is fairly simple to do. Simply hold a velocity vector for each object and increase its Y velocity when the jump key is pressed. If you''re looking for a smoother motion, you might want to implement an acceleration vector also.

Also, check out a game called Stick fighters. I believe it''s similar to the kind of game you''re trying to make. The author''s email is yoda_the_coda@hotmail.com I think.
Not sure though...

Hope this helps, and good luck with the project, friend.

Share this post

Link to post
Share on other sites

Why do so many people have problem with jumping? It''s odd.

i agree.
1- you could use circular collision detection, the end of the sword is the center of the circle. the only time this wouldnt work is if the end is not touching the object (very unlikely if the sword is small).
2-already answered
3-i would make a level editor. the way i designed mine was it was tile based so you can click to lay a tile, and for collision detection i had zones (for like the floor, and other objects that could be collided with). using xml to design a level would be bad. you would have to constantly run the game with the map to see if things look right.

doh, nuts. Mmmm... donuts
My website

Share this post

Link to post
Share on other sites
i think my problem (and not confirmed yet) that i was dividing the timedelta by the speed) and not multiplying the speed by the timedelta (speed has to be a much smaller number).. the problem I was having my inertia/gravity was dividing a number by a very small number made a huge number.. (if that makes sence).. will convert my code over today and see if that helps..

I have him running/climbing around no problems with time based movement.

hopefully the new aproch will help..



Jumpman - Under Construction

Share this post

Link to post
Share on other sites
I'm thinking that if you want simple sword attacks in a simple platform game, you can get away with collision boxes. So when your player swings the sword, a hit box will appear in front where the sword swings. Like in the 2d Zelda games - the sword is'nt bitmasked, they just twat a hitbox in front of the player when they swing the sword.

Assuming your game combat is fairly simple you can get away with that.

As for jumping, your player should always be dragged downwards by the force of gravity and this should happen every frame. When you want the player to jump just give them an upward velocity and your gravity will automatically bring them down again.

This is assuming you use values for velocity to move your player.

Hope that helps.

[edited by - m_wherrett on June 5, 2003 4:38:28 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!