Skip to main content
1 answer
Asked Viewed 57 times Translate

how do you make stages in games?

I'm Khalen, and I'm a fan of sonic and spongebob

video-games game-design

+25 Karma if successful
From: You
To: Friend
Subject: Career question for you


1 answer

Updated Translate

Fred’s Answer

I have never coded a game, but I'd imagine it'd be like coding anything else. Every program is basically a bunch of pieces, assembled sort of like Legos. You start with the idea of what you want the whole thing to look like. Then, you break it down into smaller and smaller chunks, until you get to the point where you know how to write that code.

I'd imagine that with a game, you have the main engine. It knows the mechanics - like how sonic jumps, or how fast he runs. It knows all the animations for each of the sprites. It then most likely has a way to read in a file that describes the specific level. In a Mario game, the level would describe where the enemies spawn, where the different blocks are, where the coins are...etc.

Then, the main engine just knows "first I load level 1-1", and let's the player play it. Depending on which exit you take, it may then load level 1-2 or 1-4, or bonus level 3...etc.