A 20-year-old college student has rebuilt Portal, Valve’s 2007 space-bending game, from the ground up, onâ€”wait for itâ€”a graphing calculator. In a display that puts the old calculator versions of Mario and Tetris to shame, Alex Marcolina posted to a gaming forum and reddit on Sunday about his re-engineered version of Portal. It took three years to build and cannot, due to resource constraints on TI-83/84 calculators, execute more than 16 kilobytes of code.
When Marcolina set out to rebuild Portal on TIâ€™s graphing calculator platform, he was 17. Now, heâ€™s a 20-year-old game design major at UC-San Diego who programs games mainly for computers, but likes to dabble in graphing calculator games on occasion because it’s â€œa fun challenge to make a game for a platform that is not supposed to even support games.”
The native language for the TI-83 and 84 calculators is called TiBasic. But when it comes to making games, creators favor a language called Axe, developed by a member of the calculator and PC gaming forum Omnimaga. Marcolina points out the syntax for Axe is â€œvery loose, but it allows for good optimization in the translation from code to assembly.â€
To represent portal travel, Marcolina told Ars he had to create two separate sets of variables:
y for regular space, and
j for â€œPortal Spaceâ€ (when the player is moving through a portal).
i represents how far into the portal the player is, and
j the side-to-side movement relative to the portal.
from Ars Technica