Poltergeists

If you liked this item, please rate it up on Steam Workshop page.

Author: Geneosis

Last revision: 27 Feb, 2022 at 16:46 UTC

File size: 9.9 MB

On Steam Workshop

Description:

You broke so many props… Now they want revenge!

Now in v4.0.0! (see full patch notes)

Poltergeists have invaded the map, try to survive them as long as you can! You can shoot at the object they possess to exorcise them and reduce their number. But each time you fail to exorcise one, even more will start to haunt you!

Demo video by DestTD.

FEATURES
– Impact Damages: You will now take damage when objects hit you.
– Poltergeists: They take control of random objects and throw them at you.

KEYBOARD CONTROLS
[?]: Open options menu (configure key in the options).

CHARACTERISTICS

Impact Damages

– If enabled in the options, you will now take damage when an object hit you fast enough.
– If enabled in the options, you will now take damage when you hit an object fast enough.
– Several options allow to configure how much damages you take on hit.
– The damage values works as if the player has 100 HP.

Poltergeists

– Poltergeists take control of an object and launch it at you.
– If the object they control is damaged, they will be exorcised.
– Poltergeist spawn can be disabled so you can use this mod only for impact damages on player.
– Best scores are saved when the Game Over screen dissapear.

KNOWN BUGS
– Objects may sometimes go through you without damaging you.
– You may sometimes hit objects without taking damage.
– Poltergeists may fail to hit you.
– Poltergeists may hit you but do no damage.
– Poltergeists may yeet you on impact.
– Poltergeists may 1-shot you.
– Poltergeists may kill themselved by hitting other objects.

DEV NOTES

Originally posted by About this mod:

I was thinking about several ideas to bring a different game mode in Teardown, and after watching too much Prop Night I eventually ended up with the idea of random props attacking the player :p
Before I even started the mod I noticed a big issue with it: props hitting the player at fast speed would only knock him around, but not actually damage him… So I started thinking about a way to make the player take damage based on how fast items was hitting him, and that what the Impact Damage part is all about 🙂
This part took quite some time to tweak as detecting when an item is actually hitting the player (and not the opposite: player hitting said object) is not trivial and can lead to pretty complex cases. Anyway I think I figured out a way that works well enough, it’s not perfect as some hits may still be missed or count twice.
When this part was working I could start making the actual poltergeists! So the idea I had for those was quite simple: I wanted the poltergeist to attach to a random free floating object, make it levitate in the air a little, then throw it at the player to hopefully damage him. The levitation itself didn’t really work as planned as I was trying to force the item position each frame to make it go up… This had very weird interactions especially when the object was colliding with something else, resulting in glitchy objects with no collisions at all :/ So I had to do that another way, and that way was by forcing an upward velocity on the object instead of its position. This allow for a way more efficient collision handling.
Same goes for the shiver effect I added to make it look like the object is actually possessed: tried to make it by rotating the object itself a little each frame, but ended up setting the item angular velocity each frame instead.
Once this part was up and running, I could make the poltergeist actually attack the player by throwing the object it possessed at him. I spent some time on this part to try to efficiently lead the player movement and make the throw more accurate, but I’m not quite sure if it helped that much XD
The final part there was to add a little "death" effect that would play when the poltergeist is exorcised. I could not make the ghost myst effect wobble in the air as I wished due to API limitations, but it still looks pretty convincing I think 🙂