Replicube

Replicube

Reset puzzle/save option?
So, while trying to solve one of the projects, I tried a while loop. But, I think I accidentally made it endless and now I can't even load up the project anymore without causing the game to become unresponsive.

I am not a programmer. I've barely got my ankles wet in it, but this looked like a good and fun way to get started. And I think it is, I've had a good time with it overall. But there should probably be something that either prevents mistakes like mine from happening, or something that can reset a puzzle if something like this happens
< >
Showing 1-6 of 6 comments
walaber  [developer] Mar 2 @ 8:58pm 
yes, I definitely need to work out a way to "recover" when/if the player introduces an endless loop into their code. I'm not sure I can detect it without the game freezing, but even in that case it should realize you didn't exit the game naturally and perhaps reset that puzzle in some way so you can open it again.
lucbloom Mar 12 @ 6:17pm 
You could spin up a thread just for loading the results of the voxels. Copy over the data when it's done, delete thread. Time it and abort if it runs for > 1 sec. You don't have to do complicated Lua + threading stuff since the thread is only used to run the Lua state in isolation until completion.
walaber  [developer] Mar 29 @ 9:18am 
FYI, the latest version of the game (and demo) has protection against infinite loops now :)
Triang3l Apr 26 @ 2:55am 
Originally posted by walaber:
FYI, the latest version of the game (and demo) has protection against infinite loops now :)
While RepliCUBE and RepliPAINT report "code timeout" in case of an infinite loop, it still hangs the whole game in the Lua Evaluator. Though maybe implementing a timeout directly would impair the functionality because the user may want to run some heavy (but finite) computations in the evaluator, but I think some "not responding" message (or just a button within the evaluator, would look less OS-like, but would have more utility) making it possible to abort execution would be a nice touch. Or maybe even just a button that is always there so the user may create more interactive, manually terminated scripts, kind of like making the evaluator more terminal-like with Ctrl+C capability.
Last edited by Triang3l; Apr 26 @ 2:57am
Seconding the ability to interrupt running code.

Hourglassing at the user once the code's been running for a few seconds would probably be better than some sort of “not responding” message.

I think that auto-run should be disabled automatically in these cases: if it's taking ages once, it's probably going to do so again.
Triang3l Apr 27 @ 3:09am 
Originally posted by Not Mr Flıbble:
Seconding the ability to interrupt running code.

Hourglassing at the user once the code's been running for a few seconds would probably be better than some sort of “not responding” message.

I think that auto-run should be disabled automatically in these cases: if it's taking ages once, it's probably going to do so again.
Yes, though an arbitrary threshold is perfectly enough for the story tasks, RepliPAINT is a good use case for running REALLY complex, yet still finite, code.
< >
Showing 1-6 of 6 comments
Per page: 1530 50