by Donald Bartley
It’s Time to Play!
Stamp Pong With the ezVID and BASIC Stamp 2
When I got my first computer in the early 80s,
there was an immediate attraction. Hours and
hours of playing turned into weeks and weeks,
which turned into months and months. I was hooked.
Once I had the language down, the first thing I wanted to
do was write a game. For my first game, I thought big. It
was going to be the game of games. I spent weeks writing
the code on paper. (I didn’t have a storage device at the
time, so I had to write my programs out completely and
then type them into the computer in their entirety.)
Anyway, the day came when the program was done and
I spent all night typing it in. At 2 o’clock in the morning, I
was about 80% complete and my VIC- 20 gave an out of
memory error. I played the game as far as I could and it was
still magical. The lesson to be learned was to write efficient
code. That was not my last game or my last computer. That
love affair has gone on for many, many years. I ended up
in hardware with an electrical engineering degree, but I
sometimes think about those old programming days.
Recently, while working on a project, the ezVID was
created (by accident, of course). When I first saw the
prototype of what was going to become the ezVID, I
thought about some interesting possibilities. I have been
using microcontrollers both personally and professionally
for some time. One of the microcontrollers I like to
play with is the BASIC Stamp 2. Could this new prototype
be used with the BASIC Stamp 2? Could this be a
microcontroller video card? Could the BASIC Stamp 2
handle game code and graphics? Could it be as fun as it
was programming my first game into my first computer?
When the ezVID was completed, the final product
sported a resolution of 188 x 254 with 14 different colors.
There was a ton of custom character memory — 256 possible
— which is needed for any good game or graphics program.
To handle all the basic stuff — such as letters, numbers,
punctuation, and basic symbols — the ezVID comes with a
standard, built-in library of 63 characters. It has an
asynchronous TTL level serial interface, power connections
(+ 5 VDC and common that the user has to supply), and a
standard RCA style jack for the video output. The video
output is NTSC non-interlaced composite video and is compatible with any television, VCR, RF modulator, or any other
piece of equipment that accepts this type of video input.
Where to Begin?
Figure 1. Schematic for Stamp Pong.
SW1 1/8W 5%
SPST Monentary NO
NUTS & VOLTS
4-Pin ezVID Header
Now that it was all together,
what game should be made first? It
was obvious after a few moments
of thinking that the answer has to
be Pong. Pong looks about as
basic as a game can get, but it
does have a good handful of conditionals that have to be monitored
and — if you really want to get serious
— the laws of physics can be
programmed into it to give the ball
deflection vectors based on what
angle it hits a wall or paddle.
For the BASIC Stamp 2
version, the laws of physics will
have to be left out and only the
conditionals will be looked at, along
with ball speed increments, to make
game play harder as you go.
To play games, it takes a little
more than an ezVID and BASIC
Stamp 2. The main ingredient
that’s missing is a game controller.
Every game you play has some
form of user input, whether it is a