Lente ā›µ dev on a boat Profile picture
Hey! I live on a boat and make games :) šŸ³ļøā€šŸŒˆ Currently working on Spilled! - clean up oil spills! ā™»ļø Play the DEMO on Steam šŸ˜Š https://t.co/iOfKkz0Ulw

Dec 4, 2022, 6 tweets

How I made an infinite world for my 3D Pixel Art game!

A thread šŸ§µ#indiegame #pixelart #gamedev

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!



If you want to be notified on release of my game and receive exclusive progress updates, visit Lente.me

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling