Gambas Projection Engine



Gambas Projection Engine is a 2.5D game engine project by Graham Lawrence Wilson that provides grid-based simulated three dimensional spaces ala games like Dungeon Master, as well as more experimental pseudo-3D effects such as graphical scaling. It is called the "projection" engine because the positions of all pre-defined game objects remain static, while the world is rendered out in front of the player (usually to a vanishing point or aerial perspective) from the first person.

History
The game that truly convinced Hamish and Graham L. Wilson to try and learn game programming was Doom by id Software (as well as Bad Toys 3D and Duke Nukem 3D), and as such the desire to emulate it has long been a signature of their programming careers. The following outlines how this was manifested as their skills developed.

Point & Click
Graham Lawrence Wilson's first serious programming project was a graphical adventure game called Mad Bully in the Haunted Mansion. Set in an inverted animal afterlife, where hell was pleasant despite featuring traditional hellish aesthetics, while heaven was punishment, herd patriarch Mad Bully goes to a haunted mansion to clear out ghosts and ghouls.

Starting from a screenshot of the Mystery Screensaver for Windows 98, interiors were drawn as basic static 3D rooms from a first person perspective. Either as a boxed in corridor end, or as a side view of a long wall, these objects were then populated with objects the player had to deal with by selecting one or more options; usually variations of attack, sneak or retreat. The player had to choose the right one to progress, similar to a choose-your-own-adventure.



Although never finishing Mad Bully, Piga began working on a few other projects of a similar mould. Hamish Paul Wilson and Graham each did their own high fantasy-themed adventures. Hamish's The Pig featured a fantasy race of bipedal pigs ala Piga, and featured a dragon, goblin and troll within the dungeon. Graham's The Wizard featured the player taking on the role of the Wizard Grandy as he infiltrated a Warlock's castle. It was to expand on their established formula by having different weapons, potions and magic the player could use, as well as limited non-linear gameplay, although the game logic for this was never really implemented.

Graham also started a game called WEIRD: A Short Game which was again first-person, but drawn with geometric primitives and in a sideways slanted world. A more distinct project was CATCOM (aka Cat Computer), a game where the player controlled a cat through a house. Activities involved eating, sleeping, drinking and interacting with other cats, all at their eye level. A rare finished project was simply titled 3D Example, and featured a guided tour through a series of room given by Piga in which the player goes through a porthole, climbs a ladder, uses a flashlight, finds a writers desk, throws a grenade at a target and finds a code needed to win. Fan games were also drafted for Doctor Who and Garfield.



The most ambitious and primary effort of the group's early Visual Basic years was the the Shoot or Doom trilogy. Named after the underlying try or die philosophy (and homage to Doom, the game featured Robert Dwarf (a man of ironically tall stature) being abducted by the Alien Empire and forced in The Maze, a simulated reality labyrinth to test the worthiness of first contacted species (populated by clipart opponents such as taunting smiley faces, in a vaguely surrealist tone). The first episode would feature his adventures in The Maze, an abstracted world filled with odd geometric opponents, including a smiley face and lighting bolt. The second would feature his escape from the maze and into the bowels of the ship, fighting off alien guards, and conclude with a final episode where he takes out the mother-ship and escapes back to Earth. Drafts were created for episodes one and two, with the first most advanced. Late in development, timers were being put in to force the player to react to opponents within a set amount of time, the first step towards more advanced game logic.

When Piga Software switched to Gambas in 2007, which is similar to Visual Basic, they briefly returned to this concept, with Hamish prototyping a title called AGM Labs, set in the Freedoom universe.

2-Step


2-Step was a limited first person projection engine first envisioned by Graham Lawrence Wilson in the summer of 2005. At that time Piga Software, had yet to acquire the full version of Game Maker 6.1 and he was frustrated by the fact that the basic 3D abilities of Game Maker were not allowed to be used in the shareware version. As a sideline around this, he decided to try and create a program, however limited, to emulate it. The result was a Game Maker engine that draws a cramp room in which the player can step forward, step backward, jump, crouch, and interact with any object within in the cramped, short corridor.

This was done by drawing four backgrounds in a first person perspective that simulated the player's two steps forward and backward, as well as jumping and crouching, and then switching the background when the player pressed the relevant key. He had trouble doing this with the background settings of a Game Maker room, but then after a coder epiphany he figured that he would just create an object to the draw the world. After this he made a short open ended demonstration game called Revenge which featured use of this engine, depicting an enraged space bounty hunter (ala Bobba Fett) charging his way through the corridors of an alien ship to avenge the death of his father. The artificial intelligence had aliens with both one shot and rapid fire weapons, and it was vital once each room opened to do unto them before they killed the player. There were also light switches, various collectibles, and other items.

Several versions of this engine were played around with, including ones for Game Maker 5 (pictured here), QBasic 4.5 (done in ASCII art), and lastly in Gambas. It carried on from the very basic static 3D renderings Piga had done in Visual Basic by allowing for the world to be redrawn as needed and objects that could be manipulated.

Projection Engine
Work on the modern incarnation of the engine began in June 2015, abandoning a focus on graphical scaling as the primary renderer and instead taking inspiration from grid-based dungeon crawler games. Most notably for Wilson was the QBasic game The Legend of Lith II, which has served as a model alongside the uncompleted GWiz. Rather than just following the classic grid based formula however, which usually featured turn-based combat, the Projection Engine is to use graphical scaling and other tricks to allow for limited real-time game-play.