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 discovered (through the use of procmon.exe from sysinternals) that both Firefox and Waterfox make a ton of read/writes to the drive. This will wear out SSDs very quickly. My Waterfox installation was writing GBs worth of data to the drive in only a half-hour AND this was while I just left the browser sitting on YouTube. I was not doing anything in the browser and yet still, it manages to write this much data. SSDs do not have an unlimited number of read/write cycles – eventually they wear out. By making the optimizations I will describe in this article, you will be able to make your SSD last a lot longer.

*** NOTE: If you want it really good (but it will be more effort) goto RAMDisk first ***

I always start out optimizing my install by typing about:config in the address bar. Accept the risks and continue. Type in “cache”.

You will see several entries for cache. Disable “browser.cache.disk.enable” and “browser.cache.offline.enable”.

Look for “browser.cache.memory.capacity”. If it doesn’t exist, then scroll to the bottom of the page and select “Number” and press the “+” button. Type in the amount of RAM in KB you want to use. I put mine at 2097152 (so about 2GB, but you can put more. This is more than enough however.)

Now search for “sessionstore” and look for the value called “…interval”. Change that value to a very high number. I put mine at 1800000. This constantly writes the state of the browser to the disk, so incase it crashes, it will restore everything. Just leave it alone if you are worried about crashes not restoring to your most recent tabs. My browser never crashes, so I turn this up super high so it doesn’t keep writing. You can get an add-on to save your tabs with a click at your discretion if needed.

You may now also search for “telemetry” and disable as many of those as you want. Since I’m using Waterfox, all of this is already disabled for me. I recommend using Waterfox instead of FF if you don’t want any tracking.

Search for “datareporting” and disable that.

If you don’t want your browser to save screen shots of your tabs, then search “pageThumbs” and disable it.

RAMDisk:

Now, if you want to make it REALLY good, then download a RAM disk software. I use QSoft RAMDisk, but it is now somewhat defunct, so if you can’t get it, then search for a popular RAMDisk driver. Make your RAM Disk several GB. For me 2GB is enough on a system with 16GB RAM, but if you have more RAM, you can make it bigger. After installing your new RAMDisk, launch either FF or Waterfox with the -profilemanager parameter. To make it convenient, you can copy and paste the shortcut to FF and under “target” on the right-click properties, add “-profilemanager” to the end (after and not including quotes). You can now rename that new shortcut with something like “Firefox Profiles” or whatever you like.

Open up Firefox with the old normal shortcut and backup your bookmarks to a file you specify. You can press Ctrl+Shift+B to open your bookmarks manager. In there you will see “Import and Backup”. Choose that and click backup. Now close FF, wait a sec, and launch that new shortcut, it will give you a window allowing you to setup a new Firefox (or Waterfox) profile. Setup that profile on your RAM Disk. It should be self-explanatory – just follow the steps. You can make it your default profile so it starts up automatically with the old FF icon.

Once you have created a new profile on the RAM Disk, you may go back to the bookmarks window and import the bookmarks you saved. Unfortunately, they will be missing their official icons, but they will still work just fine and as you use them, they will load the new icons one by one. If you use any add-ons, you will need to reinstall them.

OPTIONAL: This part is potentially problematic AND you don’t have to do it, but if for some reason you need your Firefox to be EXACTLY the same as before, you can try this. I’ve had issues with this method, so I recommend skipping it. You may attempt to close FF and copy your old profile from “C:\Users\[your name]\AppData\Roaming\Mozilla\Firefox\Profiles” and go inside the folder with the random name like default-xxxxxxxxxx. There should only be one or two in there usually. Copy the files INSIDE that folder (not the folder itself), into your new profile folder on the RAM Disk and replace all. Now you can launch FF or Waterfox (with the original icon, if you made your new profile default) and it should be the same as before. It bugged out with my add-ons though and that’s why it’s not recommended.

 

You’re done. Now your SSD will last forever, so long as you don’t have a bunch of bloatware processes running in the background. I always completely clear my startup items in msconfig. You can look that up.

Other unnecessary things I do with my RAM Disk:

I always set my downloads and temp folders to the RAM Disk. I like having it this way cause then I know that the temporary junk files don’t keep slowly consuming more space. Setting your Firefox downloads folder to the RAM Disk is easy, so I won’t get into that. If you download really large files often, then don’t do it, but for me, I like to have my downloads be temp and if I decide they are good (something I want to keep), then I move them into a proper folder like documents.

