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). The more different textures, the slower it will be, because the graphic card has to change states for every tile. 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. You can make your atlas and define sub-rects, or use image groups. Godot Tilemaps are somehow infinite, they already have a chunk-based layout internally, so only visible chunks are drawn. " Are all 4 tilemaps filled with tiles? Is your Android screen really having a 1080x1920 resolution? Does your device usually runs games smoothly? " I deleted pass where it needs to be deleted, and replace the set_cell by set_cellv, and the game is now between 19 and 22 fps, that's much smoother and somewhat acceptable for a minimalist game ! " Note 2: you can use t_cellv(position, cell) to set cells, it's faster than t_cell(position.x, position.y, cell " Hi Zylann, wow so many info that's great thank you :) " Note: writing pass at the end of every function is not required, unless it is empty :) " Note 2: you can use t_cellv(position, cell) to set cells, it's faster than t_cell(position.x, position.y, cell Note: 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. Only the TilemapFloor is filled by tiles, others aren't used yet, but I planned to add some trees, rocks, and things like this so TileMapFloor will be the most filled. My device runs games really smoothly, even 3d games like Real Racing. But I just noticed its screen isn't 1080*1920 but 720*1280 ! Time to make the script fit to any resolution I think, my bad on this one ^^Įdit: Well I don't think it's worth it, I would like every devices to get the same map size so it's good like this IMO. " You can customize the size of the chunks with the quadrant size parameter. " Another thing to keep in mind, how many textures are there in your tiles? " What's the unity for the quadrant option? According to my research, quadrants are obviously like this if I understand:īut what does the value represent? I tried different value without seeing any visual changes. I cleaned my tileset image, now there is only 5 textures in my tileset.tex and only 3 added to my tileset.res for the moment. But unfortunately it doesn't save any fps. Well I totally used the wrong word in my function and I have already changed the name function to _CreateGrass(), I don't know what I had in mind when I named it Update lol.īut no this function is called only one time don't worry ^^ Oh OK it took me quite a time to understand why your were thinking _Update Grass() was called every frame, and it's surely because of the Update word.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |