Anixias
Member
Currently, I have an isometric-projected ds_grid containing tiles (this ds_grid is the terraindata grid, containing enumeration values such as tile.grass or tile.water, etc.)
I have another grid of a matching size called variant and every cell is set to random(1) on the grid's initialization. This is so that if I have multiple graphics for a single tile, when rendering, it multiplies sprite_get_number(spr) by the corresponding number in variant to get a subimage, to remove repeated textures. I made 2 different grass textures, and you can not tell it is repeated at all. It's pretty fantastic. Adding a third tile would erase virtually all repeats.
So my problem comes into the fact that 32x16 tiles are being rendered in 1080p without scaling, resulting in a large amount of tiles being rendered. I also applied min/max row/column when looping to reduce draw calls by only drawing what is on screen, and although this helped a lot, my beast computer gets 60-70 fps_real when in 1080p. Note, I have put no gameplay, and the only step event code is to convert mouse coordinates into isometric world coordinates.
My initial thought was to collapse like-tiles into 2x2 or even 3x3 or 4x4 tiles, to severely reduce call count. This would work with tiles that had only one texture, such as water, but with grass, I would either have to lose the variant grid or create many different subimages in the collapsed tile graphics (For example, 1x1 grass has 2 possible textures, 2x2 grass has 16 different possible images, and 3x3 grass has 512 possibilities, and 4x4 grass has 65,536 possibilities. Obviously, this is not feasible).
My question is, how could I improve my FPS if I require the variant grid? If not that, how can I optimize while also reducing noticeable tiling?
I have another grid of a matching size called variant and every cell is set to random(1) on the grid's initialization. This is so that if I have multiple graphics for a single tile, when rendering, it multiplies sprite_get_number(spr) by the corresponding number in variant to get a subimage, to remove repeated textures. I made 2 different grass textures, and you can not tell it is repeated at all. It's pretty fantastic. Adding a third tile would erase virtually all repeats.
So my problem comes into the fact that 32x16 tiles are being rendered in 1080p without scaling, resulting in a large amount of tiles being rendered. I also applied min/max row/column when looping to reduce draw calls by only drawing what is on screen, and although this helped a lot, my beast computer gets 60-70 fps_real when in 1080p. Note, I have put no gameplay, and the only step event code is to convert mouse coordinates into isometric world coordinates.
My initial thought was to collapse like-tiles into 2x2 or even 3x3 or 4x4 tiles, to severely reduce call count. This would work with tiles that had only one texture, such as water, but with grass, I would either have to lose the variant grid or create many different subimages in the collapsed tile graphics (For example, 1x1 grass has 2 possible textures, 2x2 grass has 16 different possible images, and 3x3 grass has 512 possibilities, and 4x4 grass has 65,536 possibilities. Obviously, this is not feasible).
My question is, how could I improve my FPS if I require the variant grid? If not that, how can I optimize while also reducing noticeable tiling?