XaiJu
studiocoattails
studiocoattails

patreon


How Kari Saved Episode 2 of NPG - A Dev Diary

 

HI guys Kari here. Long time no see. Hope you have been well. I'm here to talk about the 3D Camera for Ren'Py, how it broke everyone's save files, and how we managed to out-stupid Ren'Py once again to give you another exciting installment of everyone's favorite visual novel  'hot elf girl national park bullies you for not respecting nature enough'.

So, for episode 1 we used this thing in engine called the Ren'Py 3D Camera. It was pretty cool! It let us move around a camera in a 3D space within the video game engine Ren'Py. What more could you want! 

For it to not break things, also. That is important. And it wasn't good at that. It broke everyone's saves. Oops. That's our bad.

Part of the tool that was the most useful was the interactive director thingy. If you hit Shift + P then you could change the values of character positions and stuff and see how it looks in real time. You can't really do that in regular old Ren'Py, you have to keep reloading the game build to see every slight adjustment, which can get kinda annoying after the five thousandth time, and really annoying by the billionth. 

So, when we got the news of it breaking saves for steam users, we knew we had to do something. This tool was a lifesaver but it's actively destroying player progress if the game updates. Which would be a huge problem if our game was episodic and got at least four updates based on the pure structure of it. Which it is. So oops. 

So, early in episode 2 development, while the script was being written and edited and Satchel was doing her gorgeous art thing, I set off on a quest to solve the ultimate mystery. How do I save the 3D Camera? After a lot of hard work and consulting various VN friends, and by various I mean Minute from Elan, I discovered something important. I can't fix it. We couldn't replicate the bug at all, but we had a pretty good idea of what caused it, and everything about what caused it was something very strange about how the Camera worked in relation to how Steam updates game files. I have no clue. The thing is weird. That's just my best guess, I'm still not sure. 

So, with all that time wasted trying to save what couldn't be saved, it was time to start coding out the scenes of episode 2. With the fact that we are human and have lives that affect our ability to make video games on the internet, we were already pretty behind schedule on releasing the first bit of DLC. And now we had less tools to do that with. Yay. 

On top of that, we had to take out all components of the 3D Camera from the game itself and recode all of episode one to not use any of its camera movement code because otherwise the game crashed. This was a LOT of work, but thankfully Syon managed to find someone to work on reanimating all of episode 1 as close as they could to the original release. While they did that, I started working on episode 2s sprite stuff. 

So, I started laying out backgrounds scene by scene as they were needed, which was mostly just the first bit where Eve drove around a lot. Still had no idea what we were going to do to compensate for the 3D Camera, so I just did my best to calculate where stuff needed to be. I think the first CG is actually still animated by me doing it completely manually. 

I also put all the character sprites in the scenes they were in. Then I started on expressions. This usually just involves me reading through the script, and changing the body and face sprites with code depending on what the characters say. It's not hard work, but it takes a really long and boring time to make sure things aren't overused and that they make sense. It's a lot harder to do without voice acting too, which was one of the very last, if not the last, things we put in the episode. 

During this, Syon was set to do the actual movement of the characters, but had a lot of trouble because we had been relying on the 3D Camera beforehand. So then I came up with a really dumb solution that Syon seemed to think was actually pretty good. And to explain this, I'm going to need to talk about the specifics of how the 3D Camera broke stuff. 

So, imagine the game as a box that you're filming with a camera. With Ren'Py alone, the camera and the box are the same thing. You can't adjust either, because moving one would mean moving both. With the add on we were using, you could freely move the camera all around the box to your hearts content, but usually you only use it to make slight adjustments. 

If the game is programmed to move the camera, and you take out the code that even suggests the possibility of a camera existing, it kinda freaks out. Which is why it crashed when we removed it. 

Part of what made the camera so useful was the interactive director I mentioned. Moving characters around in real time. These things didn't use a camera, they just used simple image movements that were in the engine already. But gives a visual in game way to see variables and then take the adjustments made in game, and allow you to copy and paste auto generated code into the game itself based on those movements.

So the solution just ended up being making a copy of the game, with all the expressions and backgrounds laid out already, changing the in engine name of it to a dev build so Ren'Py wouldn't get confused, and then putting the 3D Camera back in it. Normally this would break the game when people tried to load saves, but it wasn't the image movements breaking it, it was the camera movements. So if we just moved the images using the instant feedback from the add on, then taking that code and putting it into the main game without any code regarding camera movement, the game wouldn't even be able to tell the difference, and we still get the most useful aspect of the thing that breaks the game without having to put the thing that breaks it into the actual game itself. 

So Syon managed to animate most of the second episode, while I did the fireside chat bit where it zooms in on Zion where she has a mortality crisis, and it was really moe. We somehow managed to release on time, and that was fun. People liked episode 2 I think. I definitely did, because it was all about best gal. 

Anyway, that's all for today, campers and coders. Hope this was insightful into.


More Creators