Posts

Showing posts from April, 2007

Are you ready? Let's code game boy

Image
Let’s get started. Steps to code our first game boy Project. First, open Visual HAM Second create new Project Third write code Fourth Select – Project – Execute – Build, then Run in VBA That’s it , your first console game…

The history

Image
� When I was young I began to program GW-Basic, then come to light Turbo Basic, Great!! .bas code made .EXE. Then I found pascal and I discovered some hidden books about programming graphics with it. I tried to read a BMP from file with PASCAL, when I did it, I began to write some code to emulate something like “Galaxian” (Do you remember?, some spaceships falling and shooting). Then I needed a kind of tool to draw my own bitmaps, and I wrote it. My firs BMP tool!. (I’ll upload to my site soon). Then I began to program PAC-MAN, and some of my students at a small computing school learned how to make their first game. Only one student finished the game. (And me, J ). Then, I discovered the fabulous and fantastic C, and C++ programming language when I was a student at “Instituto Tecnológico de Aguascalientes” and I began to probe it, it was really fantastic, memory, arrays, pointer, wow!. even serial and parallel port control. Then I wrote some game code with C++. Actually I’m still writ

Programming GameBoy Advance

Game boy released in 1989 is a fun device to program, you’ll using C++ of course. We’ll use the Advace SP version to test our code. List of components: A computer with Windows 2000, XP, or Vista Visual HAM http://www.console-dev.de/visualham.html  and HAM SDK http://www.ngine.de  (Better if you can get a Nintendo GameBoy SDK) or you can use Visual Studio 2005 instead (with HAM of course) If you want to see your code running in a real GameBoy get a Flash Advanced Linker or a writable GameBoy cartridge. I got my own in http://www.lik-sang.com (Now the page is down but you can search with “GBA Flash Cartridge “ and buy one.) Of course, a Game Boy,  I have a beauty blue Game Boy Advance SP. (For those who know I bought it at “ La línea ” J )   Remember, it is pure C & C++. More on nest blog…    

Components of a game

Components of a game   Basically a game has the following components   Initialization Standar operations, variable creation x=0; game_status = INIT; … (Notice you will use C++) Enter game loop The process enters the loop while(game_status != game_over)… Retrieve player input Catch keystrokes and input devices signaling … Perform AI and game logic AI = Artificial intelligence (It’s serious, even pacman has AI) Physics = Do you remember parabolic shoot formula? Math = 2D & 3D matrix Calculate images = More, and more math, Create 3D objects = Load 3D templates created on 3Dstudio, Truespace, Maya, blender(free!) Render next frame Is the new image read?, Render.. Copy from memory to screen Synchronize display How many frames will you render in a minute? Usually 30fps Put a delay between rendering scene

Think about it: FUN

If you can imagine your self playing your own game, it's done. If you are starting to write code without a clear idea about you are going to see in the screen, you are lost. Just think about it: FUN. This game should make have a lot of fun. It doesn't need the latest AI and 3D engine to be fun. What is your choice? Pac-man or a boried 3D game? Do you understand?