Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-tile item limit too low. #20483

Closed
Dragonizer1 opened this issue Mar 7, 2017 · 5 comments
Closed

Per-tile item limit too low. #20483

Dragonizer1 opened this issue Mar 7, 2017 · 5 comments

Comments

@Dragonizer1
Copy link

Dragonizer1 commented Mar 7, 2017

The current per-tile item limit is 4096. It's rarely achieved during normal gameplay (unless one drops a lot of 0.01 volume items on a tile), but it becomes a real nuisance when using cargo dimension (in blazemod). I suggest raising it to e.g 8192 or higher. Or make a mod named "More items per tile - 8192" and so forth until "More items per tile - 1 048 576". It's just supposed to be a power of two.

@kevingranade
Copy link
Member

kevingranade commented Mar 7, 2017 via email

@kolsurma
Copy link
Contributor

kolsurma commented Mar 7, 2017

What's the reasoning behind the max? Avoiding a buffer limit somewhere?

@kevingranade
Copy link
Member

Items on a square are stored on a std::list (to avoid reference invalidation), if that list is allowed to grow without bound, the game can encounter severe performance issues as all operations that want to find items on the map must scan the entire list. Instead they are bumped to an adjacent square, which doesn't fix the problem per se, but it at least evens it out a bit.

Unless you construct a pathological case for the map by either rounding up thousands of tiny objects (even then, a pile of 4,000 2-3 mL objects would easily overflow a tile) or removing the volume limit on a square (as blazemod does with the cargo dimension), it is impossible to hit this limit, you'll hit the volume limit for the tile instead.

@Dragonizer1
Copy link
Author

BTW, where is the item limit lurking in the code?

@kevingranade
Copy link
Member

kevingranade commented Mar 10, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants