Rogue-Like, programming and stuff
I thought it would be fun to briefly discuss programming, and how it's working in Rogue-Like at the moment (and why certain bugs appear). There have been a number of bugs in the more recent build that trace back to a common flaw, and that has to do with control flow. Basically, in Renpy, you call out a section of code by using "labels." If you say "jump" and then a label name, then the game will stop what it's doing and go to that new place. It's a one way trip, there's no easy way to get exactly back to where you left when you use a "jump."
The second method is to use "call" followed by the label name, and this method has the benefit of being able to use "return" to go right back where you called from. Now, where this can become a problem is when you get too complex in messing with these call and return stacks. If you call, call, call, and then return, return, return, then you get right back where you started, but what if you want to skip some steps? There are ways to do this, some simple, some complex, but you basically need to prepare for any options you give the players, so that you can get them back where the interactions started without skipping more steps than actually happened.
So that's what's causing some of the current errors, that I have situations where I let players call 1, call 2, and then a return sends them back to "1," when really the intended action is that they get ejected to before the first call, OR I let them call 1, call 2, and I intend them to get sent back to 1, but they instead get booted past it. A lot of this should get fixed by the next build, I've overhauled how a portion of this works, specifically in the "shift actions" commands, and I'm continuing to try and piece together where these bugs might continue to pose a problem.
Just thought you guys might enjoy some insight as to how these things work under the hood. Let me know if you have any questions on the subject.
