Game Development Community

Arcane-FX Change log

by James Wiley · in Torque Game Engine · 05/08/2007 (4:42 pm) · 1 replies

Changes to AFX Code

These are changes to sources inside the engine/afx folder.

Added "extra" field to afxMagicSpell, afxEffectron, and afxSelectron which is an opaque data field initialized via an optional argument to castSpell(), startEffectron(), and startSelectron().

Moved MagicSpell's registerObject() to an earlier time in the startup process so that castSpell() can return a valid ID for the newly created spell object.

Fixed bug in afxCamera that prevented the camera's line-of-sight occlusion tests from executing properly on the server. As a side-effect of this, visible interior objects would be incorrectly removed from scope.

Added elaborate scope tracking system which monitors ghosting behavior of constraint source objects. This solves a number of problems connected to long lasting effect mounts and these situations should now work:
- object with attached effects leaves scope and then returns
- object is out of scope when effects are attached but later comes into scope
- object with attached effects is out of scope when a new client joins but later comes into scope
- object was just created and not yet ghosted when effects are attached

Made minor change to particle-emitter effect that forces fading particles to a be fully faded at finish. In some cases, ghostly particles could be seen after effect was done, util all particles reached the end of their lifetimes.

Did some general code cleanup on afxCamera. Only major behavior change has to do with the way the camera adjusts its location when there is an object between it and its subject. The new code does a much better job of avoiding intermediate frames that are in bad places such as inside the walls of an interior. This should eliminate some unnecessary scoping of objects in interiors but it will probably feel a little different.

fixed problems in afxMagicSpell::onDeleteNotify() especially with detection of externally deleted impact object. This prevents a rare but reproducible crash.

Added afxStaticShapeData for creating StaticShape effects. A plain StaticShapeData still works, but afxStaticShapeData improves the handling of the custom "sequence" field and also adds "ignoreSceneAmbient", "useCustomSceneAmbient", and "customSceneAmbient" for controlling the way the lighting system adjusts the static-shape's ambient lighting using an ambient value calculated from the scene.

Added fields "reverse" and "offset" to afxPathData. The "reverse" field reverses the direction of the path to void having to reorder by hand. The "offset" field pre-applies the offset to the path to avoid runtime offset calculations in afxXM_PathConform.

Fixed problem with remote client first-person mode switching causing mode switch on locally connected client.

Added shadow support to afxModel enabled using "shadowEnable" field of afxModelData. This does is not ideal for mounted models where the shadow overlaps the mounting object's shadow, but it does work well for independent models.

Spells now also deletes an active missile when deleting self. This avoids a crash in which a missile's datablock is deleted before the missile itself is deleted leaving a bad pointer reference.

Added #ifdef to exclude inclusion of deprecated sceneGraph/lightManager.h in TGE 1.5.1 and later versions.

Inserted setup_dynamic_constraints() in the correct places in afxMagicSpell. Lack of these was preventing user defined constraints (addConstraint()) from working in spells.

About the author

Recent Threads

  • Test

  • #1
    05/08/2007 (4:42 pm)
    Blended AnimClips now allowed. If an animation clip is flagged as "blended", it will no longer replace the current sequence but will instead be blended with it. More than one overlapping blended anim-clip is allowed.

    Move selectron registration code to preload(). This is a better location and avoids problems encountered when datablocks are loaded directly on a client, rather than transmitted from server.

    Change to safer method of encoding object-ids in object-pointers. This avoids problems encountered when datablocks are loaded directly on a client, rather than transmitted from server.

    Added warning message in camera-shake when the specified effect lifetime is not finite.

    Added new prefs "pref::AFX::targetSelectionRange" and "pref::AFX::targetSelectionTimeoutMS" for setting selection-range and selection-timeout. Selection-timeout is the amount of time allowed between mouse-down and mouse-up before the action is not counted as a selection.

    Made console methods afxTSCtrl::getMouse3DVec() and afxTSCtrl::getMouse3DPos() work again.

    Made spell interrupt speed adjustable in spells using movementInterruptSpeed field.

    Added afxXM_MountedImageNodeData, a new transform modifier which allows you to constrain to nodes of a mountImage. This is meant as an interim solution and may eventually be replaced with some mountImage syntax which is built right into the constraint specification syntax.


    Changes to TGE 1.5.1 Engine

    These are changes to TGE source files.

    Files game/player.[cc,h]:
    Made changes to support blended AnimClips (described above).

    File game/gameConnection.[cc,h]:
    Added script callout to onRollover() whenever rollover object changes. Also implemented target-selection-timeout preference here. Made changes that allow server side of object selection to be used for storing the selected object. This also required changes that control whether setting selected object on the server causes it to be propagated to client.

    Files sim/netObject.[cc,h] game/gameBase.[cc,h]:
    Made changes needed for scope tracking. (Search on "AFX CODE BLOCK (scope-tracking)").

    File game/fx/particleEngine.cc:
    Eliminated bad particle system optimization introduced with TGE 1.5.1.

    File sim/netEvent.cc:
    Eliminated extra incRef() with TGE 1.5.1.

    Changes to arcane.fx Demo

    These are changes to scripts in the arcane.fx demo folder.

    Changed castSpell() call in ~/server/scripts/afxSpellCasting.cs to include %rpg_data as the %extra argument.

    In ~/client/scripts/default.bind.cs, jump action now checks for existence of player object.

    Implemented OrcMageAvatar::onRemove() in ~/server/scripts/player.cs to remove attached effects when player is deleted. (and OrcWarriorAvatar).

    Calls to equipSciFiOrc() and unequipSciFiOrc() in ~/server/scripts/afxDemo.cs and ~/server/scripts/player.cs are now preceded by tests for existence of the functions, (just in case the sf_gear.cs effect is missing).

    Removed unequipSciFiOrc() calls from ~/server/scripts/aiPlayer.cs.

    Added serverCmdToggleFirstPersonPOV() to ~/server/scripts/commands.cs and a TAB binding to ~/client/scripts/default.bind.cs for switching between first-person and third-person views using TAB key.

    Changed afxPerformSpellCast() in ~/server/scripts/afxSpellCasting.cs to make it easier for AI to cast spells.


    The only changes to spells and effects include some very minor changes to Smokin and Astral Passport.