Incosistenf FX behavior between Linux and Android


I've just noticed an inconsistency in the way FXs behave on Linux and on Android. Check the following config sections:
String = Test
Position = (-300, 200, 0)
Pivot = center
FXList = @
SlotList = TestSlot
Scale = 4

Type = position
Curve = linear
EndTime = 0.5
EndValue = (0,-200,0)

On Linux, a TestText object behaves as you'd expect. It moves up for half a second as soon as it's created. On Android though, in addition to not moving at all, in a strange way, it appears at position (0,0,0). The behavior on Android gets fixed if one adds:

StartValue = (0, 0, 0)
StartTime = 0

to TestSlot.

Without commenting on whether there should be default values on these keys, I think it's worrisome that the behavior is different across platforms.



  • edited February 2016

    There's definitely an issue in the sense that orx doesn't currently do a good job of letting you know that those parameters are mandatory. There are indeed two options:
    - add messages in debug about it
    - make the parameters not mandatory and allow default values

    I'm not 100% convinced the 2nd one is good as it can introduce more subtle issues that might be harder for a user to track. Namely, if we set a default value for those parameters, we can't always use the same (a default StartValue of (0, 0, 0) wouldn't make sense for a scale FX, for example). But having different default values based on the type would make it less consistent and less simple to apprehend for users, even worse in the case of config inheritence.

    As for the different results you've experienced on linux/android, it's simply because you're in undefined behavior land, and you might experience different results even on the same platform with different compilers or different optimization levels: in your case, it's an auto vector, StartValue, which remains uninitialized.
Sign In or Register to comment.