You can open the system properties by right clicking “This PC” and going to properties on Win 10. Look for the link on the left called “Advanced System Settings”. In that new window, you should see a button at the bottom called “environment variables”. Look through BOTH lists and change all the ones labeled “TMP” or “TEMP” to the RAM Disk drive letter (usually “B:\”). This will make all the system temp files go on the RAM Disk and they will be automatically cleared each time you deboot the comp. There is no real risk to this. The only scenario that’s problematic is if a program makes a massive temp file like certain installers will copy their content to the temp folder before copying to the program files. IT’S EXCEEDINGLY STUPID, but that’s how some very rare things are – like 1 in a 500 programs. If your RAM disk is bigger than the software, it will work anyway.

I have a solution that will finally make govts sustainable. The problem is that no matter the political ideology, the ‘leaders’ will always gain too much power. People attracted into govt are the types that want as much power and control as possible; this will never change. Therefore, replacing the govt with a ‘new’ system or new people will inevitably result in failure. We can’t have new people to solve the problem of people.

Up until this point we’ve had to rely on archaic monolithic systems. Monolithic systems are never as good as modular ones. With a modular system, there is rarely a single point of failure. We can see the effects of this in operating systems. Linux is normally regarded as more stable and thus, is usually used for servers, whereas Windows (which is monolithic) is not. It is clear that we need a modular system for governance as well, but NONE of the current ideologies are like that. They all suppose a single government – some smaller – some bigger, but it’s all one unit. Secondly, the people of the country need to be in DIRECT control of the system. The way the people vote will have their best interest at heart, whereas electing politicians often results in a big disconnect because they are self serving and want the system to be as large as possible. Think of it like flying a kite vs. driving a car. The systems we have today are like flying a kite; it usually goes wherever it wants and can often dive directly into the ground. Giving people direct control over the system is like driving a car. Yes, you can still crash, but 99% of the time, you are in direct control. And the combined effort/knowledge of everyone creates a perfect image of what that society wants. It’s blatantly clear that we need a system where we are in direct control.

I call it the blockchain SOS – society operating system. And we really need an SOS anyway 🙂 The systems we have today were mostly derived before technology and so it doesn’t take advantage of the advances we’ve made. So how do you make it modular and allow for direct control by the people? Now we have the technology to do this – blockchain. Except when you mention blockchain everyone thinks of a currency. That is NOT what this is about. Blockchain tech itself has nothing to do with currency, it’s simply a redundant decentralized way of storing data. It’s like digital DNA cause every set contains the whole. So my conclusion is that we create a blockchain to REPLACE the govt (or to be implemented after a collapse, so no overthrow is required). If it’s done well, people will automatically gravitate to it after the collapse cause it’s a good way to get the system running again.

There are NO politicians. The problem is that ‘leaders’ can never solve the problem of people. The 100% way to solve it is to replace the govt and all politicians with a blockchain that everybody votes though. They all vote and rate every single bill themselves through the system. They are given karma points like on reddit depending on their participation (no matter what they vote for). Anybody can make a new law, service, or project. Each of these have a slightly different function, but the main point is that there are NO leaders and the people control the system in it’s entirety.

All of these services are provided by private businesses (completely modular). People choose to subscribe to the services that they desire – nothing more. These services can be up-voted or down-voted and given reviews like on Amazon. This way, all of the services that the govt is meant to provide comes from a private entity and they are fully held accountable. People can link their crypto currency of choice into the system and use it to pay their automatic monthly “govt” bills. There would be NO taxes! There’s no reason for them when you choose your services directly. The only complicated part is having a uniform military that acts in unison as ‘one’, but that could be figured out. In addition, it has to be an invite only system so you don’t get bots or fake accounts. Otherwise, it’s perfect. If not this, I know at least some rendition of this is possible.

BOOM! Guaranteed fix. Please spread this idea as much as possible if you see merit in it. I want to see a new open source blockchain started that implements something like this.

