I started the month by merging some PRs for my UnityVolumeRendering project, a project I’ve been working on for some time. This is an open source project that lets you visualise medical datasets (CT/MRI scans, etc.) in the Unity game engine. I have frequently received bug reports regarding the DICOM importer (DICOM is a file format for medical datasets), which often fails to import. A common cause of import failure is datasets using JPEG2000, which my project did not support. I have also received requests for adding support for more dataset formats, such as NRRD and NIFTI. Luckily there is an existing library that can take care of all this for me: SimpleITK!
A problem with SimpleITK is that it’s a native library, while my project is aiming to be a cross platform Unity plugin. To use a native library I would need to compile that library for all platforms I want to support, which can be both cumbersome and limiting (what about the more rare platforms?). So I decided to add SimpleITK as an optional dependency. For now, it only works on Windows, since SimpleITK’s CSharp-integration did not provide binaries for Linux - a problem that I’m hoping to fix soon!
Oh, and just a few days earlier I received a PR that greatly improved the volume rendering performance, so in other words this project has seen great progress this month.
Making an RPG?
I’ve always been a big fan of RPGs/JRPGs. More than a decade ago, my friend and I wanted to make an RPG. My friend made the music and I did the rest. The problem back then was that I didn’t really know how to do programming, so the project didn’t go that well. A few days ago I found the music my friend and I made for this game, and decided that I wanted to try making a small game (prototype?) from it. I’ve discovered some useful tools along the way:
First I needed a tool for creating tile maps / levels for the game. Thanks to this post on Mastodon I found a tool called Tiled, which turned out to be a great tool for creating levels/tilemaps! It makes it very easy to create maps, and also has some more advanced features such as terrain and smart/auto tiles. The maps can be exported as XML or JSON, and there are many libraries for importing these maps. I ended up using tileson, which is currently in active development.
Another problem I had to think about was how to create NPC dialogues. My initial thought was to create the dialogues in XML, but I thought that there has to be some existing tools or formats that I could use - rather than reinventing the wheel. I tried asking on Mastodon and ended up receiving quite a few suggestions! I haven’t decided yet, but I think I will probably go for Yarn, a dialogue scripting language. I will probably need to create my own importer for C++, and I think I want to use GNU gettext for localisation instead of their own system.
Finally, it’s summer again! And for me summer is a time for contributing to OpenStreetMap! If you don’t know what OpenStreetMap is: It’s a free and open project for collecting map data of the whole world. It is a free alternative to Goole Maps (through applications such as OrganicMaps and Qwant Maps), but it can also be a lot more. You’ll find map applications that are dedicated to wheelchair users, cyclists and much more. It can be really simple to contribute, for example through a fun Android app called StreetComplete that lets you casually contribute while travelling, while receiving points and achievements. You should try it too!
Thanks for reading, and thanks to Wilson for suggesting to write monthly updates on my blog :)