Game Programming - The Ultimate Game Programming Tutorial

Game Programming - The Ultimate Game Programming Tutorial -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
The Ultimate Game Programming Tutorial FIRST, IF YOU HAVE GOTTEN THIS FROM SOMEWHERE, IT REALLY DOESNT MATTER WHERE, VISIT THE BEST GAME PROGRAMMING SITE: The Game Programming MegaSite: Introduction: This documents purpose is to teach Game Programming. Step by Step, and little by little this document will teach you everything you need to know in order to program games. This document contains my tips, code, and advice as well as information. What you need is knowledge of programming and a C compiler, hopefully one of the more well known compilers, this would include Borland, Microsoft, Watcom. If you are using another compiler, such as DJGPP, this code may or may not work, I provide a DJGPP specific section at the end, which covers all these aspects as well, but only for users of DJGPP. I use DJGPP because I believe it is by far the best available, but for your purposes the others will do fine. And now begins your journey into the realm of Game Programming. Appreciation and Understanding Is The First Step: Did you ever look at Pacman or Space Invaders, or for that matter any "bad" game, and say, "What a corny game! corny graphics, and NO SOUND!!!". If you have done this, ask yourself this question, Can you make that game? Those games take thought knowledge and a lot of hard work. You have to appreciate every game, whether you feel it's good or bad. Every agem requires an amazing amount of EFFORT to complete and each should be looked at with amazement at what we can do. True, some games are better than others and some should have never been made, but understand that even the bad games are good. The Milestones In A Games Life: A game runs sequentially, this happens this time, this happens after that. A game is structured in such a way that it is easy to understand, here is the “usual” order of a game: Section 1: Initialization Allocation Of Required Memory Set Variables Open And Load Files Load Images, Sounds, Movies, Music Set Up Player Variables (score, power, speed) Basically, this section’s purpose is to get the game ready to play. Sometimes it is important to keep the initialization separated into many
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
functions, so when you want to reset certain variables, you can call on the appropriate init function. Section 2: Game Entrance Loop Back Point For Every Game Cycle Actions Of The game Begins Section 3: Game Logic AI For Enemies Collision Detection Setting Of Variables D O N OT M IX G RAPHICS A ND L OGIC , K EEP T HEM S EPERATED This is the section where you would give the enemy some brains, and do some processing. Section 4: Movement Move Objects Scale Objects Rotated No Drawing Yet, Just Changing the Location Variables Again, no drawing is done yet, this section comes after the logic, when you would determine how much the enemies would move, this section would be when you add that value to the enemies location variables. Section 5:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 19

Game Programming - The Ultimate Game Programming Tutorial -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online