Saving thumbnails from youtube videos is a problem especially if it’s from a channel you don’t own. There are solutions for downloading youtube videos and there are also many websites that allow you to paste ONE youtube link to get the thumbnail. If you are backing up a youtube channel either for archival or your own purpose, there is no way to get the thumbnails and data for all the videos as far as I can tell. So I made this program. It will also retrieve data like ID, title, viewCount, and uploadDate and will store that in an index text file. You need to get a bunch of youtube links to paste in. I get them by using the Firefox add-on called “Copy Selected Links”. I can then goto a YouTube channel, click videos, scroll down, and select/copy the videos I want. If you do the whole channel, make sure you only select like 50-ish videos at a time otherwise the copy links doesn’t work. Then you paste all that into my program and it’ll save your thumbnails. It doesn’t actually take very long even though it takes a while to describe. The end goal could be an offline video archival system with another program to view the content offline and load up VLC media player or whatever.

For programmers: There’s not a very easy way to get youtube data without using their stupid API key system. You’re not meant to obtain youtube data without it, but there are ways. The one way is to use this link: https://www.youtube.com/get_video_info?video_id= and just put the ID in there. You’ll then need to decode the data with Uri.UnescapeDataString(url). It’s confusingly Uri, not Url. There are other methods of this too. Once you do that, you’ll have a string with all the youtube data in it, then you can just perform normal string based functions on it. It’s almost like a JSON object, but seems clustered, so I don’t think you can just use a JSON reader on it. My program uses NO libraries at all (except .NET 4.0). The icon size is many times bigger than the program itself.

UPDATE V1.5

I have updated the program to get video data in addition to the thumbs. It gets ID, title, views, and upload date and puts them in an index file called 1A_YouTube.txt in the same folder. It’s sorted in chronological order. You can search that file to find the video you want. I made this software for my own archival purpose, but I think others may find it useful. If you have a request, send a message under contact us. If I make the final version, it WILL NOT be open source. I am a partial open source advocate – meaning I will give source, but only for small or preliminary versions.

New link: https://drive.google.com/file/d/1WD0bCY9aLutGGjHBS7w2rx9pyNsOWzD0/view

New source: https://pastebin.com/3vd3yixF

Old Version

Here’s the link to the old thumbnail downloader: https://drive.google.com/file/d/1AtJ1cJ9QXnRXnFeIfzCEw77VrboxyOMo/view

Here’s the main source file (no project, sorry): https://pastebin.com/qu2yeXuZ

I just finished this desktop comp cryptocurrency ticker today. It’s a super small 380 KB program that will display the current price of your choice of practically any cryptocurrency at the bottom of your Windows desktop. This is version 0.9. The one limitation now is it will only display prices in USD. 1.0 will fix that. If it says “Loading. . .” for a minute or two on startup, just leave it and it’ll work after a while. Most of the time it loads in a couple seconds. Once it gets going, it will update at whatever speed you set it to. Right click on the text at the bottom once it’s finished loading and select “Edit List” – that’s where you control everything. Considering this is V0.9, it may have some runtime error (it should be OK). If it does, just let me know. You can add a shortcut to it in the Windows startup folder on the start menu so it will start when you boot the comp.

This is the “Edit List” window:

I believe there are around 1,400 choices of currencies supported. You can display the most common, such as bitcoin or any super obscure one. It will update the prices in USD every 5 – 600 seconds. It’s your choice how fast you want them to update. I recommend not using the minimum cause maybe your connection will time out or it will use more bandwidth (it is already a pretty small bandwidth though).

(It doesn’t come with the cool purple background. That’s my desktop background behind it. Maybe I’ll make it more fancy itself at some point if any single human uses it.)

There are many programs out there that can do this for you, but mine is as simple and small as it gets. No loading virtual browsers with JavaScript engines and bloat. No electron. It will work on any OS that supports .NET Framework 4.0 – which is Windows 7 to 10 in 64-bit. It would technically work on XP too, but you’d need a 32-bit build and this is not available at this time. It may work on Mac or Linux under the Mono Framework, but it is not tested.

It’s written in C#, hence the name Sharp Ticker.

It’s in a 7-zip archive with no installer (just the EXE and DLLs), so you’ll need 7-zip. EVERYONE should use it at this point. It’s free and better than WinRAR.

Here’s the download: https://drive.google.com/file/d/1X4KQ0Kh10lT0X3fTB17eicKRy2Qs0WzA/view

(Google has changed the Google Drive layout. When you click the link, you’ll need to look in the upper right hand corner of the screen for a small download icon. The file contents displayed on the screen do nothing. I wouldn’t a clue why they did this.)

