Console Critters
- A fruit-machine, text-mode style.
Licensing
At a later date I'll probably license this under the GPL, but for the time being I'm only releasing the binaries, and these you can do with as you wish bar one thing, I request that you don't attempt to take credit for it yourself.
I should point out that this software utilises a number of sound effects files. To the best of my knowledge they originally came from freely available sources on the internet. If you are the copyright holder of one of these sound effects and want me to remove it, please feel free to contact me and we should be able to sort things out amicably between ourselves. Not a problem.
- Jamie Thompson
Preamble
Console Critters in Action
This was an assignment from the second semester of my degree. Our task was to build a fruit machine, preferably using the Windows console. Whilst we were allowed to use any API, I decided that limiting myself to the console and exploring what I could achieve would be a worthwhile exercise, so thats what I did.
I experimented with the console API functions available and determined that double-buffering was possible, enabling flicker-free animation. This was good. I also experimented with various methods of obtaining input and eventually settled for the simplest solution, the generic Win32 GetAsyncKeyState(). I deliberated adding mouse support, but it seemed superfluous and would have complicated the input mechanism immensely, so that was left for a later date.
Another interesting highlight this software features is the scripted user interface layout. In an assignment the previous semester (that I had to learn Pascal for) we we tasked to build several small applications. Whilst developing these I mused upon something that I'd considered doing for awhile, scripting the interfaces rather than hard-coding them in. In Console Critters, you will find the FORMS file, this contains the layout. You can add buttons etc, but of course there will be no logic driving them as the scripting could better be called a template engine, essentially in the same vein as dialog box resources are with the Windows API.
As an added touch (and to add a differentiating factor), I also added support for rudimentary sound effects. These are just PCM .wav files played on certain events, but they work extremely well in my opinion. It's a shame no-one would lend me a set of headphones/speakers when I demonstrated it to the tutor so no extra credit :(
Installation
- Just unzip and run the executable. It really is that easy.
Notes
Each button on the screen corresponds to a key on the keyboard, the one to press is labeled under the button.
NOTE: numlock needs to be on.
This should work just fine on Windows 98 or newer, but don't quote me on that. I got rid of my last Win98 installation many moons ago.