SakeTami
PTOLEMYGAMES
PTOLEMYGAMES

patreon


More on save games and progress update

 Hi 
 

I managed to get the save games working without having to download a reset variables game, and go through everything I mentioned in my last post. 
 

So, I won't be uploading a variable reset game as I mentioned. It will all be resolved by simply pressing a button in the next patch :) 
 

Also, I'll be finishing the Andrea random tonight. Tomorrow I'll do the last of the coding, and the patch should be ready tomorrow night. 
 

That's pretty much it, but for those who are curious and want to take a peek behind the curtain and understand why it took me so long to fix it, read on. :P 
 

The gist of it is that I'm making the game in Ren'py. And while it's a great tool, and gives you access to a lot of Python commands, it's also somewhat limited. 
Ren'py is designed for visual novels that have a pretty straight forwards structure, and in which the code is linear. You start at point A and go to point B then C etc..... 


What I wanted to do is create a circular code, start at A go to B then C, and return at A. 


The advantage of this, is that it allows you to expand the game in any direction, not just forward. The disadvantage is that Ren'py isn't designed for that, and you have to break it a little bit, and force it down it's throat. 
So, when creating a new event for example, you also create a new variable that controls it. In a linear code structure, that's pretty simple you declare a variable, assign a value to it, play the event, change the variable value, and that's it. In a circular structure, that's not that easy, because the code might attempt to read the variable before it's assigned. That's what gives those "Not defined" errors. And if you, let's say, just put it in at point A, that variable will be given the old value every time the code goes back through A. In a linear game, you never return there, so it's no problem. 


And despite my best efforts I couldn't make Ren'py read a variable's value, from anywhere the code might be. 
That's what created all those save game problems. 
 

What I'm doing now, is creating a little detour, if you like, in the bedroom part of the code.  
By pressing a button, the code will assign all new variables. So the code is at A for example, but by pressing this button, instead of going to B as usual, it goes to Z, which is not part of the regular game. At Z all the new variables are assigned and the code goes back to A. And you only have to do this once. Then you can play the game with no problems :) 
 

It's a very simple solution, and the reason that I didn't implement it before is because I'm an idiot, and didn't think of it. Instead I hatched all sorts of hair brained schemes involving breaking Ren'py, making variable assign game versions, value matrices.......etc      :( 
 

But better late than never I guess :) 
 

As always I thank you all for your support and patience 
Ptolemy 
 

More on save games and progress update

More Creators