Implementing MiniScript in Godot
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.
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.
Did you find this article valuable?
Support MiniScript News, Reviews and Development by becoming a sponsor. Any amount is appreciated!