GDevelop OpenWorld Example Using Static Chunking
Example of an 2D "Open World" system using chunking
This system allows the development of a Scene that is comprised of multiple External Layouts, and the seamless traversal between those layouts.
Requirements:
- Define a matrix of cells that lays out the orientation of each external layout in relation to each other. (See "Map" logic)
- Each external layout has a single ChunkZone object and all objects are inside of that zone
- Each ChunkZone must have an origin at (0,0) in the scene editor
- Every ChunkZone must be a square with the same width and height
- All objects in the zone must be added to the "ChunkedObjects" group
In this example, as the camera moves between zones the adjacent chunks are loaded, and remote chunks are culled.
Download the code to see how it works
I've done my best to comment all of the systems and how they work
Note: Arrow keys and tab don't work great in the browser, so try full screen or just download and play with it offline?
Download
Download NowName your own price
Click download now to get access to the following files:
OpenWorldExampleUsingStaticChunking.zip 59 kB
Comments
Log in with itch.io to leave a comment.
Whoa, this is really epic! I've always wanted to -try- to implement "draw distance" in GDevelop for an open world game, and never am sure of it.
Hopefully I'll make games again someday and look at this project properly <3