I’m starting to use my website for rants sometimes now. Please choose a category by scrolling down and choosing from the right hand side-bar if you want more valuable info.

That being said, on to the show.

Have you ever used electron before? You probably don’t know. Most people that have, don’t know unless they’ve encountered issues. Electron is a bloated framework that allows you to create JavaScript software as a full application (like an EXE file), instead of running in a web browser like JavaScript is designed for.

Instead of creating a new JavaScript run-time engine that’s been stripped down, they basically run the chrome web browser (chromium) disguised as an app. When you run one of these programs, you will see several copies of the same EXE running in task manager around 5 times or more. A full featured web browser will understandably run several “copies” of itself at once for holding multiple tabs. This makes the browser run more efficiently and also protects against crashes if one of the tabs you have open “performs an illegal operation” – LOL Windows 98. Essentially meaning that it performed an invalid instruction on the CPU – which is what Windows 98 was getting at when they say that. Anyway, in an application that is only running one instance and does not contain multiple tabs, there is absolutely no point in doing this. It shows that this group of programmers do not care. This is the least efficient framework in terms of RAM usage that I have ever seen. It also takes up a decent amount of drive space.

Take, for example, the program called balenaEtcher. This is a simple tool that allows you to install almost any operating system on a USB drive. Essentially, all it has to do is format and partition the drive, write the files, and write some type of boot loader to the USB so the computer will see it as a bootable system. It doesn’t contain any operating system files itself or anything – just the means to install your OS from a given source. Knowing this, it should be a very small program, however, it uses 184MB + more in the app data folder. That’s after I deleted the extra language files (which I don’t know why so much software doesn’t just ask you in the installer what language you want – instead it copies every single language to every system). 184 MB doesn’t seem like much today, so maybe you think I’m just being a hardass, well, let’s take another example. There is another program that does the exact same thing as balenaEtcher – it’s called Rufus. It uses 1.1 MB. And another called UnetBootin, it uses 4.7 MB. Rufus could fit on a floppy. That’s a factor of 167 times smaller than balena. Now you see the point?

On top of that, there is 0% reason why a program such as this should use a web technology like JavaScript. JS does what it does for web pages very effectively, but to use it for an actual application that performs ‘system’ level functions is asinine. I could understand if they wanted the convenience of a web interface or a canvas for performing JavaScript graphics, but this is a program with literally three buttons on the screen. It also bundles an OpenGL library with it cause we need a 3D engine to make three buttons. It could just as easily be rendered in WinAPI, QT, GTK+, or whatever for cross platform support, but they chose JavaScript. This shows that these people are web devs, not software developers. Does it work though? Usually. I have had it crash multiple times on Windows 7 though, when I was using the electrum bitcoin wallet which is based on electron. (BTW: In this instance it makes sense to use electron because a bitcoin wallet is more like a web application, but I digress.)

Say you are at a restaurant and you order food. The waiter brings you your meal, but it has all of the scraps left over from the kitchen. The real meal is there too, but it’s dispersed in the scraps. Would you eat it or send it back? Now let’s say those scraps become invisible, but you can tell they are still there. Do you still want to eat it? I doubt it. It’s the same thing with programming an EXE in JS. A lot of people just like to pretend that those scraps aren’t there. So what are you, a purist or a bum?

Take another example. There is a game called Shut In. It’s not a game worth playing IMO, but that’s not the point. It uses a JavaScript framework that is likely electron, but could be another similar clone. This game uses 196 MB of drive space and almost 500 MB of RAM with at least FOUR COPIES of it running. Not bad? But wait, there’s more; this game is smaller and MORE pixelated than even DOS games! The screen resolution of it is around 200×200 pixels. This was done on purpose to give it a retro vibe, which is cool. However, a game like this could be around 10 – 50 KB in size and be exactly the same thing if it were programmed natively. Even using the most modern proper tools, a game like this would be 1 MB. Just use AGS!!! Adventure Game Studio could produce the exact same thing in a couple MB and it’s EASIER than using JavaScript. I could understand programming a game like this in JavaScript if you wanted to run it directly in a web browser – that makes sense, but when you want to make an EXE, don’t use JavaScript. JS has gotten WAY too overrated. It’s a web language and should keep doing what it does best.

And not to harp on the person that made this, they probably don’t know any better.