Hello!
It is Friday so we’ll end the week with another fun post. Today we have a game called “Kill The Ghost”. This example uses the GLCD shield that we have been showcasing for the last few weeks. The goal of the game is for the user to take out the Ghost with arrows. You are given a number of Arrows to hit the Ghost with. If you are successful then the Ghost is no more, if you lose, well…you get slimed. The Ghost has a life meter on the screen so you know if you are getting close.
Forum Post Attachments:
At the bottom of this post we are including the following items:
- Example Project Zip File
- Zip File of Images
- Project Schematic
- Component Configurations
Components Used:
The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:
- SPIM (SCB based)
- TCPWM
- CyClock
- Logic High ‘1’
- CapSense
- CyPin
The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.
Firmware Description:
The main.c firmware is included in the example project. Please review the commented sections for more details.
The Kill The Ghost game is similar to our previous games released earlier in this example series. In this example we are not using the GLCD component, but instead using the SPIM component to drive the GLCD display. In this game we are displaying text onto the screen as a general messaging, informing the user of the game functionality.
Once the game starts the Ghost will appear and begin moving around the screen in a random manner. The user then moves their finger along the CapSense Slider to move the arrow’s flight pattern. The Slider centroid value is used to calculate the arrow’s display position. The user moves up and down the slider as the arrow flies across the game screen. If the arrow strikes the Ghost, then down goes the Ghost’s ‘life’ meter (disregard the fact that the Digital Ghost is already dead J). Once you have reduced the Ghosts ‘life’ meter to zero you have won and the game presents you with a victorious message.
Hardware Connections:
There are two connections needed to play this game. First the user will need to connect the GLCD shield to the Pioneer board and also connect a wire between the RX and Pin 9 connections
Test Your Project:
Once the kit is programmed you will see the main messaging on the LCD screen, place your finger on the CapSense slider to move the flight of the arrow to hit the Ghost.
I hope this example can help you out in your design.
Best,
Matt


