Version 1.0.0  5-12-2003 by Christopher J. Demers

CJDSimpleGame

You can give me feedback ( Christopher J. Demers ) about this game.  Please include "CJDSimpleGame" in the subject line to make it easier for my mail filter to separate it from the 10 tons of spam I get every day.


Screen capture (the normal play window is larger).

Disclaimer:

This is Beta code.  I have not tested it very well. If I waited until I was done to post this code it might never get posted. ;)  Make sure you have working backups and use this code carefully.  Neither I nor any entity with which I may be associated will be responsible for the use or misuse of this code.  Use it at your own risk.

Background:

A young friend of mine is interested in learning to program.  It occurred to me that he might find it interesting to see what could be done in Dolphin Smalltalk.  I also remembered back in my high school days that a friend of mine wanted me to write a video game.  I never did get around to it so I thought this might be a nice opportunity to revisit that idea.

I do not currently play computer games.  I generally find them to be a waste of time.  I never got into "Doom-like" games, they just made me dizzy.  Tetris was more my thing.   So I may be a little out of touch with what makes a good game.  I chose to develop a very simple "tank shoots flying saucers" type game.

The package includes 14 classes.  Every important visual element is modeled by an object.  Even the individual shots are instances of a projectile class, the explosions are instances of an explosion class.  There are vehicle classes flown by pilot classes.  The visual objects have positions and speeds and know how to draw them selves.  A DoubleBufferedView for the drawing.

This release is rather rough.  I developed it in about 9 hours spread over a weekend.  I tried to tweak the parameters to make it challenging yet playable.  In the future I need to add some way for the user to adjust the skill levels.  I think I also need to limit the firing more.  It is too easy just to keep firing a continuous burst of shots.  When a ship is destroyed all its shots disappear.  I think I am considering this a feature rather than a bug right now. ;)  Once I get the skill level right I will add a high score type thing.

The game seems to play well on 2ghz machines.  I imagine it should play well on lesser machines as well. I would be interested to hear what kinds of machines it bogs down on.  I have NOT optimized my code at all yet.

I developed the program in Dolphin Smalltalk version 5 (developed by Object Arts) because that is the language I use the most at the moment.  It is a powerful pure object oriented environment.  I have included the source code in the zip file at the bottom of this page.

User Description:

I have a compressed zip file available for download.  That file contains the compiled stand-alone program EXE, supporting files (sounds and graphics), and the source code package (CJDSimpleGame.pac).  The directory structure of the zip file should be preserved when it is extracted or the program will not be able to find its resources.  There is sound in this game, make sure your volume is set appropriately.

Download:

By downloading this file you are accepting the disclaimer at the top of this page.  The source code is included.  Feel free to make changes.  But please do not redistribute any part of this program this without my permission.

Download here -  CJDSimpleGameV100.zip (626 KB)

Hit Counter visits since 5-12-2003


See my other Smalltalk tools