Confused about Maps and Tiles..., and some questions on how you learned!

Blitz3D Forums/Blitz3D Beginners Area/Confused about Maps and Tiles..., and some questions on how you learned!

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Programming, of course, is telling a computer step-by-step how to get a job done. Game programming is best done by coming up with an idea of what kind of game you would like to play, first. Then, step-by-step, write out on paper what you want to accomplish. For instance...
Space Invaders. Have rows of buggy things go slowly back and forth on screen, while allowing player to shoot at them. If player hits one, it is destroyed (ie, removed from the ones moving back and forth). When a certain number/percentage of invaders are destroyed, begin to pick up the pace of their back and forth motion. As invaders (going back and forth) reach a side, they move down a bit closer toward the player (hey, they're invading, you know!).
Continue moving them back and forth, coming closer and faster, until they are either all destroyed, or until they reach the bottom and then the game is over.

In the above example, by writing out what you want to do, you can then begin to read up on the commands and see how they can help you accomplish your goal. In other words, commands are there to help you get the job done. You won't know what commands to use if you don't know what it is that you want to accomplish. Writing it out helps clarify what you want to do, and sets you on the path to programming it out.

Once you have the general overview done, you can begin to break the game down into smaller, more manageable pieces, such as:
Initialization (where you set up the names of the variables you are going to use, assign starting values, etc).

Introduction: the first thing that the player sees as your game is started; it may include a menu (to give a player an idea of what the goal of the game is), or perhaps allow the player to set up his playing piece on the game screen (select a car for a racing game; or select a scenario or map; choose what weapons/armor/statistics to use, etc)

Start the game.
Mainloop: In the main loop, this is where all the action goes on. It is designed to repeat again and again, until certain conditions are met. In the Space Invaders example, it goes over and over until you have destroyed all the invaders, or until they have destroyed you (or maybe until you have to use the restroom).
Endloop

Conclusion: Give the player choice to play again, or just exit the game, whatever.

Clean-up. Free up system resources that were grabbed for graphics, sound, etc.

The above is of course an extremely simplified overview of how to program. The beauty of BlitzBasic is that it makes creating a game so darn easy!