Skip to content

Instantly share code, notes, and snippets.

@AugustoMoura AugustoMoura/myWorld.gwm.lua Secret
Created Jul 11, 2015

Embed
What would you like to do?
world =
{
blocks_size = 2500;
blocks = -- a block is a class, that have a position in the map, a sLOD mesh and a distance to replace childs by a sLOD. Also have methos to load/unload childs and so on..
{
{
{0, 0}; -- the position in the world, integer value
"./blocks/block_0_0.blk";
};
{
{0, 1};
"./blocks/block_0_1.blk";
};
-- ...
{
{2, 6};
"./blocks/block_2_6.blk";
};
-- ...
{
{-15, 12}; -- world position = vec2(blocks_size * index.x, blocks_size * index.y), the Z coordinate is set per object
"./blocks/block_-15_12.blk";
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.