12/23/2023 0 Comments Dwarf fortress fps optimizationNote: writing pass at the end of every function is not required, unless it is empty :) If you cannot provide your project, can you at least reproduce your case with a minimal project and placeholder tiles? You can customize the size of the chunks with the quadrant size parameter. Godot Tilemaps are somehow infinite, they already have a chunk-based layout internally, so only visible chunks are drawn. You can make your atlas and define sub-rects, or use image groups. For this, it is recommended to use atlases (one big texture with all tiles in it), so the graphic card can reuse the same texture to draw all tiles. The more different textures, the slower it will be, because the graphic card has to change states for every tile. So the less pixels you draw, the better (yes, even transparent ones!).Īre all 4 tilemaps filled with tiles? Is your Android screen really having a 1080x1920 resolution? Does your device usually runs games smoothly?Īnother thing to keep in mind, how many textures are there in your tiles? On mobile devices, fill rate can be limited (slower to draw pixels). I tried to compress my tileset.tex (which is used to build the Tileset scene) using the "Compress WebP : 0.2", the "Compress PNG" and "Compress VRAM", but any of them make the fps higher.Įach tile of my tileset are 64圆4 images like this one:Įvery tips are welcome, I can give more information if needed but the main fps drop issue is due to my TileMap. Right now, this is the area covered by this function according to a 1080*1920 resolution (everything in dark grey and light grey are covered by the area): I would like to find a way to optimize the game, maybe with a chunk system which is really common on randomly-generated-terrain games, but I don't know how to proceed. This major issue is about the TileMap on Android, once the function _UpdateGrass() has been executed, the game is lagging and FPS drop from 50(without the TileMap) to 07, which is obviously bad. Get_node("TileMapFloor").set_cell(actualchunk.x, actualchunk.y, 0)Īctualchunk = Vector2(actualchunk.x+1, actualchunk.y)Īctualchunk = Vector2(startchunk.x, actualchunk.y+1)įor the moment, it's only one tile, I know, but I will make it more complicated once I will manage to fix a major issue. The first step I would like is filling an area with tiles, so I'm using a while loop like this: func _UpdateGrass(): I'm trying some little things on Android, especially terrain generation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |