Need help making a simple platformer

Started by
2 comments, last by kzar 19 years, 5 months ago
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)
Advertisement
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.
well i want there to be different types of tile. It would be a bit boring if there all exactly the same.
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.

This topic is closed to new replies.

Advertisement