Skynet Advance

A GameBoy Advance game written in C.

After learning how to control pixels and using direct memory access (DMA) in the GameBoy Advance environment with the C language, it was time do a project that was more complex rather than creating shapes on a GameBoy screen. Therefore, this basic game, Skynet Advance, was created and based off of the Terminator world involving Arnold Schwarzenegger as the hero.

The main components to this game involve DMA, collision detection, projectiles, artificial intelligence, two-dimensional movement and physical limitations of the hardware. Direct memory access is used instead of setting each pixel because DMA simply is faster and allows for more on-screen action before hitting hardware limitations. In the GameBoy environment hardware limitations are a reality that must be dealt with and thus code must always try to put the least amount of stress on the CPU otherwise screen tearing and game crashes/freezes will occur. In a dynamic environment like a video game, there will be many moving objects on screen that the CPU would have to compute its location and other processes. To allow the CPU to focus on other computations within the game, DMA is used to completely bypass the CPU in fast-copying data from memory to its destination on screen.

Collision detection is handled by each object of importance that can undergo a collision contains an invisible point that when this point comes within a certain distance of another invisible point then it is counted as a collision. Projectiles are handled through a combination of DMA and collision detection. DMA is used to constantly fast-copy onto the screen at a new location 1 pixel away in the players last known direction.

The artificial intelligence is what gives the illusion that the enemies are always after the player character. This is done by using the same invisible point from collision detection and also giving it a (x,y) coordinate on a 240 x 160 plane. Each enemy Terminator's sole priority is to make its (x,y) coordinate match the players (x,y) coordinate. While the player can move at a steady pace of x pixels per second, the terminators are on a random 1/3 chance to move x pixels per second so that they do not move at processing speed (which is almost instant to humans). Two-dimensional movement is based off of the (x,y) coordinate plane and having DMA fast-copy the image onto the correct coordinate based on player button input.

The story begins with an off-screen hero programmer who is the only one left alive that can write assembly and reprogram captured Terminators. This assembly programmer then reprograms the most Elite version of Skynet's Terminators, the Model T-800. This reprogrammed Terminator's mission is to simply destroy all traces of Skynet through four basic levels.

The player is equipped with a weapon that shoots a pulse laser. The enemy Terminator's take about five pulse lasers to die. The player can lose health when the enemy terminators are in close proximity of it. If the player's energy reaches zero, a splash screen is shown showing a now deceased player character.

Otherwise, if the player beat the four levels of the game a splash screen shows a mission successful screen that embraces the ending of Terminator 2.

If you have any questions or would like to see any of the source codes please ask and I would be more than happy to explain and share them! Also feel free to ask for a copy of this game, and I will send you a link to the game with instructions on how to set everything up!