Games

NOTE: When running on Windows 10, make sure you set the DPI scaling to 100% (normal size). If you have the DPI over 100, it will lock the mouse cursor in the corner of the window.

I just made a video game called Aspirin. This is my first post regarding this game.
It is a video game that only exists (as far as I know) on the TI graphing calculators. This version I made is for PC. There are many enhancements to the game. You can run it at whatever resolution you want and there are monsters (pacman) (unlike the original). The graphics are very basic, but it’s still fun. The arrows are super simplistic for a reason. If they were too fat (using an actual graphic instead of a line), it would make the game much harder.

It is an action/arcade type of game. The object of this game is to move your character (the yellow smiley face) around the screen to collect the balls. There are two balls appearing at a time. When you get one of them, you gain 1 point, and a horizontal arrow appears and keeps shooting in the same direction over and over. When you get the other ball, it’s a vertical arrow. You will die if you are hit by the arrows. Occasionally, a pacman will come from the side of the screen and try to steal the balls from you. If he does, you lose 1 point. The pacmen do not kill you – they only steal the balls. It’s hard to describe. Just play it.

Please give me feedback if you try it. It’s super easy. You don’t need to download anything other than 1 EXE file and it’s less than 1 MB.

All files are for Windows 64-bit version 7 through 10.

Aspirin V1.7: https://drive.google.com/uc?export=download&id=17Iq5ZfbY3ttfgPh0YPP6qpNIqLyR0KqK

Aspirin V1.5 400KB: https://drive.google.com/uc?export=download&id=1LnDbNCWmr4G8DqF5Vif-J_oixhDgE-4L

Aspirin V1.4 389KB: https://drive.google.com/uc?export=download&id=15V_PrnDvf0tg3zem93ioaT57XfPxCr-o

Original V1.0 with no monsters: https://drive.google.com/uc?export=download&id=13QkIR4kkNxuDHFki7tl3LJMR75wkA2iR

100% native. No runtime engine, no installation. In the next version I will reduce the monster frequency, add bonus points, and music.

So in order to make DOS games in 2021, there are several options. None of them are perfect, but after studying all the options, I’ve discovered the two options I believe to be the best. There are more options if you specifically want to make adventure games. For that you can use either, an old version of AGS, AGI, SCI Studio, or SCI Companion. However, this article will assume you want an open ended system that will allow you to make any type of game. You will need to know C to continue.

I narrowed it down to FreeBASIC and OpenWatcom C. This article will specifically focus on OpenWatcom with the Allegro game engine. I found this to be the best choice for multiple reasons including speed, flexibility, and development on Windows (instead of inside DOS). OpenWatcom was also the compiler used to make DOOM and it’s very fast compared to the primitive Turbo C and the GNU DJGPP. The fact you can build your games in Windows helps a lot too because you can read the code on an HD screen and not be limited to the low resolution of DOS.

So to start out, you should probably download the PCX plug-in for Paint.NET. This will allow you to produce an old compressed image format that can be loaded by your game. The other option is just using bitmaps and that will use more space. And no, there’s no JPG, PNG, or GIF here 🙂 PCX is basically an old fashioned PNG file.

1. Now you can download OpenWatcom V1.9 from their main website. Version 2.0 might also work, but I didn’t try it. Now install Watcom with all the DOS options enabled.
2. Goto this link and download the alleg.lib: http://matejhorvat.si/en/dos/allegwat/allegow.zip
3. Download the allegro source and extract: http://cdn.allegro.cc/file/library/allegro-4.2.3/all423.zip
4. In the directory you extracted, run fix.bat watcom.
5. Copy the lib you downloaded to .\WATCOM\lib386\dos
6. Copy the fixed include files from the thing you extracted into .\WATCOM\h
7. Comment out line 36 in .\WATCOM\h\ALLEGRO\PLATFORM\ALWATCOM.H
8. Open Watcom (LITERALLY – Open Open Watcom) and make a new project – choose 32-bit DOS using DOS/32A LE.
9. Goto Linker Switches #2 and put alleg.lib under Libraries (NOT Library Files).
10. Goto C Compiler switches #5 and disable stack depth check.
11. Goto C Compiler switches #10 and select 80386 stack-based calling -3s.
12. Now you can just add the exhello.c (hello world example) to your project and do a makeall.

