scripting language support for event handling

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

scripting language support for event handling // Feature suggestions

1  |  

Post by Lee // Jun 30, 2007, 3:48pm

Lee
Total Posts: 13
Might event based programming with scripting language support - something/anything with asynchronous event callbacks be possible with Truespace in future?


Real life is full of asynchronous events.

JScript/VBScript do not appear to support asynchronous events.

Its hard to work around this using polling in a scalable way without both: bogging down the CPU and upping the complexity on the developer.


For example:


Scriptable objects that act as a web service end-points could open up TS to interfacing with a lot more languages in an independant way, but - this I think requires asynchronous event support.


Games within truespace/player might run smoothly without lockups and jerkyness etc if they did not use polling.

Post by ProfessorKhaos // Jul 2, 2007, 3:23am

ProfessorKhaos
Total Posts: 622
pic
Don't know if this is what you're looking for but under the Activities Events library there is the watch dog event which sends control pulses on change. It can be used together with other items to execute a control brick on demand rather than in the usual continuously clocked manner.


I agree that event handling is a very powerful feature. Sounds like you have more in mind than responding to simple keypresses.

Post by Lee // Jul 2, 2007, 7:39am

Lee
Total Posts: 13
Interesting: Havn't seen an example using the WatchDog obj. yet.

I believe it 'polls' a single input and outputs when it changes. Polling in general probably slow scripts down though.


I see TS also has a 'selection change event' obj that control outputs upon obj selection - as used in the interactive replace tool activity.

So there might be a few more event objs spread around.

Post by Norm // Jul 3, 2007, 4:44am

Norm
Total Posts: 862
pic
I am told "yes" by developers :)
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn