Dragging My Feet
📅 2023-04-18
So today was one of real feet dragging. Hex streamed so I tried to stay active in chat and I usually don’t get that much done when she’s streaming so I got this website up so I can start creating these posts. Before ChatGPT helped me with that I went into the Lost Halls scene and changed a little about the generation system in anticipation for what will come next. Originally when hallways generated, they would automatically place doors, doors would place rooms, and rooms would auto-generate furnishings. But I’ve been rewriting the core systems in my head over the last few days and I realize we don’t want doors at all. Fuck doors. Down with doors. Who needs them?
Well, okay we need doors. Doors are like, gamedesign gold. They cause the human brain to demand to know whats behind them. This creates mini-goals, drive, perfect for horror games. So no in a giant labyrinth game we’re not removing doors. But we are going to remove pre-set doors. In a push to give the player more choice, I want to create two things over the next system update. 1) The ability to create doors and 2) the ability to create hallways. These things will be framed differently in game, the idea is you’ll be seeking out where the rooms are behind the walls, and having to discover their location to reveal their door (which can be any tile wall that also has a room tile wall behind it, which I’ll grab with a spherecast). Then voila, the player does a little something, and we switch the wall in front to a door tile, switch the wall behind to a door tile, and we have a locked door. Maybe a nice shader effect can help it melt into existence in front of the player.
So In order to do this I have to simplify the current system a little, or more, reduce chain dependency. We can still generate a random door, and use it to create a random room, but I went in and just did an additional method that turned off the doors again. I do need to empty the door list entirely tho because right now when you finish phase one and unlock the doors in the hallway they burst open, but we cant have that happen if theyre not revealed/created yet - so instead we’ll just track with our globals script whether we’ve solved the phase puzzle and then doors that do exist can unlock and doors that havent been created yet can read the room when spawned and set themselves up right, jumping to locked or unlocked as need be.
In order to set this up I also had to change how rooms are held in general, originally the door prefab just held different room layouts as deactivated children. This was terrible and I’ve been wanting to change it over to prefabs for a while just never did. I anticipated it being a little bit of a headache but luckily I have a habit of parenting everything to zeroed out empties, so it was pretty simple. This also adds flexibility to the rooms themselves, now that they’re prefabs I can change and mess with them quicker, before it was a pain to go into every single deactivated child and change layouts. Now with prefabs I can clone them and go nuts on different wall designs or random furnishing generators.
As for the second objective of adding the ability for players to generate hallways, I battled GPT4 for 2 days trying to get something working. Frustratingly it works perfect in the testbed, pictured at the top of the post, but when I try to get it working in the levels themselves, it struggles with collision checks and A* just fails to generate. I’ve gone back and forth on fixing the collisions but I needed a day or two off so I could regroup. Tomorrow might be the day to tackle it. The idea is pretty simple, we give the player an ability that they can use to generate essentially shortcuts, we run a cast to a nearby tile and then push a hallway in between those two spaces, before turning off the walls so they get access. It's probably at 80% so it just needs some tweaking so it can work properly.
Then theres alter creation, which is also on the agenda for the next few days. I want to rebuild the alters entirely from the ground up to include new struct data for the items it can take, and a new method of building them that will mean instead of using premade alters as it currently exists, the player will be able to repair and use premade alters, or build one from scratch from an alter base. This would mean collecting specific items using the rigidbody controller and dropping them in place, freezing them, and building a small totem out of them, before applying the drag script to the group so you can move the alter as you please and some sort of rigidbody controller item drop for alter items instead of anchor positions like we’re currently using.
Once I have the hall punching, door punching, and alters, we’re that much closer to finishing the main puzzle systems for the new triple phase format of the run. Then I need to rework the mirror system and expand that, and tie the phase systems together with a manager, and we should be good to go. Then it’s a matter of tying up the haunt mother and orphan systems together so they can interact with each other, and fleshing out the haunt mother. Today I didn’t do very much but we’re very much on track again, I just need to buckle down with some dex or something and get it done.