The document provides an overview of the Effects Conduit, which is a framework for collaboration on visual effects in video games. It allows developers of different roles to focus on their specialties by separating the work of triggering effect events from responding to those events. The Conduit includes GUI tools, a data builder, and runtime components to play effect specifications in response to events without requiring extensive programming.
3. Outline
What is the Effects API
Conduit? Implementation
Terminology Future
Model References
Components
Quiz
Insomniac Games
4. What is the Effects Conduit?
What is it not?
Not a visual/particle effects system
Not a sound effects system
Insomniac Games
5. What is the Conduit?
A framework for collaboration
A collection of components
Suite of GUI tools for all developers
Data builder
Runtime
Motivation
In the past, programmers have spent a lot of time
“hookingup” & tweaking effects – not a programming
task
Developers (read: I) have struggled with this problem
time and time again.
It’s solvable!
Insomniac Games
6. What is the Effects Conduit?
Anybody can get effects into the game & iterate
Separate work
People who cause effect events
People to respond to effect events
Let people focus on what they’re good at
Reduce busywork
Empower content creators
Rapid prototyping
Apply generic effects quickly
Specialize effects as they become available
Insomniac Games
7. What is the Effects Conduit?
Published in Game
Design used in
Developer Magazine,
Insomniac Titles
March, 2005
Ratchet &
Clank
Future:
Tools of
Destruction
Insomniac Games
8. Outline
What is the Effects API
Conduit? Implementation
Terminology Future
Model References
Components
Insomniac Games
9. Terminology (revised)
Effect Event
Something that happened during gameplay
Response
What should happen in response to the Event
Refer to Effect Specifications (▼)
Spec
How/where to play an effect
Which effect to play
Insomniac Games
10. Outline
What is the Effects API
Conduit? Implementation
Terminology Future
Model References
Components
Insomniac Games
11. Model
Code
Animation
Gameplay (scripts)
Insomniac Games
12. Model
Most events are Some happen over
instantaneous time
Triggered, e.g. Triggered &
UnTriggered, e.g.
BOUNCED
BURNING
DAMAGED
HOVERING
DIED
GRINDING
EXPLODED
ROLLING
LANDED
SMOKING
THROWN
Insomniac Games
13. Outline
What is the Effects API
Conduit? Implementation
Terminology Future
Model References
Components
Insomniac Games
15. Components
GUI Tools
“Conduit Tool”
… and Specs
Insomniac Games
16. Components
GUI Tools
“The Editor”
[Un]Trigger events from keyframes of animation
Insomniac Games
17. Components
Builder
> conduitbuilder {level}
Reads dependencies to determine what
Conduit data (responses & specs) is required
Invokes SubsystemHandlers to build
subsystem data referenced by Conduit data
Insomniac Games
18. Outline
What is the Effects API
Conduit? Implementation
Terminology Future
Model References
Components
Insomniac Games
19. API
API is minimalistic
Gameplay API in Moby/ControllerBaseUpdate
void TriggerEffectEvent(type)
Results TriggerEffectEvent(event&)
EffectsConduit
void HandleEvent(event&, results&)
Subsystem& GetSubsystem(subsystem)
For playing explicit specs
Insomniac Games
24. Implementation Selection
Selection Criteria
Mandatory (every Event and every Response specifies these)
Update Class
Event Type
Optional (to further specialize Responses)
Art Class Score = 1 << 0xF
Other (Update Class) Score = 1 << 0xE
Tag Score = 1 << 0xD
Gore Score = 1 << 0xC
Material Score = 1 << 0x9/A/B
Value Score = 1 * range
Insomniac Games
25. Implementation Selection
Effect Event triggered (from code, gp, anim, etc.)
Each Subsystem (visual, sound, dialogue, etc.)
EffectsSubsystem::HandleEvent(event&, results&)
Each class from source to IGG::GameObjectUpdate
Consider Responses to Event Type
Compare Event with Response for each criterion:
Unspecified: ignore criteria
Don’t match: reject response
Match: add criteria score to response
Until a Response matches
All highest scoring Responses (for the class) are selected
Each selected response
Call effects system (visual, sound, etc.) to play Specs
The same Event can match at different Classes in
different Subsystems!
Insomniac Games
26. Implementation Responses
Structurally similar to Effect Event
Where Event may identify only a material id,
Response can identify class, subclass, or id.
Where Event may identify a value, Response
identifies a range of values.
Contains a list of Specs to be played if
Response is selected
Play on Other
Insomniac Games
27. Implementation – Specs
Specs configure effects
Subsystem Specs extend base Spec
Base Spec includes
AttachType
UpdateMode
Refractory period
Derived Spec contains subsystemspecific
configuration data, for example:
Volume (for Sound)
FxPackage (for Visual)
Priority (for Dialogue)
Insomniac Games
28. Implementation TrackedEffects
TrackedEffect::Collection is a member of
EffectEventResults, returned by
TriggerEffectEvent
Operate on the Collection as a whole…
EffectEventResults::Untrigger(bool kill)
TrackedEffect::Collection::SetPosition(…)
… Or modify individual effects
Iterate over TrackedEffects
Optionally filter by Subsystem
Insomniac Games
29. Outline
What is the Effects API
Conduit? Implementation
Terminology Future
Model References
Components
Insomniac Games
30. Future
Optimizations
Never untrigger events… only results
Remains only in animation
Multilevel jump table for responses
Hint selected responses in results
Cache responses or specs in results
In practice, performance impact is small
Insomniac Games
31. Future
Features
Contexts
Better searching in tool
Tool & Editor integrated into Luna
Insomniac Games
32. Outline
What is the Effects API
Conduit? Implementation
Terminology Future
Model References
Components
Insomniac Games
33. References & More Info
Game Developer Magazine
“Moment of Impact”, March 2005.
Insomniac Games
34. Quiz – Question 1
Matt found that rifle bullet hits weren’t playing materialspecific
effects.
Here were the responses to Projectile_Rifle_Bullet_HIT in the
VisualEffectsSubsystem:
When a rifle bullet hit the ground, Matt expected the Conduit to play a
spec under the Projectile_Rifle_Bullet_HIT {materials={Ground}}
response, but it didn’t.
Why not? How should you fix it? (The answer is on the next page.)
Insomniac Games
35. Quiz – A1
The Conduit was selecting the
Projectile_Rifle_Bullet_HIT
{tag=NOT_PLAYER} response
instead of the
Projectile_Rifle_Bullet_HIT
{materials={Ground}} response.
Both responses matched the
event since both of them correctly
describe the event that happened.
(The bullet did hit a “not player”,
and the bullet also hit a material
ground.) But the
tag=NOT_PLAYER response got
a higher score, and therefore beat
the materials={Ground} response.
So how should he fix it?
Well, the answer is to delete the
tag=NOT_PLAYER response.
That way, the Conduit will select
the nextbest match… the
materials={Ground} response!
Insomniac Games
36. Quiz – Question 2
Okay, so now the responses to Projectile_Rifle_Bullet_HIT in the
VisualEffectsSubsystem are:
When a bullet hits the ground, the Conduit plays the effects that Matt wants.
But when a bullet hits metal, there are no visual effects at all!
How can Matt get everything he wants… ground effects on ground, and
generic effects on metal?
Insomniac Games
37. Quiz – Answer 2
The reason Matt was getting no visual effects when the rifle bullet hit
metal, was because none of the responses matched that event.
What Matt needs is a response that will always match when a rifle
bullet hits anything. Remember that the Conduit always selects the
most specific response(s) to any event. So even if there’s a
response that always matches, others may play instead because
they’re more specific.
Insomniac Games