Feature Suggestion: FXSlot type COMMAND

6 views
Skip to first unread message

enobayram

unread,
Nov 11, 2015, 2:22:42 AM11/11/15
to orx-dev
I suggest that we add a new FXSlot type that calls a custom orxCommand. The point is, when you have a slot like:
[WiggleSlot]
Type = position
Curve = sine
....

That means, "call orxObject_SetPosition on my object with a varying orxVECTOR argument". Why not generalize this with:
[WiggleSlotViaCommand]
Type = command
Command = Object.SetPosition
Curve = sine
....

Which means "call Object.SetPosition ^ $VARYING_VECTOR".

enobayram

unread,
Nov 11, 2015, 2:29:50 AM11/11/15
to orx-dev
A further generalization (Check the "Command" field):
[WiggleSlotViaCommand]
Type = command
Command = Object.SetPosition ^ < true
Curve = sine
....

The essence here is that, the FX binds ^ to the object and pushes the value on the command stack, so that you can extract it at any argument position.

iarwain

unread,
Nov 11, 2015, 11:04:13 PM11/11/15
to orx-dev
I like the idea of generalizing the FX system (like your previous suggestion of having callbacks for curves) however I think there's a piece missing to this proposal.

For example, having a type "position" doesn't only mean to call orxObject_SetPosition(), it also means that the original value is retrieved with orxObject_GetPosition(), that the neutral element is (0, 0, 0) and that the combine operation is add.

We'd need to specify all those information for the FX system in order to work. At this point, maybe a more in-depth redesigned should be considered so as to not feel too clunky.

Enis BAYRAMOĞLU

unread,
Nov 11, 2015, 11:58:53 PM11/11/15
to orx...@googlegroups.com
Hmm, you're right, I didn't think of that. The proposal would still be enough for Slots where "Absolute = true" though. All the slot has to do is to interpolate between the Start and the End, and pass it to the given command.

I'll think about what can be done about the "Absolute = false" case.

--
You received this message because you are subscribed to the Google Groups "orx-dev" group.
To post to this group, send email to orx...@googlegroups.com.
Visit this group at http://groups.google.com/group/orx-dev.

iar...@orx-project.org

unread,
Nov 12, 2015, 12:27:47 AM11/12/15
to orx...@googlegroups.com
Yep, the issue only arise with relative FXs. I'm sure we can rewrite that part of the engine, it's still lacking a couple of feature from the original implementation I did in 2004 while working at a game company (I since have been authorized to re-use the idea I originally developed there for orx in 2007).

Enis BAYRAMOĞLU

unread,
Nov 12, 2015, 12:35:25 AM11/12/15
to orx...@googlegroups.com
Hmm, rewriting that part of the engine sounds intriguing, I'd love to hear about what other features you have in mind, but I think the proposal can still be saved:

When "Absolute = false", the slot passes the difference of the value for this frame to the given orxCommand. This way, it's the orxCommand author's responsibility to retrieve the initial value and append the increments. It also obeys the meaning of Absolute/Relative.

iar...@orx-project.org

unread,
Nov 12, 2015, 12:45:16 AM11/12/15
to orx...@googlegroups.com
In this case, I'd rather no tie it to commands, simply be able to evaluate curves instead of doing it at the FX level.
The FX module can then use those curves instead of the current implementation.
Also I'd like to be able to query the evaluation of a combination of slots at once instead of having to have the user combine them on his side (many movements are defined by multiple slots and not by a single one, for example).

Enis BAYRAMOĞLU

unread,
Nov 12, 2015, 1:11:59 AM11/12/15
to orx...@googlegroups.com
touché, I'll let this one sink in.
Reply all
Reply to author
Forward
0 new messages