Difference between revisions of "User:Numzero/NodeEntity"

From Minetest Wiki
Jump to navigation Jump to search
(Created page with ":'''''This is a personal opinion''''' This is my imagination of ''how things should work''™. '''Node''' should be just an entry in a node array, containing as little inform...")
 
Line 7: Line 7:
  
 
'''Node entity''' is the key concept. It should be as lightweight as possible, but only as possible retaining all the customization options. It would represent any non-plain object that is currently represented by a node, or a set of different nodes replacing each other all the time (like active and inactive furnace).
 
'''Node entity''' is the key concept. It should be as lightweight as possible, but only as possible retaining all the customization options. It would represent any non-plain object that is currently represented by a node, or a set of different nodes replacing each other all the time (like active and inactive furnace).
 +
 +
Node entity has no velocity, position or other physical properties: it is strictly bound to the parent node. It should behave more like node than entity. But it should support some flexibility of the entity: custom mesh, custom textures. It would also keep all the extended state now known as metadata, node timers, etc.
 +
 +
When anything happen with a node, it should inform its entity (similar to the current callback mechanism) that should be able to cancel most actions. Actually this may make callbacks on the node itself no more necessary.

Revision as of 22:38, 15 January 2017

This is a personal opinion

This is my imagination of how things should work™.

Node should be just an entry in a node array, containing as little information as possible.

Metadata would be obsolete.

Node entity is the key concept. It should be as lightweight as possible, but only as possible retaining all the customization options. It would represent any non-plain object that is currently represented by a node, or a set of different nodes replacing each other all the time (like active and inactive furnace).

Node entity has no velocity, position or other physical properties: it is strictly bound to the parent node. It should behave more like node than entity. But it should support some flexibility of the entity: custom mesh, custom textures. It would also keep all the extended state now known as metadata, node timers, etc.

When anything happen with a node, it should inform its entity (similar to the current callback mechanism) that should be able to cancel most actions. Actually this may make callbacks on the node itself no more necessary.