Previous Post

Weekend Update 09/29/24

Next Post
no preview
DESCRIPTION

This week I went back to working on the night overhaul that I had been implementing before i decided to work on making improvements to the game map.

The end goal is that this upgrade will be seamless except that it would allow custom nights, either as a cheat or as a reward for beating Goldie, probably both. For more technical stuff you can read the other paragraphs, but like I said it should be invisible. I'm also looking at overhauling how the bots' AI handle timing their events to enable an endless night mode. I should have something by Friday to show.

Since it's been a while I'll give a brief overview of the goal. The current way nights are loaded and processed is messy and leads to several issues where a variable from one night doesn't get reset on a subsequent night, additionally all of the nights data is stored in a single object, making editing the nights tedious. The goal of the redesign is to create a template object that holds a nights data, make a copy of that data when you start a night, write any events that happen during the night onto that copy, then unload the copy at the end of a night. That approach will keep the data separate from the game logic, which is how it should have been done originally.

That part is mostly done, the work I did this week is about taking care of the things stored in the nights that references things in the game world. I've talked about this before, but right now telling the night data to say "That's Foxy, disable her" is trivial, which is why I went with the flawed approach originally. Thew new approach will be more like saying "There will be a bot named Foxy, find her, and disable her" and I'm trying to find the best approach for getting those instructions down. The very easy way of doing it would be "Find the object named "Foxy" and disable it", but if I changed Foxy's name at a later date I would also have to remember that the script references her by that name and would need to change it there as well, which is not ideal for a single script and doing that approach multiple times ventures into nightmare territory, so it's bad in principle.

The approaches that are more acceptable that I'm trying out are creating scripts attached to bots that listen for a "disable" command, having a script that holds "story pertinent" targets for the nights to reference, and creating a script to hold a unique ID for every in scene object. The problem with adding scripts to all the bots is just clutter, the bots already have around 10-12 of scripts added to them and I don't like scrolling through the list of them every time i need to change something. The problem with the list of all the targets is that making sure everything is added to the list that needs to be there can be a bit of a headache, but it's manageable and somewhat preferred. The third approach of making a "sceneID" I kind of like in theory because it solves the problem and offers a solution for more problems like it in the future, the risk is that I make the script poorly and all the IDs get flushed or mixed up when I'm adding or removing things to the scene, so it's high risk high reward.

smutcube PATREON 101 favs
VIEWS1
FILES1 file
POSTEDSep 30, 2024
ARCHIVEDJun 10, 2026