If everything goes all right, then my code at Re-Hoard should be done in 5 days of work.
Whether the code would work is another matter.
At this point, my idea is writing all of the code I can, revising the code, get my code verified, then pick between:
- staying with Lua in the pico-8
- switching to ChaiScript in ChaiLove
- switching to C in the Game Boy Advance
The reasoning behind writing all of the code first then revising the code is not just because of the possibility that my problem is solvable within the pico-8 ecosystem, but also finishing the code would give me a reasonably complete framework from where I can do a translation if I do switch. Yesterday, while coding, I found that I needed to do a few new sound effects, that is, a gap that would have been more difficult in being fixed had I switched immediately to a different ecosystem.
I normally do not learn one language while using another because I want to avoid mixing up the two languages, but I let this because I plan on moving away from Lua. However, this possible mixup is the reason why I did not learn both C and ChaiScript at the same time.
I decided on learning C first. While the main motivation was simply big interest in the Game Boy Advance at the time, I found that there were more practical reasons why C would get priority over ChaiScript.
- C is widespread. From what I have seen, C is the most widely-used language in all electronics, beating out even C++ and every dialect of BASIC together! This would make my games written in C very portable.
- C is marketable. Because of that wide spread, a knowledge of C would be very useful in a lot of business and industrial contexts.
- C lets me understand the hardware at a lower level. From what I had seen, C is essentially cross-platform assembly language. One of the main benefits of C is its ability of manipulating stuff at the bit level. A knowledge of C would deepen that knowledge of bit manipulation. (Once again, this deep knowledge would help me in an industrial context.) This is important because I finally would get to understand pointers, that is, a common theme in programming.
- C helps me understand Libretro more. Libretro is a C library first of all.
- C is reverse-compatible. My main trouble with ChaiScript is that ChaiScript ultimately relies on C++14, which would make things difficult when porting stuff to earlier hardware. This fact became more relevant here when Libretro supporting an old compiler let Libretro resume development that targets Microsoft’s first game console, the XBOX. That means that, even if targeting the Game Boy Advance does not work out, I can still code “from scratch” using an older version of C. Because I am using a book from 40 years ago even before C was standardized into C89, my code would definitely be reverse-compatible.
- C is mature. ChaiScript is still being developed. While I am fine with waiting until ChaiScript finishes development or at least progresses to a form of maturity, C is already time-tested and, therefore, more reliable. I can write things in C while I wait until ChaiScript matures.
From another perspective, though, ChaiScript may have fit my current priorities more. The development time of Re-Hoard is easily approaching a year. Spending so much time on a simple game is ugly, even though I do not exactly have an audience. ChaiLove not only is deliberately similar to LÖVE (another framework I used) but also abstracts away a lot of close-to-hardware features. Adding assets in ChaiLove is also drag-and-drop, whereas writing a Game Boy Advance program would require conversion and appending the assets. Therefore, using ChaiScript would make a sooner release. There is also the fact that ChaiLove is tied to the Libretro ecosystem whereas making a Game Boy Advance game is not. (I could make a game “from scratch” that implements the Libretro library, but that would be too much work when the goal is getting my games released.)
Maybe I should have started with ChaiScript? I am too deep in C, but I might learn ChaiScript after I finish with the basics of C.