Building items out of blocks

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Building items out of blocks

by MirceaKitsune » Sun Jun 01, 2014 16:35

The idea is actually not mine... or at least it started from another suggestion years ago. Someone once said it would be nice if we could build vehicles by placing blocks on the ground as usual then linking them. This made me consider another ability: What if it were possible to build objects out of blocks, which could be linked to behave as items?

You'd start by placing blocks around as usual. Then you could link neighboring blocks into one entity, adding one at a time to the structure. You could then dig the entire structure by hand, hold it in inventory like other items, and place it back on the ground. Digging it with a pickaxe however should act as currently, and remove that individual block out of the object, so it can still be re-shaped. There should be a limit to how many blocks you can add to a whole structure, and only certain blocks should allow this.

The biggest technical challenge is probably generating and persisting a 3D model on the run, as blocks would be added / removed inside a whole structure. In a sense, this would be one big nodebox created and updated on the run. But if that's overcome, it sounds possible and an interesting feature to have.

What are your thoughts? Can and should we be able to make items out of voxels, which can be taken to inventory and held / placed / dropped / etc?
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

Re: Building items out of blocks

by Casimir » Sun Jun 01, 2014 16:44

Except for the inventory image to update, it is possible to do as a mod right now (but a lot of work).
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: Building items out of blocks

by MirceaKitsune » Sun Jun 01, 2014 19:39

Casimir wrote:Except for the inventory image to update, it is possible to do as a mod right now (but a lot of work).


Interesting. Part of it certainly could be done in Lua already. Typically saving a Minetest schematic containing all blocks involved, removing said blocks from the world, while the schematic is possible to rez anywhere at any moment.

However, I'm not aware of the Lua API being able to register item definitions on the run. And like you said, I'm not sure if an inventory image can be generated. Or even better, a real 3D representation. So you see the entire object as a wielded item if you select it on the hotbar or drop it... which would be a lot better and more desired.

Another thing that would require engine additions is the ability to rez such structures as a Lua entities. So you can build robots / vehicles / creatures out of blocks then give them logics and life. Such requires generating a single mesh out of all the blocks involved... including individual nodeboxes, torchlike drawtype, etc. and allowing it to be attributed to items / entities. This would require one of two approaches;

Method 1: Allow full realtime item definitions. This would let Lua analyze all blocks in the structure, and use the maths to generate one big nodebox containing the full shape. When rezzed as an entity, this new definition is used. When rezzed on the ground, the original schematic (individual blocks) are rezzed so the structure can be edited.

Method 2: Add a new drawtype called drawtype_mts. The name is self explanatory; You assign a Minetest schematic file as the appearance of an entity / item. But this requires the engine to understand schematics in a different way, so they can be compiled into a mesh rather than treated as a list of blocks to spawn in the world.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Building items out of blocks

by rubenwardy » Mon Jun 02, 2014 13:55

Sounds like you are talking about Voxel Area Entities.
 

User avatar
stu
Member
 
Posts: 737
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11

Re: Building items out of blocks

by stu » Mon Jun 02, 2014 21:21

I already did something like this with my meshnodes mod but like micronodes it is mostly experimental and rather limited by minetest's entity system, though it does work better than I ever expected it to. I believe true voxel area entities are somewhere on the development road map.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 29 guests

cron