Full Version : 2002 LCD Golf Game (AVR)
avr >>GAME & VIDEO PROJECTS >>2002 LCD Golf Game (AVR)


AVR_Admin- 04-26-2006
The objective of this project was to create a game of Golf, programmed in C, on an ATMEL Mega163 Chip, and utilitzing a LCD. We decided to use a Nintendo Entertainment System (NES) Controller for the input, and a Hyundai HG25504NG-01 for the LCD display.

:[THE OVERVIEW]:

The golf game incorporates numerous aspects of the real game. Unforunately time contraints limited the number of features possible, but included in the presented version are:

Four clubs: Wood, Iron, Putter, and Sand Wedge
Power and Direction controlls
Stroke Limit
Sand Traps
Each course is randomly generated to prevent the game from becoming tedious.

USER INPUT:
Control for our golf game is the same as for the original 8-bit Nintendo Entertainment System (NES). We use one controller with the famililar A, B, Select, and Start buttons, as well as a 4-directional pad. Specific directions for using these controls are displayed on the LCD. As an added feature, simultaneously pressing the four buttons restarts the game (similar to some NES games).


Program Design
The program runs three independent state machines: An Input for the controller, a debouncer for the controller, and the state machine for the game. These 3 interact as follows: The controller function polls the nintendo controller out of PORTC as discussed in the low-level design page, and sets a temporary variable. This temporary variable is checked by the debouncer program to debounce the input so input is only taken on the release of the button. The golf game state machine checks the variable set by the debouncing program in order to check what it should do.

Link: http://instruct1.cit.cornell.edu/courses/e...mh23/index.html



Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.