Update 5 - Doubling Performance

Update 5 (08.02.24):
Features Added:
- Generating Grass Details
- Better Trees
- World Handling Optimization (2x Performance)
- Added Wood Texture
- Added Leaves Texture
- Cloud Textures
- Work Bench Texture
World Optimation
When looking over the code I created I found a little misstep in the code which made the game always try to draw tiles to the screen even if there weren't any new tiles to draw, having this happen every frame ended up throttling the maximum performance that the game could achieve. Adding a simple check before adding tiles to the screen helps double the game's frame rate. I didn't think that having that peace of code would hurt the frame rate as much as it did because of the fact when there are no tiles to update the list would be null effectively making the function add nothing to the screen.
I also added checks in the physics loop to skip a physics tile if its tile type surrounds it, skipping the rest of the physics code checks for the tile, helping to speed up the game. Currently, the game can run at 200 - 300 fps using a 9-year-old CPU (i7 6700k) and using a higher-spec computer I expect this to have increased even more than what I can see on my computer.
Simple Grass Details and Trees Updates
I added grass details to spawn on top of grass randomly over time to make the world have more details in the game. I also made sure that grass details would get destroyed by water and sand tiles if they fell onto them. Next to added leaves and wood textures to the trees to make them look more like a real tree. I modified the code which generates a tree so that the top of the tree is more round and natural, I'll probably have to change how the trees look in the future as they are very basic and a little ugly tbh...
Get Echoes of the Hive
Echoes of the Hive
Explore vast 2D worlds, build automated factories, and prepare for monthly space invasions from a relentless alien Hive.
Status | In development |
Author | Leon Twemlow |
Genre | Survival |
Tags | 2D, Multiplayer, Physics, Sandbox, Sci-fi, Space |
More posts
- V1.3.0 | New UI, Quality of Life, & Textures8 hours ago
- V1.2.5 - New Items13 days ago
- V1.2.134 days ago
- Multiplayer & Lighting Update54 days ago
- Alpha 1.1.0Sep 10, 2024
- Alpha ReleaseApr 03, 2024
- Crafting, Shadows, New Textures, AI and moreMar 19, 2024
- Player, Item Drops, New Saving System and More...Feb 16, 2024
- Massive RewriteFeb 06, 2024
Leave a comment
Log in with itch.io to leave a comment.