In this update1
Full notes
Full Project Zomboid update
Read the full published notes in a cleaner layout. The original post stays linked below.
Repeated intro
Hey all, let’s chime in with some of the feverish work being done in the musty basements and damp holes in the ground of the Knox Event. First off, some scribbles from the engine room.
What changed
- Events
- Gameplay
- Maps
- Performance
B42 ENGINE
To catch up and recap, the main highlights of engine improvements for build 42 are as follows:
Basements and underground things!
A flexible per chunk 32 height that can be different in each chunk, allowing parts of the map to be at 32 level height, where others in theory go from -31 to ground floor.
New lighting propagation system that has light bounce off walls and leak through windows, doors and other spaces more realistically – allowing for more natural ambient light effects and getting rid of those room based lighting issues.
The ability to have negative coordinates on x and y, thus opening up map expansion directions in the three previously missing directions.
New chunk based rendering using a depth map to vastly optimise drawing of the game.
It’s this last item that we’re going to discuss today. How 2D games have historically worked is like a deck of cards being dealt: each image is placed on top of the other to construct the scene.
This is terribly inefficient, especially in terms of an isometric game like us with a crap-ton of tiles, tile overlays and so on. The rigid order that the sprites are dealt (so closer ones obscure further away ones, leaving the closest one on top) means that your GPU is unable to optimize how it’s all drawn. Not only this, but every time you deal a card on top of another card (a zombie in front of a wall for example) then that wall is forever ruined by the zombie’s pixels: the only option is to draw the entire thing again, tile by tile, for the next frame. Can I shock you? In the past, people have complained about PZ’s fps.
A common thing we hear is
‘“Well, my PC runs Skyrim/Witcher 3 just fine” but sadly this generally overlooks the fact that GPUs are built and optimized for 3d rendering. A game with this much detail that doesn’t utilize 3D rendering has actually got a tougher time ahead of it than Skyrim or Witcher in terms of making your GPU happy. We also, on top of this, have extremely expensive scene construction CPU time too.
End result
a really a bag of nightmares. Now, in a 3D game you have a depth buffer. This is an offscreen rendering of the scene that tells it all how far from 0->1 each pixel is:
This is really handy, since the deck of cards goes out of the window. You’re no longer having to draw everything from the furthermost thing to the closest, and they don’t have to be ordered strictly as they get closer to the camera either. With a depth buffer you can choose whatever order you want: draw all brick walls first, then all characters hairs, then all grass, then all… you get the idea. Outside transparency, which causes issues, you can draw anything in whatever order is most convenient and most optimized for the GPU. Not only this, but you don’t have to put together the 3D scene polygon by polygon every frame: you have a cached mesh probably already on your GPU memory sat waiting for the next frame, and even if the character turns or moves that mesh is still
Source
Changelog.gg summarizes and formats this update. How we read updates.
