No more than 255 tiles?
No more than 255 tiles?
I report this as a bug because this game, compared to e. g. minecraft, is not written in java so I don't understand any limitation here and after all not for tiles.
Modding was implemented very early so why limitin tiles to 255 in times where PCs have at last +8 GB memory and at last a quad-core cpu with hyperthreading?
There is no reason for limiting tiles or any other stuff compared to minecraft e. g. the potions due to there potionIDs (well, they where removed later but it is only an example).
I please you, to remove it and implement a dynamic loading for this, thanks.
Modding was implemented very early so why limitin tiles to 255 in times where PCs have at last +8 GB memory and at last a quad-core cpu with hyperthreading?
There is no reason for limiting tiles or any other stuff compared to minecraft e. g. the potions due to there potionIDs (well, they where removed later but it is only an example).
I please you, to remove it and implement a dynamic loading for this, thanks.
Re: No more than 255 tiles?
"255 tile types ought to be enough for anybody." - Bill Gates, 1981
Moved to modding interface requests, I suppose.
Moved to modding interface requests, I suppose.
Re: No more than 255 tiles?
Well, wouldn't it possible to check if an game instance is loading more than the "base" mode?
If "yes" > Modded Game > Allow more than 255 tiles at own risk
If "No" > Let the limit untouched because nothing todo here (or maybe reduce it, if possible)
Or is this not possible atm?
If "yes" > Modded Game > Allow more than 255 tiles at own risk
If "No" > Let the limit untouched because nothing todo here (or maybe reduce it, if possible)
Or is this not possible atm?
Re: No more than 255 tiles?
It's not possible. You would have to compile and ship a different version of the game for it to work.Chaos234 wrote: ↑Thu Apr 30, 2020 5:05 pmWell, wouldn't it possible to check if an game instance is loading more than the "base" mode?
If "yes" > Modded Game > Allow more than 255 tiles at own risk
If "No" > Let the limit untouched because nothing todo here (or maybe reduce it, if possible)
Or is this not possible atm?
We store tiles on a chunk as an array<array<Tile, 32>, 32>
Where each Tile has:
TileID (1 byte)
Variation (1 byte)
So each Tile is 2 bytes big, that means the entire array of tiles on a chunk is 32 * 32 * 2 tiles big or: 2048 bytes big.
That's a compile time constant and you can't dynamically change it runtime.
If you want to get ahold of me I'm almost always on Discord.
-
- Burner Inserter
- Posts: 14
- Joined: Fri Aug 09, 2019 1:35 am
- Contact:
Re: No more than 255 tiles?
Even of it costs me an extra Gigabyte or more in memory and a slight performance hit I would take the increased flexibility of having more space for tiles than currently.Rseding91 wrote: ↑Thu Apr 30, 2020 6:04 pmIt's not possible. You would have to compile and ship a different version of the game for it to work.Chaos234 wrote: ↑Thu Apr 30, 2020 5:05 pmWell, wouldn't it possible to check if an game instance is loading more than the "base" mode?
If "yes" > Modded Game > Allow more than 255 tiles at own risk
If "No" > Let the limit untouched because nothing todo here (or maybe reduce it, if possible)
Or is this not possible atm?
We store tiles on a chunk as an array<array<Tile, 32>, 32>
Where each Tile has:
TileID (1 byte)
Variation (1 byte)
So each Tile is 2 bytes big, that means the entire array of tiles on a chunk is 32 * 32 * 2 tiles big or: 2048 bytes big.
That's a compile time constant and you can't dynamically change it runtime.
Right now you only need 4 mods to hit the limit
Dectorio
Alien Biomes
Asphalt Roads
Krastorio 2
Now because 1.0 is likely more inportant than increasing the limit but it's something that will have to be fixed with sooner or later as this topic will be keep coming back. A temporary solution would be in the in game mod download page and the mod option list the number of tiles a mod would add, how many active per mod and the total amount of tiles active. This would save a lot of trial and error and would let people know how many tiles are currently loaded (or will be loaded).
Re: No more than 255 tiles?
Alien biomes tells you in the log which tiles are loaded and which not...
Ah BTW it also let you disable alien tiles to make room for other mods.
Ah BTW it also let you disable alien tiles to make room for other mods.
Re: No more than 255 tiles?
It's not going to happen. It would be a memory and performance hit for *every single base game player regardless of them using mods* - that's not going to happen.GeneralTank wrote: ↑Fri May 01, 2020 8:22 amEven of it costs me an extra Gigabyte or more in memory and a slight performance hit I would take the increased flexibility of having more space for tiles than currently.
Right now you only need 4 mods to hit the limit
Dectorio
Alien Biomes
Asphalt Roads
Krastorio 2
Now because 1.0 is likely more inportant than increasing the limit but it's something that will have to be fixed with sooner or later as this topic will be keep coming back. A temporary solution would be in the in game mod download page and the mod option list the number of tiles a mod would add, how many active per mod and the total amount of tiles active. This would save a lot of trial and error and would let people know how many tiles are currently loaded (or will be loaded).
If you want to get ahold of me I'm almost always on Discord.
-
- Burner Inserter
- Posts: 14
- Joined: Fri Aug 09, 2019 1:35 am
- Contact:
Re: No more than 255 tiles?
Not as easy as just seeing a number in the in game mod portal. Basically I want the ability to see i real time in game if enabling a mod or an option in a mod would send me over the 255 limit.
Re: No more than 255 tiles?
Wouldn't this be inevitable in the future, anyways? If a major content update is ever released, or Factorio nears the end of its development (implication: community patches), wouldn't an increase in tile limit become absolutely necessary to still allow tile modding?
Hi hungry, I'm dad!
Re: No more than 255 tiles?
Maybe. I don't know the future.spiro9 wrote: ↑Mon Aug 21, 2023 7:20 amWouldn't this be inevitable in the future, anyways? If a major content update is ever released, or Factorio nears the end of its development (implication: community patches), wouldn't an increase in tile limit become absolutely necessary to still allow tile modding?
If you want to get ahold of me I'm almost always on Discord.
Re: No more than 255 tiles?
As part of the Space Age work we had to bite the bullet and change tiles to support up to 65'000~ tiles. It means more memory used and potentially save file size but it's now going to be there.
If you want to get ahold of me I'm almost always on Discord.
Re: No more than 255 tiles?
When you eventually mark this as implemented, don't forget about viewtopic.php?f=28&t=103485
Re: No more than 255 tiles?
Actually sad that you could not find a way to avoid limit increase
Re: No more than 255 tiles?
The limit of 255 tiles means that they're stored in one byte currently. The next larger reasonable size is two bytes, which gets us 2^16-1 or 65535 tiles.
A middle ground between expanded tile limit and memory use could have been using 12 bit per tile, but a) it's awkward to read and b) only makes sense if there's something to fill the second half of the second byte, otherwise it'll get rounded up to 2 bytes anyways. The limit for 12 bit would have been 4095 tiles.
Re: No more than 255 tiles?
Awkwardness to read isn't that bad. There are C/C++ language constructs to assemble these bit fields, or the bits of extra data can be relegated to the top of the half-word and simply ANDed out. The second point is more applicable - there isn't anything in the 1-4 bit range you'd want to store per tile and save yourself the time to look up the tile, and things like 'tile variants' can just be handled by duplicating the base tile. A one-off 64k slot lookup table isn't expensive enough to worry about.Nidan wrote: ↑Tue Aug 29, 2023 8:45 amThe limit of 255 tiles means that they're stored in one byte currently. The next larger reasonable size is two bytes, which gets us 2^16-1 or 65535 tiles.
A middle ground between expanded tile limit and memory use could have been using 12 bit per tile, but a) it's awkward to read and b) only makes sense if there's something to fill the second half of the second byte, otherwise it'll get rounded up to 2 bytes anyways. The limit for 12 bit would have been 4095 tiles.
I do wonder whether it would have been possible to stay under the 255 tile limit if that limit were applied on a per-surface basis.
- TheKillerChicken
- Long Handed Inserter
- Posts: 80
- Joined: Sat Mar 02, 2019 7:06 am
- Contact:
Re: No more than 255 tiles?
If every byte was set to the true 64-bit integer (1 decellion), this game would need ~200 TB of memory. So that is why these practical values exist.
-
- Fast Inserter
- Posts: 153
- Joined: Sun Jul 26, 2020 4:05 pm
- Contact:
-
- Filter Inserter
- Posts: 344
- Joined: Thu Jun 01, 2017 12:05 pm
- Contact:
Re: No more than 255 tiles?
I have no idea where you got that number from. If you were to use a 64bit integer instead of a byte for the tile id, you'd need 8 times as much memory for tile id storage. Nothing else.TheKillerChicken wrote: ↑Sat Sep 02, 2023 6:30 pmIf every byte was set to the true 64-bit integer (1 decellion), this game would need ~200 TB of memory. So that is why these practical values exist.