Handmade Hero»Forums»Code
4 posts
In Need of some help (#2d #platformer #theory)
I want to make a 2d platformer. But I don't prefer using engines. The way I like to code is to get a grasp of concepts and implement it in my programming style(So yeah, Haven't made a single original/big game). I don't have any issues with low level languages or math. I am stuck at deciding how to store level objects(platforms, players, enemies. etc) which data structure should I use. So far what I have is store all the objects of a level in a linked list and dump it in a file.

If someone could share their thoughts on this it will be helpful. Also looking for any conceptual discussions related to games or 2d platformers.
Shazan Shums
158 posts
Some day I will make quality software. Programming FTW.
In Need of some help (#2d #platformer #theory)
This is a good starting point.
sonic physics guide.
Jeremiah Goerdt
209 posts / 2 projects
Programmer, Linux apologist, and not-so-wiseman.
In Need of some help (#2d #platformer #theory)
Start with exactly what you want to see on screen. At the very beginning, you'll have a rectangle that represents the player. Apply gravity, prevent falling past the "floor", use keyboard to move left/right, implement a jump force, and on, and on.

As you build these mechanics from the ground up, you'll start to see natural groupings of data in your code and you can decide which data structures make sense from there.

Don't waste the time up front deciding what the best architecture is. Just get to work and figure the architecture out for the exact "problem" you're solving.
4 posts
In Need of some help (#2d #platformer #theory)
Thanks, this sounds simple will give it a try.