Skip to content

A chunk system I designed in Gamemaker, made to render larger map in 3D with camera culling

Notifications You must be signed in to change notification settings

barneschism/Gamemaker_3Dchunk_culling

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Gamemaker 3D Chunk

This repo also contain Frustum culling script

A system I designed in Gamemaker, made to render larger map with camera view culling. It has multiple function:

  • World map are devided into chunks. Each chunk are also subdivided into smaller chunk (You can set the level of subdivide, default is 3, minimum is 1 for no subdivide at all).
  • Frustum AABB intersection check are used to determine which chunk is visible, and if they are closer to the camera, smaller chunk are displayed intead.
  • Model need to be add on each subdivide level individually. This way you can add model with different level of detail, or skip some.
  • To reduce draw call as much as possible, vertex buffer are build on a whole row, then use vertex_submit_ext() to render visible chunk only.

Pro:

compare to render every chunk/model individually

  • Efficient view culling
  • Less draw call

Con:

  • Not performance free (depend on the map size, not enough subdivide can increase performance cost exponentially)
  • Memory cost can increase exponentially due to having multiple model
  • All model are expected to have the same texture, using a texture atlas is recommended
  • Model are static, but can be transformed via vertex shader

Screenshot

alt text alt text

About

A chunk system I designed in Gamemaker, made to render larger map in 3D with camera culling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Game Maker Language 95.0%
  • GLSL 5.0%