metarmask / teardown

Tools for parsing and converting Teardown game saves
GNU General Public License v3.0
12 stars 3 forks source link

Improve position of truncated shapes #11

Closed TTFH closed 3 years ago

TTFH commented 3 years ago

Move the truncated shapes an offset according to how much the shape were truncated on each axis to match the surrounding objects, for example: before after

OR

Divide large shapes into many smaller Magica Voxel shapes and set the position of each one. This may not work if a shape is in the shape of an L, and it's divided like: | _ and the size on a different axis that the longest one changes, but this should not be a problem since most large shapes are right parallelogrammic prisms.

OR

Find patterns on the shape and use a voxbox.

metarmask commented 3 years ago

For now, I have prioritized that each voxel that is added is added in the correct spot, so things like this aren't misaligned: image

metarmask commented 3 years ago

Dividing is attractive because it could represent all shapes. You could even put them in a compound so the resulting save is the same.

Finding patterns on the other hand would be more storage-efficient and easier to work with if you wanted to change it, but would be more complex, and still couldn't represent all shapes. Patterns should probably also be added for shapes of all sizes.

A fourth, crazy option would be to use a compound + one voxbox for each individual stretch of the same material. This would also fix shapes which use more of a material type than can fit in the standard palette. It would be a pain to change though, take up lots of space and probably slow loading the level.