Sign in to follow this  
kzar

Need help making a simple platformer

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
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
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

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