Gambas Tile System

From PigaLore
Jump to navigation Jump to search

The Gambas Tile System is a tiling engine being written by Piga Software for use in its later projects. It is to form the basis of revamped versions of the Gambas Platform Engine, Gambas Genie and others. It is designed to be a flexible and resource efficient renderer allowing for easy scrolling and scalability.

Fixed Version

Technical demo

The earliest version can be traced back to the "Smooth Movement + Diagonals" demo released on September 1, 2014, wherein tile data is stored in a two-dimensional array that is displayed within a drawing area. Dynamic elements, most notably the player character, are rendered atop this as independent picture boxes. This allows sprite animation and movement to be done without having to redraw all the background tiles. This was not previously viable until the Qt 5 and GTK 3 toolkits were adopted by Gambas providing transparency. This draft was later used as the basis for Hull Breach, created for the December 2020 LibreJam contest.

Scrolling Version

Development screenshot

Although decent for single screen games, the use of this tiling system proved cumbersome when adding scrolling. If done directly, the amount of tiles required to drawn on a larger world at once proves too demanding. With that limitation in mind, development began in 2015 towards creating a system that would select only the tiles necessary to render while storing all the rest in memory. After a major breakthrough in 2018 for the adaptive tiling interface, work began on populating tile worlds in the latter part of 2019 by coordinating the dynamic elements as well as adding in the option of background props that reside directly over the tile layer.