Not long from now i am going to implement this code into a Ren'Py game (for prototyping purposes in this case) and i was wondering how best to do that. My code consists mostly of classes, it's only got one global variable in it (which is a short tuple). It's also only got one function. Everything else is a class usually linked together in a chain eventually leading to one class which will be used as a variable.
Short Example:
Code: Select all
class class1():
...
class class2(class1): #Class2 picks up Class1 and continues it
variable5 = 50
...
class class3(class2): #Class3 picks up Class2 and Class1 and continues them
...
class class4(class3): #Class4 picks up Class3, Class2 and Class1 and ends the chain of classes.
...
finalvar = class4()
finalvar.variable5 = 90
The only thing i know is "init python:" blocks and "$ variables = ..."
Is that really all there is to know? I'd like a few pointers, is there anything i should be wary of? should i keep an eye out for code i could implement as part of the Ren'Py code instead of being part of a Python block?
I've seen some code by others that does rely reasonably heavily on direct python scripts, but sometimes i see very python~y things like try/except and loops in the Ren'Py code. Overall i'm just pretty confused
Any pointers are appreciated, and i don't mind doing a bit of reading so if there is some good guide or documentation on this i should read then please link it.
