-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Setting world size larger than default blows up once the default size is reached. #72
Comments
I might suggest making a world per level, or bumping the max entities to something higher. Bitecs can handle millions of entities with no issues. |
Thanks for the quick reply :)
I thought that's what
Ideally, yes! That was the idea behind my first attempt at a multi-level dungeon, but on trying to save off and restore levels I ran into a different bug (#67) |
Are you calling |
Yep, it's the first thing I do after initial imports. Thanks |
@luetkemj did you or can you try the latest version of |
@NateTheGreatt bug is fixed in |
awesome 😄 i'll close this issue then |
I'm building a standard multilevel dungeon roguelike. Each level creates around 3500 entities. If the default world size is left alone, at level 27 I get a very clear error message:
bitECS - max entities of 100,000 reached, increase with setDefaultSize function.
If I increase the limit to 1,000,000 I get a different error when I reach the original default of 100,000 entities.
Uncaught TypeError: Cannot read properties of undefined (reading 'fill')
Seems like some of the internals are still limited to the default world size.
For the sake of completeness I tried setting the default to 1,000 and instead get the correct error upon reaching 1,000 entities:
bitECS - max entities of 1,000 reached, increase with setDefaultSize function.
How To Repro:
Clone project and check out the
world-size-bug-repro
branch of my repo here: https://github.com/luetkemj/pixitestInstall deps
npm i
Start dev server:
npm start
Go to
localhost:8080
in your favorite browser.Your character
@
starts on a stair case>
just press and hold the>
key until you get to the 27th floor or the game blows up. Default size is set to 1,000,000 on ln18 src/index.js.The text was updated successfully, but these errors were encountered: