How to tackle designing?

Started by
2 comments, last by superman3275 11 years, 5 months ago
I'm an SDL newbie and I'm competent with the fundamentals of C++. How should I design a game prior? I've tried thinking of the objects I require but that resulted in incoherent spagetti code. Thanks smile.png
Advertisement
Start with hello world.

Then move on to pong or tic tac toe.

Then move on to tetris or a similar falling block game.

Then move on to a side scroller.


Taking too large of steps results in nightmares, frustration, and loss of hope. Take small steps.

How should I design a game prior? I've tried thinking of the objects I require but that resulted in incoherent spagetti code.


Figure out what you want the game to be. What is the environment and what is the point of view - what does the player see on the screen? What movable objects are there, how should they interact with other objects and with the environment? What is the player's goal, is there a scoring system? How does success work, how does failure work? Is the game multiplayer? And so on. Think about every aspect of the game in advance, and write down the details. Yes, the game will change as development progresses, but at least you had a plan to start with.

-- Tom Sloper -- sloperama.com

Do this right now:

1) Get a piece of paper and a pencil

2) Write as a header: "Function"

3) Think about exactly what your game is and right it down.

Example for Pong:

Pong is a 2d game. There are two paddles. One is player controlled and the other is A.I. controlled. There is a ball that moves around the screen. Whenever the ball hits a paddle I reverse either it's x or y velocity depending on which side it hits. The paddles are both next to the top and bottom of the screen. If the ball goes past a paddle the game ends....

This is important. You need to define your goals, limits, and conditions right now. You need to understand the rules, and the extent of your game. Write it all down.
Then list it all. List all the functions and rules.

4) What is in your game? Write it down. You need to know what the actual objects are before coding. Making mario?:

1) Mario
2) Coins
3) Bricks
4) Mushrooms
5) etc.
6) etc.

Write EVERYTHING down. You need every last object.

5) Figure out the system level things your game needs.

Example:

I need a window. The game will have custom art so I'll need something to load images. I want music and sound to be played, so I'll need audio too. The only way to control the player is having an Input manager. Oh, there's collision? That means I'll need some collision code too. Yet, handling collision will take Physics...

6) Now find out the actual objects.

1) Write down as a header of a page of notebook paper: "Objects"
2) List all the objects in your game. Adhere to the single responsibility principle, and feel free to go back and change things.

7) Write down the objects functions. You need to know the objects responsibilities and functions. Take a page per object and write down EXACTLY what it does. Make sure to note any interaction it has with other objects.

Now start coding, using all of these pages as a guide. Remember to use small incentives. Build a playable, small game, and than expand it with your other ideas.

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

This topic is closed to new replies.

Advertisement