Our game involve armies slowly moving from node to node on a map. I'm trying to use the scheduler to move an army from a node to another, look for enemy at destination, and if there isn't, move the army further to another node (if the player had order a longer travel).
Is there something preventing a scheduled module from scheduling itself again? Apparently my module is not able to schedule itself more than once.
Also, is there a way to debug line per line a module executed by the scheduler?
And the last question which may make the previous ones irrelevant: Is the scheduler the good tool for this?
Thanks for the feedback
Best Answer
T
Tech Support
said
about 8 years ago
Hi Gabriel
We don't allow scheduled items to create new scheduled items, this is a restriction we have in place to stop infinite loops.
We don't currently support inline debugging of modules (they run outside of request scope) It would be a nice feature though to allow you to do this, I'll get it added to our backlog. We may need to create a debug method on the SparkScheduler object, so it would require a code change on your side.
We do allow you to create a new scheduled item from the system scheduled scripts. The every minute script could be used to control this but you'll not get the same exact timings for your game (I don't know if this is important).
We don't allow scheduled items to create new scheduled items, this is a restriction we have in place to stop infinite loops.
We don't currently support inline debugging of modules (they run outside of request scope) It would be a nice feature though to allow you to do this, I'll get it added to our backlog. We may need to create a debug method on the SparkScheduler object, so it would require a code change on your side.
We do allow you to create a new scheduled item from the system scheduled scripts. The every minute script could be used to control this but you'll not get the same exact timings for your game (I don't know if this is important).
Gabriel
G
Gabriel Sauve
said
about 8 years ago
Thanks Gabriel:)
I tought about doing all this from the every minute script, but that meant quite a lot of useless server execution time to check everything when nothing was in-fact happening. The hybrid solution (using the scheduler, but doing the recalling from "Every Minute") does feel a bit clunky but I'll think about it some more.
I completely understand the need to avoid infinite loop but could there be any way to make this a default setting while having a way to allow the scheduler some looping before shutting it off? Maybe by allowing us to set by a parameter in the Spark.getScheduler() function the maximum amount of time it is conceivable that our application make it loop.
I'm also looking forward to that debugging method on the Scheduler!
A
Andrew Silber
said
over 5 years ago
Has there been any change on this front? I'd love it if I could raise an event automatically every few seconds to monitor some state and take action. One minute delay is too long for my game.
Thanks! Andrew
E
Edney Antonio Reis Filho
said
about 4 years ago
Is there any forecast to add the line debug feature in scheduler?
Gabriel Sauve
Our game involve armies slowly moving from node to node on a map. I'm trying to use the scheduler to move an army from a node to another, look for enemy at destination, and if there isn't, move the army further to another node (if the player had order a longer travel).
Is there something preventing a scheduled module from scheduling itself again? Apparently my module is not able to schedule itself more than once.
Also, is there a way to debug line per line a module executed by the scheduler?
And the last question which may make the previous ones irrelevant: Is the scheduler the good tool for this?
Thanks for the feedback
Hi Gabriel
We don't allow scheduled items to create new scheduled items, this is a restriction we have in place to stop infinite loops.
We don't currently support inline debugging of modules (they run outside of request scope) It would be a nice feature though to allow you to do this, I'll get it added to our backlog. We may need to create a debug method on the SparkScheduler object, so it would require a code change on your side.
We do allow you to create a new scheduled item from the system scheduled scripts. The every minute script could be used to control this but you'll not get the same exact timings for your game (I don't know if this is important).
Gabriel
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstTech Support
Hi Gabriel
We don't allow scheduled items to create new scheduled items, this is a restriction we have in place to stop infinite loops.
We don't currently support inline debugging of modules (they run outside of request scope) It would be a nice feature though to allow you to do this, I'll get it added to our backlog. We may need to create a debug method on the SparkScheduler object, so it would require a code change on your side.
We do allow you to create a new scheduled item from the system scheduled scripts. The every minute script could be used to control this but you'll not get the same exact timings for your game (I don't know if this is important).
Gabriel
Gabriel Sauve
Thanks Gabriel:)
I tought about doing all this from the every minute script, but that meant quite a lot of useless server execution time to check everything when nothing was in-fact happening. The hybrid solution (using the scheduler, but doing the recalling from "Every Minute") does feel a bit clunky but I'll think about it some more.
I completely understand the need to avoid infinite loop but could there be any way to make this a default setting while having a way to allow the scheduler some looping before shutting it off? Maybe by allowing us to set by a parameter in the Spark.getScheduler() function the maximum amount of time it is conceivable that our application make it loop.
I'm also looking forward to that debugging method on the Scheduler!
Andrew Silber
Thanks!
Andrew
Edney Antonio Reis Filho
Is there any forecast to add the line debug feature in scheduler?
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics