The True Slime King is a single player hardcore puzzle platformer with a focus on tight controls, challenging maneuvers, and mind-bending puzzles. All of this is achieved with just three buttons: left, right, and jump. Use your sliminess to stick to walls and cling to ceilings in order to avoid obstacles and reach hidden items. Whether you're a speed demon crushing records or you're just interested in progress through the story mode, one thing is guaranteed: you will die a lot in the process. But don't worry, you'll be respawned and back in the action just as fast as you can die.

Post news Report RSS Chunk Loading for Large Worlds

I've begun implementing a chunk loading system since my larger levels can have a lot of instances that need to be initialized.

Posted by on

Now that I've started building a bigger overworld, it's become necessary to implement some sort of chunk loading system. The initialization scripts for the walls objects take up the most CPU in the first step when a new room loads. This is because they all run a script that autotiles them.

I've begun implementing the chunk loading system. There is a 3x3 grid of active chunks that moves around with the player and initializes the wall objects as it reaches new chunks that haven't been loaded. Right now it only works with the wall objects, but I plan to use it for as many objects as is feasible. I would also like to use chunk loading on as many levels as I can (not just the overworld), because I have a few levels that are large or have a lot of wall objects and I don't want them to be excessively laggy on the first frame the player enters the room.

Below you can see what the chunk loader looks like in action. Each wall is on a 32x32 grid, and each chunk is 96x96. I use a 2D array to keep track of which chunks are loaded, and in the GIF below you can see that I've drawn a transparent red overlay on all of the unloaded chunks. You can also see the wall tiles getting initialized with their autotile script as the player (and active chunk area) moves around.

The chunks will be much larger in the actual game so that you don't see any of the loading going on, but for demonstration and debugging purposes, I have left them small. Also, the grids and red overlay will not be drawn in-game.

2017 07 27 - Slime King

As a bonus, in this GIF, you get to see some of the new overworld and some of the new door entrance sprites :)

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: