Update October 2023
Added 2023-11-07 19:19:51 +0000 UTCIn early October I finished the previous month's task of optimizing loading in the game, including making levels load in the background, as well as changing the way levels are reloaded in order to speed up restarting levels. It was the last big programming task. I realized I could have explained more last time, actually, so I will do it now. As usual the 4D makes things a bit harder than normal.
First, some background: levels in Miegakure are lua files. For those unfamiliar, Lua is a scripting language. This allows using more procedural methods to generate levels in addition to placing objects the regular way. For example, when I want to place a bunch of rocks in a region, I don't have to place each rock by hand, I can just specify the region and the number of rocks. I can try different variations until I find one I like. This is good because placing things by hand in 4D is often way too much work as there is much more space to fill, and it is hard to see all of 4D space at once 😁.
Ok, so a common way to program restarting a level in a game is to reload it from scratch but keep a copy of every mesh or texture you have loaded previously, and when you try to load a mesh or texture, look up in your "database" using the file name whether you can just use the copy you already have. This makes sure you don't forget to clear everything you need to clear (like the position and states of the objects) while still being fast. However, because in this game the levels are filled with procedurally made or placed meshes and textures there's not really a file name to use as a lookup for each mesh/texture. You could come up with a name for every mesh/texture anyway, but then you're basically saying to not execute part of the code when the level loads a second time, to not regenerate meshes. So I just did that instead: I just mark certain portion of the lua code that generates a level as only running once. You could also save out everything to a big file, but it feels incorrect to save out things that could just be generated. Anyway, before this change I would sometimes have to recreate very expensive meshes every time the player restarted a level, which would take a while, but now reloading is instantaneous.
For the background loading, because I use OpenGL I unfortunately cannot run graphics command on any thread but the main thread. So I have to load everything in the background thread, then pass that data to the main thread to be sent to the graphics card.
On consoles you are not allowed to hang the game while it is loading, so if we're going to ship on them, this is required work.
The main thread also displays the loading screen, which by the way is inspired by the tesserakt engine logo of the trailers. I wanted something elegant and understated, and obviously something you don't get bored staring at.
Using OpenGL is not the best sometimes and some people prefer DirectX because they say the API is better designed, such as in this case where it would not have this problem. But using OpenGL allows me to run the same code on iOS and Windows in an easy way... and in general it is well supported everywhere. Now that Apple has just announced a way to run DirectX games on Apple hardware by converting its graphics commands to Metal, it might be worth thinking about switching, but for now I will ship with it, mostly to save development time.
After I got done with loading I finally worked on making lots of cool 4D objects to place in the levels, which has been on my list for years, so it is very exciting. Time spent on this is directly translated into cool 4D stuff, which feels good.
I also worked on ways to get the finishing funds that will allow us to finish the game.
I also started redoing the wall trailer with new footage. I will post it here soon. I had to dig up the original recordings from the archives, ahah.
I do want to say, it is hard for me to decide what to show of the game and in what order, because I have worked on this game for a long time without showing anything, so I am very far removed from the average "customer." I want a good ramp up in terms of visual complexity in order to not overwhelm, but now tons of levels are visually interesting in different ways... For example, even in an early level like the Wall, the tree is crazy, even if the level and wall itself are fairly simple...
Comments
Really great update Marc, thank you. I’ve been a fan of the game since the very first trailer. In that time I’ve also been through an entire arc of software development. Feel free to ignore this advice: now that it seems like you have most of the pieces, but not the final order, it works pretty well to pair up with someone who is either a direct customer of yours or can be a proxy to them (in our world they would be a product manager, maybe a “producer” in video game world), to help make tradeoff decisions that lead to shipping something your customers will find fun and love playing. I can also recommend some books if that sounds like something you would want to take on yourself, though usually it’s the relationship with another person that helps wander through problem and solution space faster.
Kelsair
2023-11-08 15:49:59 +0000 UTCMany years ago I did a deep dive into the making of the film "Birdman" and was shocked at how deep the consequences of wanting to make the film look like it was done in a single shot went. Basically every aspect of making the film was heavily impacted by this executive design decision, and required unexpected and unique problem solving in every domain. (E.g. many lines of dialogue had to be trimmed to match the time it took for people to walk down hallway, or to deal with a shoot in a crowded Times Square, the hiring and deployment of a marching band (as crowds of people made room for the band, and thereby room for the camera crew to film the sequence, which would have otherwise been impossible with dense crowds.) I had not considered how the loading of levels could have been affected by the 4D decision, but now I can't unsee it... and I now I get the sense that basically every aspect of making a game in a 4D spacial world has been heavily impacted by this design decision, and requires unexpected and unique problem solving in every domain. Very much looking forward to what is surely a staggering engineering (and artistic achievement) when it's ready.
Benjamin
2023-11-08 03:37:41 +0000 UTC