My attempt to clean up an ancient DOS game a friend and I made in high school.
- Rename, rearrange, reformat, and refactor things to be more sane, but still one file
- Magic numbers -> constants
- Deduplicate code
- Globals -> state object
- Rearrange code to eliminate prototypes
- Consolidate constants
- Defines -> static consts? (not sure if watcom can elide them)
- Test performance on (simulated) pentium 233 to make sure it still runs well (it's probably fine since I eliminated an entire screen copy)
- Get it running under FreeDOS with OpenWatcom compiler
- Fix game-breaking problems
- Score display
- Address compiler warnings
- Crash in non-huge memory model
- Fix QoL problems
- Restore video mode upon exit
Currently using OpenWactom 2.
For an optimized release build:
wcl -q -mc -wx -we -ox -5 -fp5 -fpi87 -DNDEBUG pp.cpp dos_system.cpp drawing.cpp palettes.cpp sprites.cpp
This game was originally developed on a Pentium MMX 233, hence the -5 -fp5 -fpi87
options.
For debug builds, add one of the debug symbol options, and remove one or both of -ox
and -DNDEBUG
.
TODO:
- makefile
I am using FreeDOS on VMWare with the project directory mounted as a shared folder using vmsmount. After building the program on the host, I can run pp.exe
inside the VM.
To exit, click both left and right mouse buttons simultaneously.
- Score is not very legible, especially during countdown
- Ball speed calculation is wonky; there is both a
speed
andball_[xy]_delta