You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 7, 2022. It is now read-only.
I'm prototyping a concept where the overmap is much larger than the visible map, and is made up of chunk types. Some distance from the map edge, I want to generate adjacent chunks off-screen, add them to the map, and potentially spawn in enemies/items/etc. I'd like to spawn chunks a bit away from the character, to allow for things like enemy troops to spawn a chunk or two away and advance on the player's position if they are detected. So it wouldn't be just-in-time, but maybe a screen or two of tiles.
Is there an example of this? I'm not thinking it has to be complex--just take the random world example and spawn in adjacent off-screen chunks.
In the meantime, I'm curious about how this currently works. Does autospawn just handle creating the chunks for me from a group of tiles, or does it detect when the camera is about to move off-screen and create a new chunk? I'm not sure whether the current chunk events are meant to tell me that I should run my map generators and create/add a chunk myself, or if it's up to me to detect when a new chunk is needed and do that myself.
Thanks.
The text was updated successfully, but these errors were encountered:
There is a sort of example of this with the redo of random_dungeon. I also just opened up the API on tilemap so that you can access to .events() which will allow you to see when chunks are created / despawned, allowing for stuff to be spawned in upon chunk creation if it needs to be. Otherwise, if the chunk already exists, then it will already have the data from before.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm prototyping a concept where the overmap is much larger than the visible map, and is made up of chunk types. Some distance from the map edge, I want to generate adjacent chunks off-screen, add them to the map, and potentially spawn in enemies/items/etc. I'd like to spawn chunks a bit away from the character, to allow for things like enemy troops to spawn a chunk or two away and advance on the player's position if they are detected. So it wouldn't be just-in-time, but maybe a screen or two of tiles.
Is there an example of this? I'm not thinking it has to be complex--just take the random world example and spawn in adjacent off-screen chunks.
In the meantime, I'm curious about how this currently works. Does autospawn just handle creating the chunks for me from a group of tiles, or does it detect when the camera is about to move off-screen and create a new chunk? I'm not sure whether the current chunk events are meant to tell me that I should run my map generators and create/add a chunk myself, or if it's up to me to detect when a new chunk is needed and do that myself.
Thanks.
The text was updated successfully, but these errors were encountered: