Umka 1.0 language and Tophat game framework

web sandboxwhere you can practice with basic language constructs (and look for bugs!).

Game framework

Tophat is a simple cross-platform framework that allows you to write 2D games on Umka. In version 1.0, it provides tools for working with graphics (including sprites, animations, particle clouds and fonts), sound, input devices (keyboard and mouse). It also has facilities for collision analysis and finding shortest paths on a 2D map, reading and writing data in CSV format.

Tophat is delivered as a single executable file for Windows or Linux, which contains all the necessary low-level libraries, the Umka interpreter, as well as all modules of the Umka standard library and Tophat itself. It does not have any external dependencies.

Among the examples of mini-projects on Tophat are a space shooter, a simple platform game, Tetris, an analogue of Flappy Bird, a timer for the “tomato method” (we also owe the last three examples to Tophat project participant Svyatoslav Shatunov, aka Ske). You can run them both on your computer and directly in the browser – directly from the Tophat website. Ready and web sandbox for browser experiments with Tophat.

Analogue of Flappy Bird (authors - Marek Mashkarinets, Svyatoslav Shatunov)

Analogue of Flappy Bird (authors – Marek Mashkarinets, Svyatoslav Shatunov)

Timer for the

Timer for the “pomato method” (author – Svyatoslav Shatunov)

Additional tools

Marek Mashkarinec created a handy UmProf utility for profiling Umka programs. It outputs analysis data in JSON format, then you can use Spall. The Umka interpreter supports profiling, allowing you to assign external user-defined functions (debug hooks) that will be called on each entry and exit from any Umka function. The UmProf utility is integrated into Tophat. Here is an example of its use, which allows you to see that the largest proportion of the game frame rendering time in this case is occupied by sorting graphic elements by depth:

Profiling result example

Profiling result example

Marek is also busy writing a universal visual property editor with JSON data output. This tool is still at an early stage of development and was not included in the release of Tophat 1.0.

Games

I know of at least two serious game projects being developed on Tophat and Umka. Svyatoslav Shatunov has been working on a puzzle platformer for the past year SaveScum (It is her screenshot that was placed on the cover of the article). The key idea is to turn saving the game from an auxiliary operation into the core of the game mechanics. The level editor was also written for the game – also on Tophat.

Level editor (author - Svyatoslav Shatunov)

Level editor (author – Svyatoslav Shatunov)

Marek Mashkarinec, meanwhile, is developing his project – a game about railway traffic dispatching. The repository with the prototype of the game is closed for now, but you can get acquainted with development diary on the author’s website. Marek also regularly participates in game jams, often with mini-games in retro style. He also leads channel in Discordwhere Umka, Tophat and games are discussed.

A game about railway traffic dispatching (author - Marek Mashkarinec)

A game about railway traffic dispatching (author – Marek Mashkarinec)

Download links

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *