Lunacraft Reborn

-- Dev Log --

6/6/2025 (almost there...)

-------------------------------------

I just want to get a quick update out, because I'll be away over the next week and unable to work on the game. I was planning to release at the start of the month, but at the last minute I discovered several bugs/oversights that needed to be dealt with. The only thing I have left to finish is the astronaut behavior, then I'll send the game to some playtesters. Once whatever they catch has been ironed out, I'll release the game. Sorry it's a bit later than I promised. The game should be ready for release no later than the 20th.



5/11/2025 (BIG PERFORMANCE UPDATE)

-------------------------------------

Ok, my last day of school was last Friday, so I'm finally free! I just spent all of the following Saturday (yesterday) working on the game's performance, and I made incredible progress, so I wanted to make a dedicated post. The game had a terrible lag spike when it began generating new chunks, and the performance while it was generating was not optimal. I managed to solve all of this in one move.

I've been representing the chunks as multidimensional (3D) arrays, for obvious reasons. The issue is that these can't be directly written/read to/from disk. They must first be converted to a 1D byte array, which requires iterating through all their elements. A single chunk has 32x32x128 = 131,072 elements. You see the problem. Not only that, but indexing into multidimensional arrays is radically less cache-efficient than 1D arrays.

So, I changed the chunks to be simple 1D byte arrays (the bytes are the block IDs, if you're wondering). Not only did this eliminate the need to iterate through the chunks before saving/loading them, which automatically killed half the lag spike, this also made the chunk generation about 6x faster (13ms -> 2ms, on average), killing the other half of the lag spike. I made some other small tweaks to make the rendering of individual chunks 2x faster (4ms -> 1.9ms, on average).

At the end of all this, the game is running way smoother than it has any right to, averaging about 200fps on my computer at a moderate render distance. I won't get deep into it here, but I made two critical errors in my approach to this. First, I used Unity. Unity's multithreading (Job system) is so restrictive I literally cannot use it to any benefit. Thus, the game is locked to a single core. On top of that, I committed the greatest possible sin in making a voxel game in Unity: having one GameObject per block. In the future I'll probably make a more dedicated post/YouTube video explaining these decisions. Anyway, given these issues, the game should have been dead in the water, but fortunately I seem to have salvaged enough performance for the game to be shippable. At least I hope, we'll see how the playtesting goes.

Anyway, I'll stop there. I expect to release the game around the end of the month. Get ready!


5/4/2025

-------------------------------------

Just a quick update, since I've been silent for a few weeks now. The game is nearly finished! Right now I just need to add turrets, the astronauts, and refine a few things. This is my last week of school, so I'll be focusing on that, but this Saturday I'll get back to the game and finish it off. Shouldn't be more than a few weeks now.



4/12/2025

-------------------------------------

4/6/2025

-------------------------------------

4/5/2025

-------------------------------------

4/4/2025

-------------------------------------

3/31/2025

-------------------------------------

3/30/2025

-------------------------------------

3/26/2025

-------------------------------------

3/1/2025

-------------------------------------

2/19/2025 (9am - 6pm)

-------------------------------------

2/16/2025 (2pm - 8:30pm)

-------------------------------------

2/7/2025 (6pm - 9pm)

-------------------------------------

2/3/2025 (5pm - 6:30pm)

-------------------------------------

1/26/2025 (3pm - 8pm)

-------------------------------------

1/25/2025 (3pm - 7pm)

-------------------------------------

1/18/2025 (1pm - 2:30pm)

-------------------------------------

1/16/2025 (7:30pm - 8pm)

-------------------------------------

1/14/2025 (5pm - 7:30pm)

-------------------------------------

1/12/2025 (7pm - 8:30pm)

-------------------------------------

1/11/2025 (5pm - 6pm)

-------------------------------------

1/10/2025 (3pm - 9pm)

-------------------------------------

1/6/2025 (5pm - 9pm)

-------------------------------------

1/5/2025 (4pm - 6pm)

-------------------------------------

1/4/2025 (4pm - 2am)

-------------------------------------

1/2/2025 (1pm - 8pm)

-------------------------------------

1/1/2025 (5pm - 9pm)

-------------------------------------

12/30/2024 (4pm - 10pm)

-------------------------------------

12/24/2024 (5pm - 8pm)

-------------------------------------

12/19/2024 (1pm - 3pm)

-------------------------------------

12/18/2024 (4pm - 6:45pm)

-------------------------------------

12/11/2024 (7pm - 10pm)

-------------------------------------

12/8/2024 (11am - 6pm)

-------------------------------------

12/7/2024 (10am - 8pm)

-------------------------------------