Hello players,
I'm sorry for the long delay for the next version. That doesn't of course mean I work any less. The graphical assets are almost finished, and I have begun to implement them. I also did some major performance upgrades as well as some new graphical effects:
Dynamic Traversable Octree
The segments (chunks) themselves already use an Octree structure with great success for a long time (especially for physics). The structure managing the segments was rather static in that regard (2 layers). This has now changed.
What I needed was to get rid of unnecessary data (empty or unloaded segments) without impacting the performance as most common data structures would do.
Techniacl: I don't know if this data structure exists but I'm using a bitmask octree now to manage segments. The nodes on each level have one byte with a mask on what sub-nodes are filled. This means I can iterate over all nonempty chunks without having to even look at an empty one once: The iteration itself looks up the indices it has to look at for the next level in the octree. The structure also now grows and shrinks dynamically.
The benefits of this new structure are affecting in pretty much every aspect of the game. Faster physics, loading, lighting computation, sorting, and all that with much less memory consumption.
As everyone knows, multiplayer games need to be scalable in terms of memory. One of the hardest challenges in programming is to make memory and CPU scalable.
These 1024 ships (of course all with physics, and everything) are only taking 300MB of RAM
A single object with all the blocks combined would be much smaller of course, as each object has meta data overhead (each of these ships has thrusters, weapons, missiles, and salvage beams)
Shadows
I needed a little distraction from the pure numbers and indices, so I made myself a challenge to implement a shadow effect in a day. While I managed to do a basic system in a day, the completion (and it's still not very optimized) took another day.
Work on the other feature is also going great. I know I always say "soon", but I really hope to have something playable this week :D
thanks for playing StarMade,
- schema
I'm sorry for the long delay for the next version. That doesn't of course mean I work any less. The graphical assets are almost finished, and I have begun to implement them. I also did some major performance upgrades as well as some new graphical effects:
Dynamic Traversable Octree
The segments (chunks) themselves already use an Octree structure with great success for a long time (especially for physics). The structure managing the segments was rather static in that regard (2 layers). This has now changed.
What I needed was to get rid of unnecessary data (empty or unloaded segments) without impacting the performance as most common data structures would do.
Techniacl: I don't know if this data structure exists but I'm using a bitmask octree now to manage segments. The nodes on each level have one byte with a mask on what sub-nodes are filled. This means I can iterate over all nonempty chunks without having to even look at an empty one once: The iteration itself looks up the indices it has to look at for the next level in the octree. The structure also now grows and shrinks dynamically.
The benefits of this new structure are affecting in pretty much every aspect of the game. Faster physics, loading, lighting computation, sorting, and all that with much less memory consumption.
As everyone knows, multiplayer games need to be scalable in terms of memory. One of the hardest challenges in programming is to make memory and CPU scalable.
These 1024 ships (of course all with physics, and everything) are only taking 300MB of RAM
A single object with all the blocks combined would be much smaller of course, as each object has meta data overhead (each of these ships has thrusters, weapons, missiles, and salvage beams)
Shadows
I needed a little distraction from the pure numbers and indices, so I made myself a challenge to implement a shadow effect in a day. While I managed to do a basic system in a day, the completion (and it's still not very optimized) took another day.
Work on the other feature is also going great. I know I always say "soon", but I really hope to have something playable this week :D
thanks for playing StarMade,
- schema