Skip to main content

Command Palette

Search for a command to run...

Implementing MiniScript in Godot

Concept Design

Updated
2 min read
Implementing MiniScript in Godot
R

I am an Australian software developer, working professionally in the past on corporate database systems, in my spare time currently on whatever takes my fancy.

I like exploring and creating add-ons for game engines, and general coding in multiple programming languages, currently focussing on C++/C#, Godot GDScript and Miniscript. I am also an aspiring artist, gardener, woodwork and dabbler in many other eclectic hobbies.

MiniScript is an incredibly easy-to-learn, yet surprisingly powerful, runtime scripting language designed by the amazing developer, Joe Strout. Consider it an alternative to Lua, packaged in a small, neat bundle that can be easily deployed across multiple platforms. In 2019, I began implementing MiniScript in Godot 3.1/3.2; however, life and health issues interfered, causing me to take a hiatus from all development.

Four years later, life has taken a backseat, allowing me to resume where I left off and continue my implementation in Godot 4. Back in 2019, GDNative was the recommended method for extending Godot, but it was somewhat cumbersome. I'm pleased to report that GDExtensions in Godot 4 have replaced GDNative and streamlined the process. However, since Godot 4 was released only about six months ago and official documentation is quite limited, there is a significant amount of self-discovery involved. Fortunately, some incredibly helpful individuals in the MiniScript and Godot Discord channels are willing to lend a hand.

The official (though subject to change) working title for my project is GDMiniScript. I know, it's highly original, isn't it? My primary goal with GDMiniScript is to enable Godot game developers to integrate MiniScript into their games, allowing players to write MiniScript code to automate game elements. I've been inspired by numerous coding games over the years, such as Core Wars, Robot Battle, and more recently, Screeps. This type of functionality is my objective, but the final result can easily be extended to fully replace GDScript with GDMiniScript as a Godot-based game development language.

Progress to date includes a basic working MiniScript interpreter functioning as a Godot C++ GDExtension, accompanied by a simple UI wrapper for visualization. Currently in the prototype stage, there are kinks to iron out, tests to conduct, and minor tweaks and enhancements to implement. I have not yet started version numbering.

GDMiniScript Prototype Screenshot

If you'd like to see a quick demo of the current running version, you can check out the video I made on my YouTube channel, linked below. I've already made some design changes since then, and I'll continue to post updates on my progress when I think it's worth sharing. In the meantime, I'll be posting development updates and my design journal in future articles here. Feel free to provide any feedback to help me along my journey. Hopefully, I can offer some valuable insights to others following a similar path.

You can find me on various social media and development platforms with the handle of SynapticBytes. Additionally, I maintain another blog where I reflect on my 40 years of coding experience, sharing wisdom and hopefully some amusing anecdotes. Discover it at Decoding Life.

M
Max Kratt2y ago

This is quite fantastic! Do you think you will add a little example programmable game as this develops?

R

That’s the plan, but there’s quite a few layers to build before getting to a full game, so it’s going to take a while.

My next article will be on the architecture of the full stack deployment, which should outline the stages I need to go through.

1

More from this blog

M

MiniScript News, Reviews and Development

26 posts

Development updates on my MiniScript for Godot extension, my personal MiniScript code projects, and other MiniScript news from around the globe.