Handmade Hero » Forums » Code » In Need of some help (#2d #platformer #theory)
4 posts
#12102 In Need of some help (#2d #platformer #theory)
1 year, 1 month ago

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

Some day I will make quality software.
Programming FTW.

#12104 In Need of some help (#2d #platformer #theory)
1 year, 1 month ago

This is a good starting point.
sonic physics guide.

Just being curious on programming....
Jeremiah Goerdt
199 posts / 2 projects

Stay-at-home Dad, Programmer, and Linux apologist.

#12105 In Need of some help (#2d #platformer #theory)
1 year, 1 month ago

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.

Build a man a fire, he'll be warm for a day.
Set a man on fire, he'll be warm for the rest of his life.
4 posts
#12159 In Need of some help (#2d #platformer #theory)
1 year, 1 month ago

Thanks, this sounds simple will give it a try.