mheyer32 / alienbreed3d2

Alien Breed 3D II The Killing Grounds
33 stars 4 forks source link

Two player mode item respawn #113

Open 0xABADCAFE opened 11 months ago

0xABADCAFE commented 11 months ago

Allow respawning of collectables in two player mode:

0xABADCAFE commented 7 months ago

Implementing this will need a mechanism to move the item to a different zone. Normally, elements are removed by setting their zone ID to -1, but that allows them to be reused for other object types. For collectables, it might be better to set their zone ID to a different value (not negative), e.g. 32767. The list of objects that have this zone id would need to be traversed each frame to have their counters decremented so that they can be respawned. It would also be necessary to back up their actual zone ID somewhere, though there tend to be numerous fields in the entity type that may be suitable.