Sunday, January 28, 2007

Effects system

This week i finished fracture entity stuff (from last week) and worked on the effects system.
The effects system is basically a script that allows you to define sequence of actions to create special effects.
supported actions:
emitter/spawner - create particles
decal - create decals
sound - in the future
when you create effect all the actions will start immediately - next time i will add a delay command to allow actions to play after specified delay.
note: this system is very similar to .fx files in quake4 effects folder.
The fracture entity: last week i use the brush model of entity to check collision with the glass object (for example) but when few fragments fall down and you shot again at the same place, the collision system reported on collision (because the brush) and the bullets didn't fly through the hole - so to solve this issue (and similar in the future) i added new function that allows you to deny specific collision reports by doing some extra checks (if needed).
so in fracture entity, when the collision system reported on something i checked if the object (who started the check) collide with fracture entity (the glass in this example) fragments and if its not i deny the original report, so the object (the bullets) could fly through holes.
here is a screen shot of rocket effect: smoke, sparks, decal and flash

No comments: