Jump to content
  • Advertisement
Sign in to follow this  
kzar

Need help making a simple platformer

This topic is 5153 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 decided im going to make a platformer game and going to start with the basics. A character that can move, and some tiles for him to move on. Ive been reading alot about how to go about this as i have never made a game before (im new at sdl too). I think i have got the right end of the stick here but correct me if im wrong. Il have a structure for tiles. That will store x y coords, image name, tile position in image and if the tile is in use. Il have an array of that structure to store all the map's tiles in and a single one for the player's character In my game loop i will check if each tile has colided with the player, i will check for player input to move the character around. Would that way of doing it work? I dont want to start it off wrong because i will expand it later to have animated tiles, ones which kill you and things like that. Also im not sure how i would do the jumping like mario. (the longer you hold jump the higher you jump, but only to a point and then you fall whatever)

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
i'm looking to start a platoform game too not sure where to start though. why not assign value to tile... 1 solid, 2 empty and if tiles's 1 then it can't go through, and then just put gravity on.

Share this post


Link to post
Share on other sites
well i want there to be different types of tile. It would be a bit boring if there all exactly the same.

Share this post


Link to post
Share on other sites
hmm how about two arrays of tiles. One for colideable ones and one for non-colideable ones. That way it wouldnt have to check for collisions of all the other tiles that will never be touched by the player anyway.

I think i will give the colideable tile structure a integer which controls the action that happens when the player crashes into it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!