Timer and web player

The Pixie
Is there an issue with using timers for games that are on-line? I seem to remember that being the case a while ago, has it been resolved?

george
There was an issue, and I don't recall anyone saying it had been fixed.

The Pixie
I created a very simple game with a timer that is running from the start, and has two commands, PAUSE and CONT:

http://textadventures.co.uk/games/view/ ... rig/timers

What I found was that the timer runs properly at first (and you can do LOOK, INVENTORY, HELP no problem), but it you stop it and then start it again, it screws up, only firing when the player does something (as though it has become a turn script, not a timer script).

As long as you start with it running, and keep it running, then all seems to be fine. ou can even save the game, and when you resume it is still going.

Has anyone else looked at this at all? Does this help diagnose the bug even? Other comments?

I have a game in mind (and partly implmented) that relies heavily on timers. One timer running from the start is all I need. Is it going to be reliable?

<!--Saved by Quest 5.5.5173.27901-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="timers">
<gameid>533db33f-b506-4707-9ca5-976d00e7ed3f</gameid>
<version>1.0</version>
<firstpublished>2014</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<command>
<script>
timer1.enabled = false
</script>
<pattern>pause</pattern>
</command>
<command>
<script>
timer1.enabled = true
</script>
<pattern>cont</pattern>
</command>
<timer name="timer1">
<interval>5</interval>
<enabled />
<script>
msg ("... time passes ...")
</script>
</timer>
</asl>

The Pixie
Just be experimenting some more, and the web player has crashed. This has happened before, making me wonder if there is a connection. Or does it crash a lot, and I only notice when I mess around with timers?

The Pixie
I have created a bug report, and put a couple of notes in the Wiki to warn people.

Alex
This is fixed now. There were a couple of bugs here:

- the script to trigger timers in WebPlayer was running twice, which meant timers could run at double speed, and probably introduced other weird behaviours too
- a disabled timer would usually end up in a state that would cause it to never fire if it got enabled. This wasn't just for WebPlayer - the bug in The Pixie's example affected the desktop version too.

Both of these are fixed for Quest 5.5.1, which is now live on the site and will shortly be packaged up for its desktop incarnation.

The Pixie
Excellent.

Thanks for sorting it out.

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums