onscreen timing manager - best practice

50 views
Skip to first unread message

Andy Woods

unread,
Sep 2, 2015, 6:08:12 AM9/2/15
to Haxe
Hi all,

i've been banging my head against the below issue. Afraid most likely a newbie Q.

I'm moving over an online behavioural research software package from AS3 to Haxe. The timing of when things appear on screen is super important. E.g. a image should appear for 4 screen refreshes.

In the old version of the software I listened for EnterFrame, checked what time it was, and via time ordered lists of images/stimuli, added/stuff that should appear on screen at that moment / removed images when required.

I suspect that this was total overkill though! And a waste of resources. I am seriously considering just using the tween engine Actuate to achieve this. Although Tinkerbell's tweening engine is probably more appropriate as "I like how tweens are ticked centralized by e.g. 
Tween.useEnterFrame" (link).

Do you agree regarding my 'overkill' belief is true? I've being going around and around in circles on this one!

Many thanks,
Andy.

Hugh

unread,
Sep 3, 2015, 12:40:59 AM9/3/15
to Haxe
I don't think any of these approaches is overkill or bad.
The problem sounds simple enough that you could write the same code in all 3 and see which one looks the nicest to you.
The "cost" or "overkill" of using a library is to do with practicalities eg download size and ability to understand influence upstream code of the library and its dependencies if needed.  Since the projects you mentioned are alive and focused, I would not think that this is a problem.

Hugh
Reply all
Reply to author
Forward
0 new messages