Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+2)

Hey, thanks for the comment!

I did benchmark a larger world (200x200 tiles) when deciding to go down the custom drawing route. To clarify, I didn’t re-implement the low-level drawing functions using native code or outside of the Godot engine: I just shifted from using AnimatedSprite nodes that rendered the tiles to drawing the sprite textures in a centralized way using the _draw function. So, in a sense, this optimization was more about when/where to store and manage info than about what/how to draw at an API level.

The AnimatedSprite nodes were giving me 1) an overhead that I wasn’t using (of transforms, signals, animations management); 2) for some reason were not being camera-culled properly (which might be related me mis-using the camera / world system? I don’t know). So, I moved the tile drawing to one central class (the Map class), which handled camera culling, dirty flags, and the sprite-drawing/Y-sorting. A cool thing is that Godot automatically caches the draw_texture if they are drawing the same thing at the same place, so this was even easier to setup.

Cheers!