SamuKata
ShineSl
ShineSl

patreon


LOKP - The New Adventure - Act-3 - The Wild Planet (v0.1) News 7

Hi,

as I remember once joking on my discord about how my game code sometimes scares me more than even the scariest horror game, but it wasn't exactly a joke... After all, to make even seemingly insignificant changes to the code, I need to remember many of the parameters I've already used before, so that there are no errors in the game code was made (and, oddly enough, I release game updates without errors, of course, if people follow my recommendations for each game update and don't use too old game saves), but due to the fact that I significantly expanded the combat code and events related to the battle, I had to dig into my code quite a lot in order not to make even a single mistake (and at the moment my game code takes up about 75,000 lines (there is a space of 1 line between each line, I do this for more convenient editing, but nevertheless)), and... In general, it is not an easy task to make a non-linear game on a linear engine. And since I don't have a convenient set of functions, and I write all the production code myself (and not only it, of course), even minor changes can cause a big headache.

But, one way or another, I seem to have managed to finish almost the entire skeleton of the code for the game update today, and the game didn't throw any errors, so I can probably take a breather and focus on writing the text (of which there's a lot need to make), but tomorrow I'll double-check all the code again anyway to be absolutely sure that all is okay.

Maybe in the future, if I don't give up on making games, my next project will be with using RPG Maker, because it's much easier to control chaos in the code with using it, and I can add various additional features both in combat and elsewhere with much less risk of breaking everything.

One way or another, time will tell, but for now that's all I have, thank you for your attention.

LOKP - The New Adventure - Act-3 - The Wild Planet (v0.1) News 7

Comments

Yes, I know that Ren-Py allows to split code, but for some reason it breaks everything if do this in my project, and the funniest thing is that if I glue everything back into one file, as it was before splitting, the program will give a bunch of errors when I try to run the game, and the only thing to fix it - use a backup copy of the files that were saved before the split. And believe me, this isn't the only mystical thing I've encountered with my game code. Sometimes, completely unrelated scripts would, under certain circumstances, break parts of the game. For example, I remember adding a door password code to the random code, and the random code itself broke, forcing me to change its database. Or I wanted to hide the bottom menu in the game itself, which seems pretty easy to do, but after I did it, navigation stopped working properly, and the clickable map stopped working altogether, even though I hadn't touched the code responsible for their functions. So my code is a dangerous place, and I'm still lucky that I didn't break anything yet, even after changing battle system so much ;s.

ShineSL

I'm not generally the type to jump in on this kind of thing, but, as you said, 75k lines in a script file is legitimately terrifying. Just in case you're unaware, you can have multiple script files in a Renpy project. When you have a jump statement in a .rpy file, Renpy will automatically find the corresponding label in any other .rpy file within the game's directory. So, for example, right now in LOKPGAME/game you have a file called "script.rpy". You can create a new file in /game called "combat.rpy". If you have a statement like "jump combat_start" in script.rpy, and you have a corresponding statement "label combat_start" in combat.rpy, the script will seamlessly pass between those files. So you can have a separate script file for everything about combat, and then you can do the same for anything else you want, too. Like if you want to isolate all of the waitress path content, you can have something like "waitress.rpy" where all that code sits. You can also create folders and subfolders within /game to organize your scripts too - as long as the .rpy files are somewhere within /game, Renpy will find them. If you already knew about that and don't want to use it, no problem, just thought I'd mention it since it would probably make things way easier to edit if you didn't know.

ArmoredOpossum


More Creators