relativisticgame posts
Week 42: collision avoidance
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 more convinced that the best approach to dealing with collisi...
New article: collision avoidance
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 simple concept demo. It uses classical mechanics and the player doesn't feel that nice to control, yet. I am working to improve the coll...
New article: the quirks of relativistic rigidity
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.
Week 41: improving collisions
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 ...
Week 40: Robot's video and work on collisions
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 experiment to check whether Tiktok/YouTube dev-log videos would get me more reach than posting on Twitter. So far my success on Twitter has been limited to say th...
Week 39: the robot screen comes alive
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 pixe...
Week 38: the robot's LED screen
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...
Week 37: browser support with Emscripten
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 successfully hacked Emscrip...
Week 36: lighting in my game engine
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 ...
Week 35: flames on the robot's engine
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 shad...
Designing the main character of my game
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. I...
Week 34 progress update
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...
Week 33 progress update
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 l...
Week 32 progress update
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 correct...
Week 31 progress update
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 satura...
Week 30 progress update
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 videos but that’s not sufficient to give the project the visi...
Week 28-29 progress update
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.
Week 27 progress update
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 scre...
Week 26 progress update
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.
Week 25 progress update
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 tw...
Week 23-24 progress update
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 survi...
Week 22 progress update
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 ...
Week 21 progress update
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 ...
Week 20 progress update
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 long time ago. I have been...
Week 19 progress update
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...
Week 18 progress update
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 bod...
Week 17 progress update
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...
Week 16 progress update
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 thought it could help me. I downloaded a few 5 GB files and tried to run Stable Diffusion 2 and ControlNet on my machin...















