It’s been a while since my last update. I kind of ran out of steam (I think I burned myself out a little) so I took a break to meet up with friends, watch movies (Black Panther was great) and play video games (I got a house in FFXIV!). Since my last update I’ve done some small updates, mostly bug fixes, but sadly haven’t had the energy for any more writing.

A big update is the new NVL screen style. In v1 the only text used in the NVL screen is Carter’s narration, but in v2 I have other characters that use it too so I needed to style it to get that to work properly and things just snowballed from that. I started off by completely removing all the default styling from the screen so I could work from a blank slate and this is what it looked like:

NVL screen with all styling removed

So everything wasn’t totally black I added some background colours to the default window and text so I could tell just how big the elements were.

screen nvl:
        background "#ff0"
            # Display dialogue.
            for who, what, who_id, what_id, window_id in dialogue:
                    background "#f0f"
                    id window_id

                    has hbox:
                        spacing 10

                    if who is not None:
                        text who id who_id

                    text what id what_id

NVL screen with debug colours

I noticed that as I advanced the text the window stretched upwards for it to fit. This reminded me a lot of a terminal window (gif from imgur).

Terminal window with code

So I figured I’d take that idea and run with it - my game is about technology after all. I changed the text to a simple monospace font and added a blinking underscore click-to-continue icon. But I still wanted to have that occult vibe there so I put the rotating pentagram in the background for a nice juxtaposition of old and new.

New NVL screen style

I found a lot of UX issues with the GUI, some of which were very annoying to fix. The main problem I had was changing how the save/load/settings menus work when coming to them straight from the quickmenu (the menu in the say screen). The way it worked before was when you came to these screens from the quickmenu the right-click menu would automatically be displayed underneath (to show the rotating pentagram) but then if you clicked ‘back’ it would just hide the save/load/settings screen and you would still see the right-click menu, which you would have to exit out of as well - not too great. Ideally I wanted people to be able to go to screen from the quickmenu and go back again with just two clicks. What I really wanted was a way to do something like:

screen preferences:
    if user_came_from_quickmenu:
        on "hide" action Hide("rc_menu")

But couldn’t figure out a simple way of doing it. As a compromise I simply added two ‘exit’ buttons to the menus. One of them exits out of all menus, the other hides the current screen and goes back to the right-click menu - problem (sort of) solved!

Finally, a neat thing I noticed in some of the python code I was working on in my job was a terminal command to get rid of .rpyc files. Since I noticed that if you delete a .rpy file when a .rpyc version of that file exists, running your game again, the .rpyc file will still exist, so the code you just deleted will still run! Not great. To get a clean slate you can open a new terminal window (on mac or linux), navigate to your project folder (e.g. cd /Users/your-username/renpy/your-project or cd ~/renpy/your-project) then run -find . -type f -name "*.rpyc" -delete and this will clean out all your .rpyc files and force Renpy to compile again next time you run your project (much easier than doing it manually). This is a very nice intro to the command line if you’re new to it! I went one step further and added a makefile to my project and just wrote this in it:

    find . -type f -name "*.rpyc" -delete

Makefiles are typically used as tools to build software but you can use them to run any command you like by defining them as above. The above makefile code means you can just run make clean in your terminal window instead of having to type out find . -type f -name "*.rpyc" -delete every time (yeah I’m lazy). Alternatively, you could create an alias in your terminal config file e.g. alias cleanup="find . -type f -name "*.rpyc" -delete" then just type cleanup to run the command.