• he/they

this man write code


Duuqnd
@Duuqnd

So this is only mildly interesting but I just have to mention that Quadralien's PC port is real strange. So Quadralien was written for the Amiga and Atari ST first and so it of course expects to run with a refresh rate of 50Hz, which like every game on those platforms it used for timing the game logic. But on the PC it uses the VGA card which in the mode Quadralien uses runs at 70Hz, which would make the game unplayably fast, especially since Quadralien is a block pushing puzzle/action game where holding down a key will make you keep moving until you let go. So at 70Hz you'd be shoving boxes into places you can't get them out of and you'd have to be real fast at tapping the arrow keys to avoid that.

So to fix this they did a decently clever thing. The PC's timer was configured to send an IRQ at 50Hz. So you could just tie the game logic to that, easy and works fine, both in theory and in practice. Except, they never used it for gameplay! The timer only handles a few minor things, and despite already being configured to run at the necessary 50Hz, the game logic's speed is still controlled by V-Sync, which happens at 70Hz! So the game is too fast and turns an already somewhat stressful game into a nightmarish precision race against time! And it's piss easy to fix! And the fix actually works, I've hacked it in myself! I have no idea why they didn't use the fix they came up with and programmed 90% of.

Also when reading the keyboard for text input it does so in a tight loop. Not a tight loop calling a keyboard input routine, but a tight loop reading the keyboard's I/O port. Like this (not exact, from memory (that CMP might even be invalid, I can't remember)):

LOOP:   IN AL,60h
        JZ LOOP
        CALL PUSH_CHAR
        CMP [CHAR_COUNT],LIMIT
        JNE LOOP

As you can expect, if the CPU is faster than ~8MHz this makes it very easy to type way too many characters. But the game feels the best to play on a ~25MHz 286 because at that speed there's no stutters on screen transitions! So basically you shouldn't play it on real hardware. Use DOSBox, force its refresh rate to be 50Hz, and slow down the CPU when typing the level passwords.

And even if you do all that, the game is still a late 80s puzzle/action game. And you never even get to meet Earth President Livingstone! You just can't win with Quadralien.


You must log in to comment, but you can't do that from here since this is an archived copy hosted on quux.foo, not cohost.

in reply to @cathoderaydude's post: