Hardware Reference
In-Depth Information
Listing 11-6. Self-Play for Stack It, Part 3 of 3
void exitSelfPlay(){
GD.voice(0, 0, 5000,254 ,254);
GD.putstr(0, 0, " ");
while (digitalRead(2)== LOW){
resetPlay();
selfPlayCount = 0;
logoCount = 51;
moveToneflag = true;
}
GD.voice(0, 0, 0, 0 , 0);
} // end exit self play
The Finishing Polish
With Listings 11-4 through 11-6 added to the initial Stack it code and working, the game has moved from a proof of
concept to nearing completion. The sprites can be formalized, backgrounds can be created, and coin mechanisms
and ticket dispensers can be integrated. The cabinet can be constructed and extras can be added to complete the
game for an arcade. By working on small components and adding them to working components one at a time, a fairly
complex game can be developed easily.
It is possible for games to quickly outgrow the Arduino Uno hardware by sheer number of pins or memory space.
Using other hardware is always a viable solution, but it is always best to make an attempt to create something on
less-equipped hardware. This helps developers create efficient code, which can always be ported to different systems.
If the Arduino Uno is not capable, the next step for more pins and memory might be the Arduino Mega. If you've
outgrown the Gameduino, you can modify the processor and upload it to a bigger Field Programmable Gate Array
FPGA. Some clones of the Gameduino have also added extra RAM, such as the MOD-VGA made by Olimex
( http://olimex.wordpress.com/ ).
The Gameduino is an SPI device and can be connected to any master SPI-capable device. Figure 11-7 shows how
to connect the Gameduino shield to an Arduino Mega. This set up opens other opportunities for creating interesting
gaming platforms for example integrating hardware such as the ADK Mega and Android devices with the graphics
capabilities of the Gameduino. Stack It can be uploaded to an Arduino Mega without any changes to the code by
selecting the proper board and connecting the Gameduino as per Figure 11-7 .
 
Search WWH ::




Custom Search