• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

0 life dead item (deadborn item)

Level 26
Joined
Feb 27, 2019
Messages
912
Dead item benefits:
1. Dead items on the map dont have any pathing. F.e. a living item can be placed on a dead item but a dead item cant be placed on a living item.
2. In certain situations, probably when an item is placed on its own location, the function SetItemVisible(item, false) executes much faster for dead items compared to living items.
3. Dead items cant be destroyed by taking damage or be removed from the game via triggers. This, in conjunction with no pathing, can render the need to use SetItemVisible or SetItemPosition after item usage absolete.

Creating a deadborn item:
A deadborn item can be created by setting its life to 0 in the editor.

Removing a deadborn item:
Deadborn items can be removed from perishing or when used on acquire. For that reason, it makes sense to enable these options for deadborn items.

Example:
Attached concept example using Check Walkability and two triggers, the difference being one is vanilla with living item and the other uses a deadborn item. Original: Check Walkability

EDIT: It appears the difference in performance in the test map is only when the living item is placed within its own position within the same frame or potentially during different frames. The difference when testing with random locations is almost negligable. The conclusion in regards to performance is that dead items perform better in certain situations but how likely those situations are to occur is unknown.
 

Attachments

Last edited:
Oh this is great! ItemCleanup would need to be updated to make sure it doesn't remove that particular item, unless it's stored outside of the world bounds (which as long as it doesn't crash should be fine).

Knockback 2.5D would also really benefit from this change, especially if I no longer have to enumerate the living items we could get loads more performance benefits!
 
Updated main post for number 2 because it appears my testing method was flawed and unrealistic since it checks the same point 25000 times. I redid the test with random locations and the difference in execution for SetItemVisible(item, false) shrank to almost the same as with a dead item. It means there are certain situations when it executes slower for living items, probably when its placed within its own location. The result is that the difference in performance appears to be negligible. It all depends how common or realistic that specific situation is to occur.

ItemCleanup cant remove a deadborn item since it cant be removed with RemoveItem. It will try each time though.
Knockbad 2.5D wouldnt benefit from that part because living items still have to be enumerated since dead items cant be placed on living items.
 
Back
Top