This week I did a lot of work on the game engine’s script code. I ended up mostly writing Lua code and a moderate amount of C++ code. I introduced a new API to handle shader uniforms, I introduced several generic abstractions (for example, I created a core.ExtendEntity function that captures the code required to extend an engine’s entity from Lua, thus removing code duplication), I added tracebacks to help debugging uncaught exceptions from Lua and more. I also added more animation capabilities to the engine, in particular for camera movement and zoom.
On Friday, I installed and started playing with DaVinci Resolve, a video editing program. I used it to merge two videos I created with my game engine, adding a transition between them and a bit of motion blur effect. While using video editing software is not particularly useful for the kind of content I have created so far, it will be useful for more complex videos coming in the future. So this was a good opportunity to practise with video editing software. I attach the final video to this post. It shows how light guides are currently rendered in the game. The video also shows the ability to switch between reference frames. This is a non-trivial operation: different reference frames show things at different times. Switching between them therefore requires storing a certain amount of history, as well as fast forwarding dynamics computation to future times.