Parts bigger than the sum...
As I am trying to get a hang of a workflow of sorts for the game, I am also looking at things from my perspective as a general developer. Ren'Py is easy, as it is simply a library framework that runs on Python, but that doesn't mean you should simply make everything (as they call it) spaghetti code.
I am now trying to split the code that I have (which is a bunch of variables to be used during the game and the main code of the action/dialog flow), into files that can have the code depending on meaningful structures in the game.
To explain where I come from:
In other programming languages, you put initializations in for instance header files, or initialization files. This helps keeping the code clean. Of course not all languages are a good option for that. Many languages use local and global values, that could work terribly bad if they were made either on that doesn't warrant the use (putting a game characters name in a local variable would be the opposite of good programming, as you would require to either create hundreds if not thousands of variables for the name in each block of code you need it, or you would have to make many different variables that get the value of the local variable you initially used throughout the code of the game. When using functions, it would mean each function would have on variable for the name (and any other local variable that you failed to put globally available.
Now, in Ren'Py it is not that difficult to place a define/default statement anywhere in the code, but you could run into the same issue. Especially with branching code like Ren'Py. Imagine you have a variable that states the player has obtained a quest item, but this variable is defined and set in one branch. When the player runs another branch instead and this branch requires the variable for the quest item, BUT you haven't run through the required branch, you will have an error on your hands. Ren'Py will see if there is a variable, but it is not set, so the game will crash.
It is therefore important to know what variables are on what scope of the game.
Update: Move everything back for a moment. It seems that if you copy and paste text, and the tabs are replaced in the process...Ren'Py will be Ren'Cry.
Files
Frost Bite
Surviving is a cold journey
Status | In development |
Author | Draw Flesh Games |
Genre | Visual Novel, Survival |
Tags | 3D, Atmospheric, Female Protagonist |
Languages | English |
More posts
- Woops...size mattersDec 17, 2023
- To make up for the (s)lacking...Dec 08, 2023
- Oops...there it is...Dec 06, 2023
- Progress is slow...like a glacierNov 30, 2023
- Upcoming updateOct 22, 2023
- Upcoming update 0.19 will feature additional story and rendering.Aug 22, 2023
- Chose to start, is the first choiceJul 25, 2023
Leave a comment
Log in with itch.io to leave a comment.