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 Tile Engine

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.