This week I did quite a bit of writing. I wrote one article to explain how rigid bodies do not entirely live in the present, but have parts of their future trajectory determined by the rigidity constraint. The article also captures my thoughts on how physically correct collisions involving rigid bodies may be put together and what the implications are. I published it here.
I am more and m...
2023-08-19 17:11:43 +0000 UTC
View Post
This week I have been experimenting a new approach for the dynamics in my game. After working on implementing collisions and being unsatisfied about the results obtained so far, I decided to try something different. I am explaining it all in a new article.
I also prepared a little Shadertoy demo. It is only a...
2023-08-18 16:40:08 +0000 UTC
View Post
As described in the weekly status update that I just posted (I am one week behind, sorry) I spent a good part of last week thinking about relativistic rigid bodies and collisions. Yesterday, I took some time to write down some of the key conclusions. I hope you will find the article interesting.
2023-08-17 14:03:41 +0000 UTC
View Post
This week I mostly worked on improving the implementation of collisions in the game. Unfortunately, this is a challenging area of my project. I consider it one of the biggest technical challenges (in terms of difficulty rather than amount of work to do.) I wrote down some notes on paper. I will document some of the key findings into a proper article soon.
While implementing collisions, I found a behaviour that looked wrong: the robot was bouncing up and down from the upper wall to the b...
2023-08-17 12:24:48 +0000 UTC
View Post
I continued to work on the CPU implementation of graphics primitives for the Robot’s screen. I spent one day creating a short video to capture and showcase the end result. I posted the video on TikTok and a slightly modified version on YouTube, as a YouTube Short. This was a bit of an experimen...
2023-08-11 16:43:15 +0000 UTC
View Post
This week I tried to make the robot’s LED screen come alive. I added some Lua code for this. The new code deals with the high level operations, such as controlling the cursor, the animations, etc. I attached a video that shows what I got so far. You can see I used the new capabilities to produce a fake boot animation.
I also did substantial improvements to the backend side of the robot’s LED screen, the C++ code that handles the low-level pixel operations.
I spent time recordi...
2023-08-04 17:37:38 +0000 UTC
View Post
I started the week by working on the shader code that renders the robot’s LED screen and I finally completed it. It was quite challenging to get the texture filtering right (antialiasing, mipmaps), but I got there in the end. I am attaching a video to this post showing the final result.
I also did some final adjustments to the build system to support Emscripten builds. This was mostly about detecting changes in the assets and convincing CMake to rebuild and repackage them when necessa...
2023-08-04 16:46:25 +0000 UTC
View Post
This week I mostly worked to make my engine support Emscripten. It ended up being a good amount of build system work and figuring out how to convince CMake do what I wanted, but also to try to understand how Emscripten asset packaging can be done.
By the end of the week I got my current demo work nicely on the Chrome browser, both on my PC and on my mobile phone. This was unexpected, to be honest: although I had already suc...
2023-07-28 10:24:58 +0000 UTC
View Post
I did more work on the engine rendering code, completing the big code-refactoring I started some weeks back. I finally have a generic mechanism that I can use to set the light uniforms. I used this to add lights to the player for the engine’s flames. You can see the attached picture.
I also painted the robot’s body, although I don’t think I am done with it. I am not fully satisfied with the colours.
I also worked on implementing a LED screen for the robot. I looked into
2023-07-28 09:06:56 +0000 UTC
View Post
On Monday I focused on getting the flames right. In particular, the flames now flow in the right direction and do that in a continuous way, i.e. they don’t switch on/off abruptly. They also change direction smoothly. I am satisfied with the final effect. I did some experiments rendering shadows, just to see whether they add to the scene. I think the answer is yes. I have a first SDF-based implementation, which is kinda wrong though, as the shadow doesn’t really reflect the Lorentz-contrac...
2023-07-21 16:54:52 +0000 UTC
View Post
Here is a short video demonstrating the work I have done so far around the character of my next game demo. It was unexpectedly difficult to render the led screen with proper filtering (antialiasing & mipmaps.) I had to use textureGrad in the GLSL shader and spent almost an entire morning with pen and paper, figuring out the formulas.
Next, I will work on allowing updating the robot's screen and - after that - focus on improving the controls. In particular, I need to limit the veloci...
2023-07-18 17:08:58 +0000 UTC
View Post
This week I did the first significant work on my game prototype. The main game character will be a little robot that can move inside rooms and solve puzzles in there. You can see a rough sketch in the attached image. After thinking a bit about it, I decided to go for a “drone-like” shape. There is a good reason for this shape. Keeping it short, I want to show the acceleration of the body by drawing flames out of the engines. The born-rigidity constraint of the body implies that engines sh...
2023-07-15 19:48:51 +0000 UTC
View Post
I spent all my time this week working on improving the engine’s C++ code. I introduced a new ECS system that simplifies sharing parameters across the entity tree. This ECS system will be the basis for future changes, in particular around how shader uniforms are set.
This work is overdue. I have coped with my engine's deficiencies in the past months and relied on hacks just to get the demos out of the door. However, it is now time to fix at least the key issues. This will make my life ...
2023-07-14 17:24:27 +0000 UTC
View Post
This week I did some more preparatory work for “the next thing”, i.e. the first game prototype. I created a minimal template of a game project using my engine. This is a directory that I will copy whenever I want to create a new demo or game level.
I also introduced a manifest file that lists all the assets used by a game project. The engine can check, at runtime, that the used assets match the list in the manifest. It can then suggest corrections to it. The manifest will b...
2023-07-14 17:15:39 +0000 UTC
View Post
I started the week working on improving the TikTok video I published last week and making it ready to be published on YouTube. In particular, I played with Gimp and learnt a few tricks. My aim was to put together a thumbnail for the video. I hear this is quite important for YouTube. The result is attached to this post.
Also, while doing this I found that saturating the colours in the thumbnail gave a better looking image, so I implemented a saturation filter in the game and re-recorded ...
2023-06-09 11:09:02 +0000 UTC
View Post
On Monday I added another tool to my game engine using Dear ImGui. The tool provides a new window that allows stopping the user time and slowing down or speeding up the evolver time. I used this tool to do the final edits to the TikTok video that I mentioned in previous posts. I published the video on Tuesday. You can find it here .The video had 6K views, more than all of my previous vid...
2023-06-09 10:24:44 +0000 UTC
View Post
I was abroad on holiday during the past two weeks. I only worked three days and mostly focused on using Dear ImGui to create the first prototype for the game editor. This was time well spent as I now have a tool that is usable and will definitely improve my productivity. I attach a video that shows the current state of the editor. It is minimalistic, but allows to explore all the entities in the tree and to edit their components.
2023-06-01 16:34:04 +0000 UTC
View Post
On Monday did some work to enable better integration of Dear ImGui with my game engine.
I spent the remaining time in the week finalising the video which I published on Friday on TikTok. Needless to say, it took much more time than I expected. Also, shortly after publishing the video I decided to delete it. The reason? The captions in the video were difficult to read for certain display aspect ratios. This problem wasn’t noticeable on my PC screen, but it was on my phone, where the di...
2023-05-19 16:05:05 +0000 UTC
View Post
I spent the whole Monday fixing a non-trivial engine bug that I encountered on Friday last week. I spent the rest of the week working on the video that I am planning to publish on TikTok (and maybe as a YouTube short). This is slow and tedious work. I will need a good part of next week to finish. I haven't much else to report, so it'll be a short one this week.
2023-05-19 15:36:41 +0000 UTC
View Post
I finally managed to run the game engine inside a browser (Google Chrome) after compiling it with the emscripten toolchain. As can be seen from the attached screenshot, I tested a minimal example that only uses one asset (a crappy analog clock that I created a long time ago), but I am satisfied for now. It is all I wanted to achieve with this little “experiment”.
This week I also worked on some engine code refactorings and added support for two useful libraries. The first one is
2023-05-19 15:10:53 +0000 UTC
View Post
I started the week working on a new video which I aimed to publish on TikTok. Unfortunately, soon after starting work on this project I caught a bad bacterial throat infection. It gave me a fever and it got gradually worse as the long bank holiday weekend approached. I had to call 111 and got saved by antibiotics.
On this occasion, I really got to appreciate how lucky we are to have these medicines. I have some doubts I would have managed to survive this otherwise. It may sound like an ...
2023-04-21 16:01:11 +0000 UTC
View Post
2023-04-21 15:40:41 +0000 UTC
View Post
2023-04-21 15:39:35 +0000 UTC
View Post
Work on the demo continues. This week I made the train engines spit some fire. The flames grow as the train accelerates, see the video. This was fun work! It also improves the appearance of the demo somewhat, although I am learning that it is all about adding more and more details, while keeping it all coherent to “a chosen style”.
I also wrote a blog post about the flame. I wanted to make sure the animation was consistent with the physics of Special Relativity. See 2023-04-21 15:31:27 +0000 UTC
View Post
This week I worked on improving the terrain in the demo. I replaced the green box placeholder with a procedurally generated terrain. The way this is handled in the shader is pretty inefficient and there are issues with antialiasing and more. Well, I did some work and now, as a result, I have even more work to do.
I also worked on some other improvements to the demo and engine. (1) When revealing the interior of the hill, I now draw a zig-zag line to hint that we are cutting through the ...
2023-04-21 15:07:52 +0000 UTC
View Post
So far I have made all my game assets using shader code, similar to what is done in Shadertoy. Doing things this way (rather than using more traditional tools like Blender and Gimp) has helped me to gain more familiarity with GLSL and with various visual effects techniques.
This week I focused on improving some of the tools I use as part of my workflow. In particular, I improved Pyrtist, an open source tool I developed a...
2023-04-21 14:31:24 +0000 UTC
View Post
This week I focused on improving the visual appearance of the “train in a tunnel paradox” demo. My objective was to replace the remaining placeholder art in the demo with something less rough.
First, I replaced the train rail with a simple repeated texture. The new asset is very simple, but still better than the flat rectangle I had before. The rail was also the first repeated texture in the scene and thus posed an additional challenge.
Next, I added some headlights to the tra...
2023-03-31 17:51:20 +0000 UTC
View Post
This was a short week, as I went on holiday abroad and also had to look after my little one, who caught a cold. I spent most of my working time improving shaders. Last week I concluded that I couldn’t get rid entirely of the normal maps by using depth maps, as the results were unsatisfactory around borders between fully opaque and fully transparent regions. This week, then, I focused on adding code to correctly transform the normal maps for bodies that rotate and contract. The main motivati...
2023-03-31 17:02:40 +0000 UTC
View Post
This week I did a lot of work on the game engine to improve its capabilities. I refactored all the remaining ECS Systems so that they use entity registration. This enables building entire scenes programmatically in Lua.
I implemented spot-lights (directional lights and point lights were already supported) and introduced depth-maps alongside diffuse, normal and specular maps. Depth-maps can be used to correct the position of surfaces. They turn out to improve lighting in the tunnel, maki...
2023-03-02 12:48:36 +0000 UTC
View Post
This week I investigated using AI for asset generation. After watching a video about ControlNet, I think this one, I decided to give it a try. Rationale: I currently have a bunch of assets which have a decent normal map, but I have pretty bland diffuse maps. ControlNet seems to be able to generate pictures from normal maps, so I t...
2023-03-02 12:21:48 +0000 UTC
View Post