From Ars Technica: Portal’s physics engine rebuilt in 25KB—on a graphing calculator

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.”

Calculating with Portals

To represent portal travel, Marcolina told Ars he had to create two separate sets of variables: x and y for regular space, and i 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.

Read 6 remaining paragraphs | Comments

from Ars Technica