It should now be working and have made an EXE file about 757KB.
(Make sure you are adhering to the C89 standard. So basically declare all variables only at the beginning of code blocks and make sure all functions/methods are written above what’s calling them.)

When you create the watcom project, I recommend using DOS/32A LE. This way it’s smaller and there is no need for an external DOS extender like DOS4GW. Initially my EXE was 757KB which is really big just to draw a sprite, so I ended up following the guide here:
https://liballeg.org/stabledocs/en/alleg043.html

…which made my EXE down to 500KB with no sound enabled (I’m going to use PC speaker). It’s still bigger than I expected, but I couldn’t figure out how to further optimize. I tried the space optimization in watcom and it only saved like 5KB. So I downloaded UPX for DOS and applied -9 compression and got 200KB. And that’s with the DOS extender linked in, so that’s good enough for me.

I’ve recently been working on a small game in PureBasic. It’s mainly just to get used to programming in PB. I tend to use C# all the time now and never really got heavily into PB. It is an excellent programming language and despite basic being in the name, it is not a “basic” language. There are several differences. I’d wager that this is one of the best languages of all time. The only problem is that its syntax is a little odd and I think that keeps programmers who are used to the C style languages away (which is most programmers). The main aspect that I believe makes it so great, is that it goes all the way from a very easily understandable/human readable language, down to binary. There is no runtime engine at all. It runs everything directly on the CPU with no interpretation engine or virtual machine. The problem with most programming languages now a days is that they almost all use a runtime or virtual machine. This creates a huge overhead for the CPU and can cause programs to run a lot slower than they would if they were running directly on the CPU. Languages that compile directly to binary are usually harder to understand and more cumbersome for the programmer.

Programmers have become accustomed to high performance hardware and have gotten lazy about coding. PureBasic is elegant because it still seems to hold the old philosophy of speed and small code. I think programmers need to be taught some philosophy on programming rather than just the logic. It seems that European programmers (especially Russians) do understand this. The exes produced with this language are also incredibly small. Just like cars and government, more unnecessary layers of shit are added as time goes on. More overly complex layers that eventually get to the point where no-one person can understand the whole thing. And the laziness/lack of care of never taking the time to remove those layers. This is what Windows 10 has become and why I refuse to upgrade. I will eventually run Linux when I simply can not use Windows 7 anymore.

Anyway, without further a dew (that’s probably not right, whatever).

Here is the game. I have included the source code in the archive. I know probably no programmers will read this anyway though. The game might not be optimized in terms of difficulty. I was more focused on getting used to the language rather than nitpicking away at the game dynamics.

You play the game by moving the tiny orange fish around with the mouse and start by eating only the smallest fish until you grow bigger and can start eating the larger ones. Eventually, when you win, the fish bloats up and gets larger than the whole screen – that’s a bug, but I thought it was cool, so I left it in.

https://drive.google.com/open?id=1Mn9fv4tF86tww63vCyfmWocs-9r-QvHq

Oasis is an adventure game that I created using AGS. If you don’t know about AGS, it is a program that allows you to create adventure games that are similar to the old Sierra games from the 80s. Kings Quest and Leisure Suit Larry are probably the most well known.

This is my first official game made with this software, so it may have a few bugs, but it appears to be working pretty well.

Oasis takes place in the desert. You wake up there after receiving a mysterious message from a shaman. You have to survive and find your way out. This is still the alpha version, so it is missing an introduction (making the story incomplete). If you think you’ll like it, then wait for the full version. If not, then download it and get off my site 😉 No, actually, I’d really appreciate some comments regarding errors or suggestions.

Download here: https://drive.google.com/open?id=13s3pkEGFC7SdMcN5wGZh_j_KdEEcMNoc