One dimensionnal tileset edition

Hello ! I used tiled for a little time but this time I am working on a project that need pretty much only optimization. And one idea was to set all the tiles in my tileset in a long line to have a better memory access (less multiplications…). But now I’m in tiled to make my maps and the problem is that every time I want to select a tile I need to scroll a long time.
I found that you can “move“ tiles but it seems like it’s not not possible for one dimension tileset to move tiles into a second dimension, even trying to add a “rows=”100”“ in the tileset tmx file didn’t changed anything (Tiled even removed it :’) )…

(I hope you understood my problem… English is not my native language…)

A one-dimensional tileset does not speed up memory access in a meaningful way, and can instead increase VRAM usage because GPUs prefer square textures and may pad non-square textures to square. Compared to that, I suspect the multiplications are practically free. If the only reason you’re putting your tiles in this sort of inconvenient arrangement is to eliminate a few multiplications, I recommend against it.
In addition, on most hardware, you only do this multiplication once when generating the textured mesh that you draw, and the draw calls, which are what you do every frame, don’t actually do any multiplication at all.
I don’t know your situation or the exact hardware you’re working with, but there’s a good chance that this is either an unnecessary optimisation, or even an anti-optimisation - something that’ll make your game run (marginally) worse rather than better, especially if you need to target more than one specific piece of hardware.
If you’re working with the kind of hardware that actually benefits from this, you’re probably also not using the Tiled files directly and instead processing them into easier-to-load formats - why not rearrange the tileset image as part of that processing?

In any case:
In Tiled, click the “wrap tiles” button (looks like a grey arrow). This will wrap the tiles to fit the width of the space allotted to them instead of maintaining the arrangement they have in the source image.
If you’re looking for a specific width, like you can have for Image Collections (with a “columns” attribute, not “rows”), that’s not possible outside of Image Collections.

Thank you for your explanation ! I understand what you mean and it’s a little bit logical in these examples but I’m working with a calculator, and the way it going to work is that it only load in ram tiles it’s going to use for the map. And no GPU mean there is not any types of “textures“ offered by the sdk. And multiplication are not that bad but yeah… I feel like if it’s possible to economies any instruction, then let’s do it !