Draft
Conversation
Contributor
|
That's a good attempt to make an unlimited object pool but... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was something I have been wanting to do for a while and finally managed to. Thanks to Isaac and FrozenAlex for their help.
The object limit doesn't become truly infinite though. Aside from the obvious limiting factor of computer power, there appears to be other forms of the object limit. Sync objects have their own limit determined by
SYNC_ID_BLOCK_SIZE(which I don't think I should increase), and the game seems to give up on processing object graphics at a little below 5000 objects (but they are still definitely processed since in testing. I was able to interact with the invisible coins, which were my main test object). The game isn't very stable past that point, so the object limit still exists, but has been increased to 4096 (which isn't very much).There's no doubt some form of memory leak here since this is my first time using the heap. This, combined with the issues mentioned last paragraph, and uncertainty of how well this will work across the network, is why this is currently a draft. Any help would be appreciated.
Testing mod: