Sign in to follow this  
Lewis De Angelo

How to tackle designing?

Recommended Posts

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 [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[quote name='Lewis De Angelo' timestamp='1353710324' post='5003596']
How should I design a game prior? I've tried thinking of the objects I require but that resulted in incoherent spagetti code. [/quote]

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.

Share this post


Link to post
Share on other sites
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. Edited by superman3275

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this