Each chunk consists of 9 quadrants.
If the camera is in the middle one (5), nothing has to happen since the main chunk covers the whole camera view.
However, this changes once the player starts moving to the outside of the chunk ->
Now moving to the right, the camera can see outside of the main chunk and we should spawn a new one. We do this on the middle right side of the current main chunk, since the camera is in the middle right quadrant!
If the camera were to go to the top right, the same happens, just also for the chunk above, and the chunk in the top right corner!
Then once the camera actually enters a new chunk, this chunk becomes the new main chunk and this process is repeated!
All the chunks live on a grid, and I reference this grid to remove any chunks that can't be seen by the camera!
This was quite a technical one!
If you liked this thread, please retweet the main tweet!
Working on a little game where you clean up oil spills!
Deliver the oil to a recycle facility for coins, and upgrade your boat :)
🧵A thread on the prototyping process!
(and how you can try out the game!)
Every project before this one, when I’d have a cool idea, I would work on it a little, and then move on to the next project.
Never really making a full game.
(I think a lot of game devs will recognize this!)
I started this project out similarly...
I had some cool ideas, but quickly got stuck, as it wasn’t really a game, but just that, some cool ideas.
On to brainstorming and prototyping.
It was frustrating.
I have now fortunately learned a lot: