Implementation of new road asset
This week I started with a lot of performance testing of all the procedural generation systems. Unfortunately the performance of the road network generation and the alignment of the terrain to the road network turned out to not be acceptable at the scale I need it for the game. When generating new world chunks those tasks made the frames drop to single digits for several seconds. During that time gameplay was essentially not possible. After a few days of testing alternative ideas I decided to replace the old asset with another spline asset that can generate roads. It took me a couple days to get used to the features of the asset I needed to understand to make the switch but I managed to fully implement all the road network generation and terrain alignment functionality using this asset. With not much time left after I did spend the remaining time this week testing the new implementation a lot and I am very happy with its performance. There are still frame drops to sometimes single digits but it’s only for a split second. This is still noticeable but does not prevent gameplay from continuing. The new implementation is also over 20 times faster which allows the generation of a large area of the world during the load time of the game. This makes sure that the generation of new world chunks will only be required when the player ventures out a significant distance from the starting area. With the new generation speed I am also able to implement further improvements that can generate chunks at times when the framerate is not super important such as when opening the inventory UI. All those planned features should enable that actual frame drops will be rare during important gameplay situations.
Notable tasks this week:
Replaced old road spline asset with new spline based road generation asset
Fully implemented new road generation asset to generate the procedural road network and align the terrain to the roads
Generated Road Network (25km² ~ 10mi²)
Lots of stress testing of the new road generation and terrain alignment
Wishlist on Steam
Join the Discord
That’s all I got this week. I hope you are all doing well.
Stay safe out there and I’ll see you next week.
0 comments