Game Development


I know that I had previously said that I wanted to explore non-imperative, non-OO options for gamedev, but, in the time since then, I’ve explored several functional languages—and greatly enjoyed writing toy programs in impure functional languages like Scheme; thinking recursively is fun—but the reality is that functional programming just isn’t for me. I had thought that maybe I just didn’t like Haskell, but it was ironically during my attempts at trying out another Haskell-like language, Idris, that the reality crystallized for me: I simply don’t enjoy working with primarily-immutable data. It has its places, but I don’t enjoy when it’s the default. And that’s okay! Everyone has their preferences.

Jump forward to last week and I discovered Mosaic (more detailed info about the language is available here). I downloaded the (single-file) compiler, tried it out for a bit, and found immediately that I was enjoying using it. A lot of the design choices made for the language just made sense for language usability and its ALGOL-influenced elements allowed for easily writing much clearer code (no more } } } } } } } } }—instead, you have od od fi fi od. What’s more, it’s a systems programming language, intended to be used at a low level!

However, as a lesser-known language, there were no existing bindings for gamedev libraries. Fortunately, the language makes it easy to write bindings to C libraries and I’ve wanted to try raylib out for some time. Enter raylib-mosaic, a set of bindings for raylib, raygui, raymath, and rlgl. They’re not particularly well-tested just yet and there are a few quirks (which are listed in the readme), but testing is ongoing. At present, I’ve translated four example programs and one example game.

I’m not sure how much else I’m going to write bindings for just yet. I might port the gui_textbox_extended functions so that they’re available as native Mosaic functions, but I’ll have to see. The next step is to use these bindings to write a full game.

Leave a Reply

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