Scripting with ChaiScript
Well, it's been a week since I begun work on Crimson, and I've made some very good progress. I've started adding scripting to the engine, using ChaiScript as my preferred language. When it came to choosing a scripting language, I had two options that came to mind. The first was Python, and while I like Python, it's very easy to use and feature rich, it's also very slow, so I decided against that as well. Lua was the second option that I considered, because I've used it before and the API is very well documented. The reason I decided against Lua was that it doesn't support object oriented programming, which is something that I'd like to use if I were creating a game using a scripting language.
So that was the end of both Lua and Python for me, but I still didn't have a scripting language to use. After researching a little bit, I came across ChaiScript. It has a very easy to use API, it's fast, supports basic object oriented programming, and has similar syntax to JavaScript. I mostly had to figure things out on my own though, since there are very few tutorials, and the documentation is poor in quality at best, but I managed to set up the basics. Here's a script that moves an object around using the arrow keys:
As you can see, very simple. I need to add more data structures to it, and then I need to sort out a basic collision system, and then I'm going to try to make a game using this engine, and use what I learn from that to add more features.
Also, I'm planning on starting a YouTube devlog series of this engine, so subscribe to me to see that: https://www.youtube.com/channel/UC6VQ0rNQInZasKiljASHjUQ