Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

More Efficient Hit Zombie Hit Detection Logic (NOT Solved)

Archive: 7 posts


Hey everybody!

For my hit detection logic for the zombies in my upcoming zombie shooter Zombie Epidemic, I'm using a workaround where the player fires multiple versions of the same bullet, and the enemy registers damage with multiple impact sensors for all of the projectiles and each version of them, with each individual impact sensor wired to a 2-input AND gate, with the second input being a battery, or the damage sustained.

This system works, but it takes up a lot of logic, and my level overheats with about 60 zombies on screen. Although I can take out some batteries, (I'm using 15-ish where I could be using as little as 5.) I don't think that improvement will be significant enough.

I'm looking for a significant improvement in the efficiency of my zombie hit detection logic. Some things to note:
1. I'm looking for spot on hit-detection.
2. These zombies are meant be spawned over and over again. Any solution which requires each individual zombie to have a unique tag won't work.
2012-07-10 15:45:00

Author:
BIGGamerer
Posts: 182


I've been using a 'hit-box' technique to register a hit on enemies for my levels. All you need to do is place a cube of invisible hologram material over the zombie and glue it in place. On this piece of hologram, use impact sensors set to include touching. On each of your projectiles place a tag with a name on it i.e. rifle bullet, smg bullet etc. Set each impact sensor on the hit box to detect tags for each projectile and then wire them to whatever health system you have for the zombie.

Does that make sense?
2012-07-11 14:53:00

Author:
Mopkins
Posts: 123


I've been using a 'hit-box' technique to register a hit on enemies for my levels. All you need to do is place a cube of invisible hologram material over the zombie and glue it in place. On this piece of hologram, use impact sensors set to include touching. On each of your projectiles place a tag with a name on it i.e. rifle bullet, smg bullet etc. Set each impact sensor on the hit box to detect tags for each projectile and then wire them to whatever health system you have for the zombie.

Does that make sense?

Seriously? Did you bother to read through my post? This does absolutely nothing to help me! *facepalm*

I should make myself more clear: The reason I have to use multiple impact sensors is to make sure that damage from every single bullet registers.
2012-07-11 20:26:00

Author:
BIGGamerer
Posts: 182


Sorry, didn't quite understand what you were asking! Not sure how I'd go about cutting it down, sorry I can't help. 2012-07-11 20:44:00

Author:
Mopkins
Posts: 123


Have you considered using the counter-reset system?

http://i.imgur.com/pt3M2.gif

The feedback loop created by the counter-reset system allows for multiple, even simultaneous hits to be registered quickly and separately. The projectile sensor detects a hit, and the counter counts up to 1 and resets itself instantly. This sends a further signal to the second counter (zombie health), which stores the hit while the projectile sensor and first counter are doing their job detecting and processing the next hit.

Want a zombie that takes 10 hits by a certain projectile to die? Put this on the zombie's microchip and change "x" to "10" on the second counter. If you want different types of projectiles to deal different damage amounts, the easy solution is to simply duplicate the logic multiple times on a zombie and lower the "x" for higher powered weapons... but in the case of a player switching between ammo, for example if you want shotgun blasts, a flamethrower and a handgun to all affect the same counter at their respective strengths, you'll need significantly more logic, but it's still doable, and can all be self-contained on the zombie's microchip.

This eliminates the need for batteries!
2012-07-13 05:22:00

Author:
Unknown User


Have you considered using the counter-reset system?

http://i.imgur.com/pt3M2.gif

The feedback loop created by the counter-reset system allows for multiple, even simultaneous hits to be registered quickly and separately. The projectile sensor detects a hit, and the counter counts up to 1 and resets itself instantly. This sends a further signal to the second counter (zombie health), which stores the hit while the projectile sensor and first counter are doing their job detecting and processing the next hit.

Want a zombie that takes 10 hits by a certain projectile to die? Put this on the zombie's microchip and change "x" to "10" on the second counter. If you want different types of projectiles to deal different damage amounts, the easy solution is to simply duplicate the logic multiple times on a zombie and lower the "x" for higher powered weapons... but in the case of a player switching between ammo, for example if you want shotgun blasts, a flamethrower and a handgun to all affect the same counter at their respective strengths, you'll need significantly more logic, but it's still doable, and can all be self-contained on the zombie's microchip.

This eliminates the need for batteries!

My mind has been blown away. This idea sounds awesome! I already see the potential in something like this...
2012-07-14 04:41:00

Author:
BIGGamerer
Posts: 182


Looking forward to this,I've hearted you btw.2012-07-14 23:36:00

Author:
SackBoy98
Posts: 588


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.