Presenting QueztcoAPL!
A new game for the Commodore SuperPET paying tribute to Larry Cohen’s cult classic film, Q: The Winged Serpent, written in APL for the Lost…
Presenting QueztcoAPL!
A new game for the Commodore SuperPET paying tribute to Larry Cohen’s cult classic film, Q: The Winged Serpent, written in APL for the Lost in Adaptation game jam.
“You know, the Empire State Building had King Kong and I thought the Chrysler building was a nicer building and it deserved its own monster, and so we gave them their own monster.” — Larry Cohen in the Q Director Commentary

This game is written to be run on the Commodore SuperPET, released in 1981, since it was a contemporary platform available for gaming when the film came out in 1982. It’s easy to run the game using the Vice emulator if you don’t have a real SuperPET.
Begin by drawing the Chrysler Building in all its glory with the CHRYSLER function. Two machine gunners are positioned for action on the right of the building.

The beautiful Art Deco lines of the iconic Chrysler Building
We can tighten up the screen using the SCRUNCH program to remove the tiny pixel spaces between the characters:

Before and after scrunching:

Scrunch tightens up the playfield.


Did it scrunch down into the Metropolis building?
Queztcoapl is stored as two arrays: screen memory locations and character data to poke into those locations. Define Queztcoapl using the function T:

Three other representations of Queztcoapl will appear as the game progresses.



The main game function G paints the Chrysler Building, initializes variables and then loops while accepting joystick input:

Line 13 is FinnAPL idiom 650 and used to smooth repainting of Q. Comment out line 16 if you want to increase the frequency of Q’s fireballs. HANDLEJOY moves the ground gun and fires the various guns with CSHOOT, then calls MOVEDRAC to move Q around the play field.

“Probably one of the last of the stop-motion photography monster pictures” -Larry Cohen
MOVEDRAC enforces the boundaries of screen memory to prevent Queztcoapl from wreaking havoc by flying off into system memory and overwriting program code.

Why is it called MOVEDRAC and not MOVEQ? This game extends the combat and movement engine I developed for Dracu-Lark, enhancing the code to use multi-position arrays for player characters.
All the shooting happens in CSHOOT, and collision detection happens here. Missiles launched by the player and Q are handled the same way. CSHOOT takes two arguments, the starting screen location and how many screen positions to move the missile each turn.

If Q strikes either machine gunner, the KILL branch is selected. The lives remaining counter is decremented and printed to screen, and the gunner falls to their death.


The player begins with 9 lives.
[embed]
Rockets in flight look at the next character ahead of them to detect an impact. If they see a blank space, they continue flying.
When an impact occurs, decisions are made based on the character hit. Sometimes Q is damaged, but certain armor characters render bullets harmless and these impacts cause no damage.
REDUCE is called if Q has taken enough hits to cause it to change form. The forms defined in U, V, and VDOWN are each used in turn.

If you are using the Vice emulator, be sure to set up the Joysticks for input.

How to configure the Vice emulator keyboard joysticks:


Vice emulator joystick settings
메타데이터
- post_id
- 19e0658daec6
- slug
- presenting-queztcoapl-19e0658daec6
- url
- https://medium.com/@jamesprice_92800/presenting-queztcoapl-19e0658daec6
- canonical_url
- https://medium.com/@jamesprice_92800/presenting-queztcoapl-19e0658daec6
- author_url
- https://medium.com/@jamesprice_92800
- status
- ok
- fetched_at
- 2026-07-21 23:30:11