Ventures of an ex indie game developer

Triggers

Now I had the time to code for a few hours, and as usual it took me a bit longer than I expected to finish the trigger functionality the way I wanted it. I implemented a simple elevator, as seen below.



The code contains most of the components I need for other types of engine controllers. The physical trigger shapes are modeled in Maya, then imported as everything else. In this case there are three different triggers that control arbitrary engines, here a single slider engine for all three. Triggers support delayed action (you have four seconds to adjust your position on the elevator platform before it departs) and hysteresis (so that when the vehicle "jumps", it is not seen as a separate hit). The triggers have different priorities so that, for instance, an elevator thinks that the one standing in the elevator has precedence over someone else who tries to get it up or down. Also a "force release" time threshold is in place; it will make sure that no person can “camp” on a trigger (mainly used for multiplayer).

Never mind the buggy and ugly rendering btw, I'll try to fix that next... Now it's time for a nap!

About the author

Mitt foto
Gothenburg, Sweden