Jump to content

User:NunnyBabbit/VoxelMancy notes

From NunnyBabbit

VoxelMancy is a voxel-based sandbox game.

Selecting

Most tools operate with a selection. A selection box can be created by pressing 1 to use the select tool and dragging on the world to create the selection. A selection can only be 128 voxels long in all dimensions.

The selection can be moved by holding Shift and dragging its move handles. Resize it by dragging the faces of the box. Holding Ctrl will allow selecting a face obscured by another face.

Copying and pasting

Voxels may be copied by pressing Ctrl + C. Or to also replace the selection with air, cut with Ctrl + X. This creates a ghost form of the voxels which can be dragged to a new place and then pasted with Ctrl + V. The placement can be rotated by holding Shift or flipped by holding Alt.

Demonstration of voxel shape subtraction behavior. Despite being a neighboring voxel, its vertices are set to the smaller voxel's position.

The ghost voxels can be used to subtract existing voxels when Ctrl + X is pressed. It achieves this by removing any voxels directly on the ghost voxels and sets the positions of the neighboring voxels' opposite facing vertices to the ghost voxels. This can be abused to precisely alter voxel vertices. Four vertices are affected if the neighboring voxel is not on a corner, or one vertex if it is on a corner.

Materials

A material picker can be invoked by pressing M. Selecting a material will set that material for filling and painting.

Materials can also be picked from the world by holding Alt and then clicking on a voxel for its material.

If a selection is active, middle clicking a material will paint voxels of the previous current material with the newly selected material.

Tools

This section will only focus on the tools as provided by the alternative toolset. Press Tab to switch from the first-person toolset. Each tool is often invoked by pressing its associated key bind, typically a number.

This page is a stub. It might be nice to expand on it!
Reason: Plenty of tools yet to be documented in their functionailty.


Fill 2

Remove 3

Ramp 4

Paint 5

Cylinder 6

Wedge 7

Flatten 8

Smooth 9

A selection of voxels can be smoothened. It seems to affect voxels within the selection and adjacent voxels outside the selection, excluding corner-adjacent voxels. The smoothing intensity can be decreased by holding down Shift.

Sphere 0

Pyramid -

Cone =

Technical

While voxels are constrained to a grid, they are created by vertices which make up the voxel. A voxel could be thought of as a pair of eight vertices. Since voxel format version 0x01, voxels do not share vertices with other voxels.

Each vertex can have an offset ranging from -120 units to 120 units. A simple cube is 80 units in all dimensions.

The flattening tool can be used to nudge the top facing vertices of a voxel by 10 units. To nudge the other sides, the voxel can be rotated by copying and pasting it in a different rotation.

A dragon showing its teeth. Its mouth is slightly closed.
A red dragon with a notable feature of it showing its teeth. Despite looking like two materials are occupying a space, the teeth voxels are actually one voxel away.

As voxel vertices can go outside of the cube within its voxel grid, this can be used to insert material within a space that's already occupied by a different voxel.

The game uses the following open-source libraries:

File formats

All data types are in little endian.

This page is a stub. It might be nice to expand on it!
Reason: Decompress the voxel data and document its data structures.


Chunk

Chunk data file for solo worlds and cache.

Type Data
UInt8 Version (0x03)
Hash Eight bytes
Int8 X size (32)
Int8 Y size (32)
Int8 Z size (32)
UInt32 Decompressed data length in bytes
UInt32 Compressed data length in bytes
UInt32 Compressed data length in bits
Buffer Compressed data

.blueprint

Type Data
Int8 X size
Int8 Y size
Int8 Z size
UInt32 Decompressed data length in bytes
UInt32 Compressed data length in bytes
UInt32 Compressed data length in bits
Buffer Compressed voxel data
Voxel data

This page is a stub. It might be nice to expand on it!
Reason: This data structure could probably be general voxel data. I haven't yet inspected what chunk data looks like. Also, the voxel data itself is rather complex.


Type Data
UInt64 Length of this buffer in bytes, including this value
9 bytes Unknown purpose. Always 0x0302000000000000
UInt64 Voxel count
Buffer Voxel data
UInt64 Light data length in bytes
JSON string Light data

References