Planning with Pseudo-Code
Author: | Activ8games
|
Submitted: | 1st December, 2003
|
Views: | 5607
| Rated: |
|
|
Hi everybody. We all should know the importance of planning in order to create a quality game. Not only does this mean having your levels, plots and graphics on paper before you even begin to code but it also means having a rough idea of what that code should be and what needs to be done.
This is where pseudo-code can help. Its basically the proccess of writing down a list of generalized instructions that tell what you want your code to do but without the technical elements. Using pseudo code can help to make the coding process easier althogether since you'll already know what you need your code to do. Its simply a matter of choosing the right commands to accomplish the task.
Lets use a simple pong type game for example. Here's what a pseudo-code list might look like for this purpose:
1. Create racket sprite (thats just what i call the thing you hit the ball with. I don't know whats it really called.)
2. Create ball sprite.
3. Create brick sprites.
4. Fill an array with the brick objects.
5. Move racket sprite according to user input.
6. Bounce Ball if it hits racket.
7. End Game if Ball hits bottom.
8. If ball hits a brick, make an empty space in the array and destroy the brick.
9. Update display
10. If all brick are gone, you win.
This is a simple pseudo-code list. Normally, it should be comented and organized into groups or functions depending on what program you use. But either way, the concept is the same. With the use of pseudo-code you will find coding a lot easier and you will spend less time figuring out the code on the fly.
Also, the click interface is about as close to pseudo-code as a software development tool gets. This will make the conversion from pseudo-code plans to real code a breeze.
Thanks For Reading
|
|
|