Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)
extra nodes are a lot more efficient than entities.
D00Med wrote:extra nodes are a lot more efficient than entities.
Is it really more efficient to make lots of nodes rather than a few entities that can swap their textures? (I ask this in a general sense, not specifically for itemframes)
Hybrid Dog wrote:l think to keep toolwear, metadata, whatsoever, you could simply use stack:to_string() and save the result to meta.
No, sorry. This mod is no alternative for MineClone 2 so far. Support for items is way too limited, so I wouldn't even use it on a server either. A good item frame mod should support as many items as possible (ideally all of them).
Lag-free itemframes sounds really cool, especially important for servers. It's annoying that the items are invisible unless you stand 2 cm in front of the item frame. xD
Having not tested it so far, does this work with boats, carts, water buckets, lava buckets, wheat seed and cotton seed from Minetest Game? Because other item frames fail for these items.
I'm not really happy how the flat items look like on the frame. I actually like the design of items “popping” out of the frame. But I fear that's the price we have to pay. :-/
On the other hand, is it really a good idea to avoid entities at all costs? Maybe the real fix should be done in the engine, by making entities more efficient, less laggy and less buggy in general.
Many items are not supported:
- Stairs
- Slabs
- Fences
- Fence Gates
- Walls
Beds Seeds Chests Cart Boat Key, Skeleton Key
Flower pots from [flowerpot] Iron bar and glasspane (xpanes)
Screwdriver (rotates item frame instead)
Bugs:
- The same grass drop bug as in your flowerpot mod
- Leaves are flat instead of cubic
- Placing a water source, lava source or river water source looks very weird. Probably because they're animated?
- The dropped item has a bad appearance (faces missing on the backside when it rotates)
Fun fact: The furnace is seen from the backside instead of the front. XD
- I would change the item name (“description” field) to “Item Frame”. This is the name which most players would recognize and understand. “Frame” sounds overly generic. Note: The mod name is OK.
- Add a inventory image. This also fixes the issue with the appearance of the dropped item
- Make the node wallmounted/attached (like a sign), so it doesn't float
- Make the node non-walkable, otherwise the player can use item frames to climb up walls. xD
- Use rightclick to make item pop out, intead of punching. I think this feels more natural. IMO I think rightclick should generally be seen as the “interaction” key by nodes, not punching, as this doesn't conflict with mining.
FYI, If `meta set nodedef` ever makes it into minetest_game, It will solve so many issues that remain, and things like stairs, slabs, walls and fences become very reasonable to include in this mod.
https://github.com/minetest/minetest_game/pull/1563
Fix for minetest_game's issues with right click. I omitted the screwdriver, but this fixes boats, beds, seeds, carts and keys.
I Can't make it attached_node, since then it can't hang on a wall. Making it wallmounted would make it not rotatable! I don't like either of these options. I agree it should fall if the node backing it disappears, but I don't see how I can do that without sacrificing something else yet.
Screwdriver (rotates item frame instead)
half of these are bugs. Cart, boat are supported, but minetest_game doesn't pass the on_rightclick through, as I said above (and I will attempt to fix this)
You don't want your itemframe rotated? I thought that was pretty neat that it could. Obviously shift-right click may be something we need to implement on some items.
Many items are not supported:
Stairs
Slabs
Fences
Fence Gates
Walls
would require me to make another *mesh* to support those shapes. That means more modelling work, and at this time I don't think that it's reasonable. It also means even more registered nodes, I just don't think that's important right now (yet).
I Can't make it attached_node, since then it can't hang on a wall. Making it wallmounted would make it not rotatable! I don't like either of these options. I agree it should fall if the node backing it disappears, but I don't see how I can do that without sacrificing something else yet.
Oh boy. I haven't thought of this. Good points.
Wuzzy wrote:Many items are not supported:
Stairs
Slabs
Fences
Fence Gates
Walls
would require me to make another *mesh* to support those shapes. That means more modelling work, and at this time I don't think that it's reasonable. It also means even more registered nodes, I just don't think that's important right now (yet).
Well, I already feared it would boil down to this. Entities are the answer to this, but then there's the lag issue again …
What do you think about this idea? Making a mixed model. For flat or cube-shaped items, the current default meshes are used (and efficient), but for any other shape with no mesh, an entity is spawned. It's a trade-off between performance and trying to support as many items as possible.
I'm probably just talking crazy here. The real fix would be the new Lua API function (set meta nodedef). :-)
Wuzzy wrote:Right ...
I totally forgot that for every item, a new node would be needed, because of the textures. Which essentially doubles the number of nodes. Holy cow!
I guess I just wait until Minetest has some better Lua API support, then.
Thanks for your time anyway.
sofar wrote:Remember, even with 250 node registrations, this is still far more reliable and performant than entity based item frames :)
Sokomine wrote:Thanks for the mod. Reducing the amount of entities will certainly help. Admittedly, the more 3dish appearance of the older itemframe mod also looks very good. Maybe they can be combined?
Sokomine wrote:Use your version for the cubic nodes and whatever gets displayed well and the old one for other drawtypes?
There's also the smartshop mod that offers up to four items in a shop. Probably too many possible combinations for thsi approach? I didn't take a look at the implementation yet.
Byakuren wrote:From what I know about Minetest, Lua entity ticking just calls the on_step of every live lua entity. Wouldn't it be really cheap then (in terms of Lua execution time only) to have ten thousand entities with no on_step callbacks, since it just adds (a loop iteration + a few table accesses) times ten thousand, all in Lua?
sofar wrote:Byakuren wrote:From what I know about Minetest, Lua entity ticking just calls the on_step of every live lua entity. Wouldn't it be really cheap then (in terms of Lua execution time only) to have ten thousand entities with no on_step callbacks, since it just adds (a loop iteration + a few table accesses) times ten thousand, all in Lua?
The engine still needs to render all the entities separately, whereas the nodes are part of the mapblock mesh, and are rendered as one big mesh.
So no matter what, nodes are far more efficient to render.
sofar wrote:While making entities more robust, they are always going to consume lua execution time and require globalstep maintenance.
Users browsing this forum: No registered users and 3 guests