DALEKTRON Game in Smalltalk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

DALEKTRON Game in Smalltalk

Andy Bower-3
Folks,

My eldest son, James, is now nine and I thought I try and teach him
some Smalltalk before the spectres of the curly braces get hold of him.

Since he is big into computer and console games it seemed a good idea
to try and build some sort of game in order to, at least, start out
with a fair amount of his interest. We decided to couple this with the
"Doctor Who" fever that has been sweeping the UK after the release of
the new BBC TV series this year.

Those who don't know what I'm talking about may, at this point, need to
use Google or take a look at the following links:

http://www.bbc.co.uk/doctorwho/
http://en.wikipedia.org/wiki/Dalek

Anyway, the result of our efforts is a game called DalekTron written in
Dolphin Smalltalk version 6. It's loosely based on an arcade game
called RoboTron that I used to play in the 1980's when these things
were all the rage and needed a constant source of 20p coins (quarters
in the US).

If you'd like to see some screenshots of the game before you decide
whether to bother downloading it, here they are:

http://www.object-arts.com/downloads/misc/DalektronSplash.png
http://www.object-arts.com/downloads/misc/DalektronTitle.png
http://www.object-arts.com/downloads/misc/DalektronInPlay.png

This is the actual download:

http://www.object-arts.com/downloads/misc/dalektronsetup.exe

 From the educational point of view, this exercise has taught me quite a
bit about the complexity of Smalltalk with regard to children. James
has certainly picked up a lot of stuff about game building and some
stuff about programming but he is far from being able to "go it alone"
with any actual code creation as yet.

He does, however, seem to have picked up on the idea of classes (with
their behaviour and inheritance) and he seems to understand quite a lot
of what I'm doing as I make modifications to the gameplay following his
suggestions. These changes are, of course, done dynamically while he is
in the midst of playing the game.

BTW, I defy anyone else to say they have refactored a running DirectX
game using any language other than Smalltalk. I have moved classes
around the hierarchy, renamed them, extracted and renamed methods - the
works, and the only comment I got from James was that the frame rate
dropped slightly and cost him a few points here and there.

 From the Smalltalk point of view, I think this is a great example to
show that speedy, small and fun things can be done with the language,
especially if you couple the higher level stuff with some lower
level code like DirectX. Speed-wise you should find that you get 25FPS
if you're running on a reasonable machine. Note too, that the raw rate
I achieved was some 60FPS but I have throttled it down to 25FPS in the
release for consistency).

As for size, although the download is in the region of 17Mb, the actual
application code is a Dolphin EXE of only 700K (and this also includes
the virtual machine). Hence, most of the download is actually media
resources, which is probably as it should be for most games these days.
Given this, I again defy anyone from curly brace land to continue to
label modern Smalltalk as "bloated".

DalekTron was written using the forthcoming Dolphin 6 and the source is
included as packages in the install directory. However, if you try to
load these directly into a Dolphin 5 image it will most likely fail but
the wily amongst you may be able to find a way around this (at least
for the time being until D6 is released). I don't think there is any
reason per se why it shouldn't run in Dolphin 5 once it is loaded up.

<NERD>
BTW, if you are a Doctor Who aficionado, you will no doubt immediately
notice that each level in the game corresponds to a particular Dalek
series from Doctor Who past and present (with an additional couple of
James' own devising). See if you can work out how many different levels
there are in the game and spot all of the different types of Dalek.

And, while you're at it, try and beat James' high score of 3.9 million
:-)
</NERD>

GOOD LUCK and please let me know what you think.

Best regards,

Andy Bower
Object Arts Ltd


Reply | Threaded
Open this post in threaded view
|

Re: DALEKTRON Game in Smalltalk

Stefan Schmiedl
On 10 Jul 2005 23:35:42 GMT, Andy Bower <[hidden email]> wrote:

> This is the actual download:
>
> http://www.object-arts.com/downloads/misc/dalektronsetup.exe

Now we know why D6 takes its time to get finished :-)

The game looks great and is very playable, but it needs a way to define
the keyboard layout, as "z" on my German keyboard sits where "y" does on
yours.

> And, while you're at it, try and beat James' high score of 3.9 million
> :-)

First run: 14000 ... I'm feeling so old ...

s.


Reply | Threaded
Open this post in threaded view
|

Re: DALEKTRON Game in Smalltalk

Chris Uppal-3
In reply to this post by Andy Bower-3
Andy Bower wrote:

> And, while you're at it, try and beat James' high score of 3.9 million

It's a good job Dolphin has a fast LargeInteger implementation....

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: DALEKTRON Game in Smalltalk

Janos Kazsoki
In reply to this post by Andy Bower-3
Andy,

very impressed about the possiblities of programming games too in
Smalltalk.

In D5 the Package Browser tells at installing the package that it needs
the DirectShow as pre-requisite as well. Is there one somewhere around?

Thanks,
Janos


Reply | Threaded
Open this post in threaded view
|

Re: DALEKTRON Game in Smalltalk

Andy Bower-3
In reply to this post by Andy Bower-3
Folks,

I noticed that some links to our DALEKTRON game have found their way
onto a number of Blogs. Hence, I thought it best to point out (here,
for want of a better place) that the location for the game has been
changed and it can now be found at www.dalektron.org. I'm hoping that,
in some small way, this can be seen as a Smalltalk advocacy site.

The game now also supports a web-based global scoreboard with the
server also written in Smalltalk (Swazoo). The complete deployed server
is
only 670K while the game EXE is still at around 750K.

Best regards

--
Andy Bower
Object Arts Ltd
www.object-arts.com