Package Name: Terrain and Tile Map Designer and Generator
Crayta IGN: MechanizedIT
This package allows the creator to 'draw’ out a floorplan or terrain for a large
map or dungeon and have the world generated at runtime for them using their own
templates. With dynamic loading based on player position, creators can build massive
worlds/dungeons without concern for entity count.
Example Tile Map Designer and Generator Usage:
Drag out the 'TileMapExample’template into the world (be sure to set rotation to zero) and press
play. The contents of this template contains 'mapLevels’ that are voxel meshes that
represent the floorplan that will be generated on play.
Each mapLevel has a 'TileMapGenerator’ script attached that has various properties that
can be set to alter what is generated for that tile map, eg. the 'Ceilings’ property can be
unchecked to not generate ceilings. Floor, wall, corner, and ceiling template properties
are arrays that allow for adding various template variants that are randomly chosen
from when generating the map.
With the use of mark locators, placed in the center of a voxel and attached to the
mapLevel voxel mesh, it is possible to override that tile or spawn additional templates
on that tile. The mark locator contains a script called 'TileProperties’ that allows the
creator to specify the template to use and whether to override or addon to that tile.
With the use of Adam’s Simple Image script, images can be uploaded and used to create
new mark locators with any template that the creator would like to add to the map, which
could inclue props, enemies, loot, etc. Markers can be any entity with the ‘TileProperties’
Example Terrain Generator Usage:
Drag out the 'TerrainExample’ template into your world (NOTE: set the rotation to zero
or you will get funky results). Inside the template, there is a mesh
that represents your desired terrain, underneath that mesh are the chunk voxel mesh
templates that the 'TerrainGenerator’ script is attached to. There are a number of
properties that allow creators to customize their terrain such as voxel materials
based on height, how wide and high voxel on the design map should be when generated in
the world. Height of the terrain, smoothness, and many other properties can be set to
allow for customizing the terrain to the creator’s liking. The Terrain generator also
supports generating props on the terrain by using 'Mark’ templates with a 'TileProperties’
script attached; be sure to attach the maker to the mesh containgin the ‘TerrainGenerator’
script, as seen in the 'TerrainExample’ template.
NOTE: the ‘TerrainGenerator’ script can be attached to any entity, it is only a voxel mesh
in the example because it helps show the size of the chunk grid. Also, any voxelmesh or mesh
with collision can be used to create the terrain design map, it is only there for raycasts
to map, so long as it is placed above and to the northeast of the position of the entity
with the ‘TerrainGenerator’ script, and so long as it is within the range of the raycast scan
determined by the ‘Map Size’ property.
NOTE: The example uses fairly large chunks and does not load very fast, creators would do
better to make smaller chunks for each section of their map.
Communtiy Packages Used:
Simple Image - Adam0_Crayta
The current version is very limited, and was created for the ‘Dungeon Master’ build jam.
Please message me, MechanizedIT, on the discord if you find any bugs, or have suggestions.