Paku Paku
Version 1.0 - 8 February, 2011 © Jason M. Knight, Paladin Systems North

This game is released as "Cardware".
If you enjoy it please send a postcard to:

Jason M. Knight
233 Baker Street
Keene, NH 03431

If you would like to see more "retrogames" produced in the future, feel free to make a small donation via paypal to deathshadow60@hotmail.com

Overview

This game is an expansion to the demo of my Retrochallenge 2011 Winter Warmup entry, a Turbo Pascal 7 unit to implement the undocumented 160x100 16 color graphics mode on the original CGA card. Since that original demo it has grown into a full fledged game with most of the familiar "Pac-type" elements present in the game. They system requirements have grown slightly though with verticle sync disabled it should at least be playable on an original PC, though on anything less than an 8mhz AT class system with a 16 bit video card there will be a good deal of flickering.

Support has been added for a wide array of early PC sound cards ranging from the simple PC speaker right up through to the Adlib series of sound cards.


Keyboard Controls

ARROWS
W,A,S,D
8,6,4,2
Player Movement
* Generally you are best off pressing the movement key BEFORE you reach the turn.
O Toggle Sound On/Off
V Toggle Vertical Sync On/Off
ENTER
RETURN
Start Game at menu
ESC Exit Game to Menu
Exit Program from Menu

Command Line Options

All command line options are case insensitive

/safe Do not reprogram CRTC on EGA/VGA. Better compatibility on oddball hardware, but has some aspect ratio issues
/speaker Force PC Speaker sound
/tandySound Force Tandy/PCJr sound
/adlib Force Adlib/Sound Blaster
/cms Force CMS/Game Blaster sound
On CMS/Game Blaster cards you may append an address thus:
/cms:220 Value in hex, valid range is 210,220,230,240,250,260
/nosync Turns off vSync, increases performance on older systems at the cost of some flickering, may reduce flicker on really slow machines. (8mhz or slower XT). WILL produce snow on original CGA cards - cannot be avoided as most XT class machines are not fast enough to keep up with the game and manage verticle sync.
It is usually best to let the auto-detection routine handle this.
/debug Pauses on startup to show subsystem messages and displays available DOS Memory, Stack and Heap
/? or /help Displays this help information

Video Technical

The video mode this game runs in is actually a sneaky trick using a text mode. Because of this it originally only worked on the CGA card. Basically you fill the screen with character code $DD, which has half the character filled with the foreground color and half with the background color. This nets you a 160x25 "semigraphics" mode where to set pixels you just change the foreground for even numbered pixels and background for odd numbered. To get that up to 100 vertical pixels you reprogram the CGA registers to make it think all characters are only 2px tall.

Back in the early 90's Geoffrey Silverton figured out that you could implemnet it on the EGA and VGA cards by adjusting their character heights in a similar fashion, though you faced the problem of every other column on the VGA being one px wider than the others, and on the EGA you ended up with a blank bar across the bottom seventh of the screen with the aspect ratio messed up since 350 does not divide evenly by 100. This 'broken' but working mode of operation can be triggered on those cards using the /safe switch.

I have expanded upon that by way of my knowledge of the EGA card. The EGA can be used with a CGA monitor, though that restricts it's highest resolution to 640x200... This means that unlike when the EGA is plugged into an EGA monitor the text mode is actual mode 3, and not the expanded 720x350 mode 3+. The VGA by way of backwards compatibility ALSO has the actual mode 3 timing information stored in it's BIOS -- so all we have to do to get the actual 160x100 mode implemented is reprogram the display timings to the actual 640x200 mode. This appears to work on most EGA and VGA cards I have tested with the exception of some laptop LCD's. Should you have graphics corruption on the EGA or VGA you should use /safe when starting the program.

Ideally the game should give you the CGA palette where color 6 is set to brown instead of ochre, however on many EGA cards the commands to reprogram the palette appear to be broken with the bits working as RGBi instead of RGBrgb. I suspect this is a side effect of reprogramming the CRTC into the CGA 200 mode 3, though I've been unable to determine where in the CRTC data this is turned on or off (or if it even can). As such on EGA systems I have left the yellow-ochre color in place.


Sound Technical

Originally I was only going to implement support for the PC speaker and Tandy Sound -- both of which are remarkably simple to program (once you understand the PIT)... but having a soundblaster 1.0 in one of my testbed machines I decided to try and implement the original "Creative Music System" or C/MS, which is also known as a Game Blaster. (the predecessor to the Sound Blaster). All game effects are programmed to work on a three voice system, so the extra channels in the C/MS went unused.

There is no reliable way to auto-detect the presence of a C/MS card that I'm aware of (if anyone cares to correct me on that I'd love to hear it!) so to use it you must start the program from the command line with /cms.

I figured while I was adding Game Blaster support, I would also program it to work with the Adlib card so owners of later model Sound Blasters aren't left out in the cold. The Adlib FM music is actually NOT as versatile at making sound effects IMHO as while it has several hundred more programming options, the card is painfully slow to program due to the delays used in it's port handling, and that pretty much everything is based on sine-waves making it very hard to get a "strong" sound out of it. EVERYTHING from the adlib sounds muddy or metallic.

As such, to my ears at least the C/MS and Tandy remain the best choice for audio when/if they are available.


Running it under DosBox

If you want to try this game on a modern non-DOS computer your best bet will be to run it under DosBox. Much of the game's development cycle was performed using DosBox for testing so it should run flawlessly. The best settings to use for DOSBOX are:

machine=cga
core=auto
cputype=auto
cycles=auto
oplmode=cms

You should then start the program with the /cms command line option for the best sound quality. The game should run well in just about any dosbox configuration given the support for all major color video cards and adlib support.

On Windows systems I highly recommend you set output=ddraw or even better output=direct3d, the latter only being present on SVN builds. (last time I checked). Linux and OSX users naturally should try the various OpenGL renderers.


Game Logic

The game logic is similar in most respects to the original, though due to the 5/8ths reduction in game resolution many elements had to be dropped or faked. For example the animation appeared jerky trying to make the ghosts move faster or slower than PakuPaku, so they are for the most part the same speed. In the original you could take corners faster than the ghosts by clipping the edges of each turn -- this was called "cornering" by most players. It was impractical to recreate that at such a low resolution so instead I gave the player a one pixel "boot in the patoot" at every corner to give a slight advantage.

When the ghost go into 'flee' mode when you eat one of the four super-pellets the ghosts are cut to half speed -- this proved using the 'random movement' logic to be too easy despite being remarkably close to the original game's logic. As such I have changed their flee logic to be a bit more intelligent, making you have to put a bit more effort into hunting them down.

Likewise their pursuit mode logic is a bit different -- for the most part the red ghost still tracks you directly, the magenta ghost tries to get in front of you, the cyan one's accuracy decreases the further away the red one is from you, and the brown one is still a bit... silly... but they've been tweaked with a bit of randomness to make them a hair less predictable. Likewise the movement restructions of not being able to turn upwards at the two center "T" shaped maze section while present, has a 1 in 10 chance of being ignored... just to give players a bit of a surprise every once in a while.

The level progressions follow the original game fairly closely, the entire game speeding up or slowing down depending on the level you are playing. The fastest level speed is pretty quick, even compared to the original so be ready for a bit of a challenge in that department.