Our design project will be creating a miniature golf software game, using
the Atmel Mega32 Microcontroller with the STK Development board.
The mini-golf program will consist of 1 and 2 human player modes, with at
least 1 18 hole mini-golf course. The
golf course will be pre-built in memory, just as it would in any hand-held
miniature golf game, or real mini-golf course.
The human interaction will consist of determining the shot direction and
power using a keypad input. At this
point, we predict a timing based system, similar to how a golf shot is performed
in any standard PC video game, to determine the speed of the shot.
A timer is started when a user presses a certain “begin shot” button,
and is stopped when the user presses that button again.
The user will be able to see the power of his shot, based on a power
meter displayed on the screen. This
will require direct interaction between the timers and the output to the TV,
with this requiring real-time synchronization.
At this stage, we feel it is relevant to
establish goals for this project. Based
on the time and difficulty in implementing this project, we anticipate three
levels of completion. This first,
basic task level, is to develop a mini-golf program for 1 or 2 human players,
using a keypad to interact with shot speed and accuracy.
If we are able to get this working, with time to spare, our second, more
difficult goal, is to develop artificial intelligence for 1 player, so that one
user can play against a computer. Lastly,
another difficult accomplishment would be to develop a method to use an actual
putter to determine the shot speed and accuracy.
Several standards will be used to accomplish the implementation of a
mini-golf game with the Atmel Mega32 Microcontroller.
Due to the use of the television, we anticipate adhering to the EIA
RS-170 Video standard, without interlacing.
This standard defines the basic black and white video format for TV for
the United States. It defines that
a horizontal sync pulse, defining a new line, to be a switch from .3V, to 0V,
and back to .3V, where it is at 0V for 4.7us.
It also defines the vertical sync pulse, defining a new frame, to be a
switch from .3V to 0V, for 63.55 us, back to .3V for 4.7us, repeated 2 times,
and then reverting back to .3V to signal the end.
1.0V defines the color white on the TV screen, and .3 defines black. Anything in-between these voltages is a shade of grey, and 0V
is the synch pulse voltage. Further,
we will be communicating through the serial port to the microcontroller, so we
must adhere to the RS-232 standard. The
RS-232 standard defines flow control, baud rate, and handshaking, among other
parameters, which enable communication between the controller and the PC.
For RS-232, both devices must be set to a specific baud rate, which will
be 9.6K. RS-232 uses inverted
logic, where a logic 1 is at a -10V, and a logic 0 is at 5V.
The beginning of a transmission begins with a change from logic 0 to
logic 1, and then a start bit. Based
on the baud rate, the next 8 time ticks are bits 0-7, with the end of the
transmission being a stop bit, characterized by a logic 0 voltage.
Societal Impact: This being a video game, controlled by software, there are not too many societal issues to face. Of course, the issues of using a television can negatively affect your eyesight, and can even cause seizures and epilepsy. Further, repeated use of a keypad with the mini-golf game could result in fatigued muscles, or ever more severely, carpal tunnel syndrome. More seriously, if we are able to implement using an actual putter to determine put speed and accuracy, more safety considerations arise. The implementation of this putter may involve the use of lasers, and photo detectors. Lasers can be a very serious hazard, and can permanently damage eyesight. Photo detectors and lasers both require a source of power, which is not yet determined. However, any external power source is dangerous, and must be contained safely.
Another consideration to factor is human usability. Miniature golf is a very simple game, likely played by millions of people around the world. The rules and dynamics of the game are not as complicated as real golf, and are easily controlled in a computer game. There are a simple number of strokes required to get a golf ball into a hole, called “par.” The number of strokes is takes to complete one hole, added to the total from the other holes, give you your final stroke total (of course, the lower number, the better). Basically, understanding the operation of mini-golf is trivial. Base on the input of the user, whether it is a keypad, other controller, or an actual putter, we will have to pay more attention to the difficulty for the user. Using a simple keypad, or adapted controller, is relatively easy for the user. Even people with special needs should not have too much difficulty pressing a simple button to put the ball. The use of a putter, however, will be more difficult. The putter brings real skill into the game, for not every person can put a golf ball straight, and accurately control the distance it rolls. Also, the putter is a fixed height, so not every person can use the same putter, unlike how every person can use the same keypad input. Perhaps we will include an option for the user to select putter of keypad input.
The game of miniature golf is not a registered trademark, and we do not anticipate running into any intellectual property issues. However, if we decide to use a Nintendo controller as a keypad input, though we will have to hack the input/output signals, we will have to note that we use hardware developed and manufactured by Nintendo. We will also be using code developed by Bruce Land for the TV input, and well as other code developed by him and the ECE476 class from using RS-232 in lab.
Overall Hardware System Schematic
Atmel Mega32 Microcontrolled
STK500 Development Board
Input device (keypad/NES contoller)
Putter (provided by Matt)