Week 3-6: Mechanic Design Refinement
- ef1998
- Nov 11, 2020
- 5 min read
Apologies for not doing the blogs of the previous weeks. I have been extremely busy and having issues with other aspects of my life.
Mechanic Justification
I needed a way to justify the way I did procedural generation and why the enemies are hunting the player. Narrative wise the player is a scientist who has worked on an experiment gone wrong and is now stuck in the multiverse. I had a particularly amusing thought that lead to a new mechanic idea. I like to have conversations with myself in a Q&A format which tends to generate interesting ideas. One particular question was "why are the scientists trying to capture the player and why isn't the player cooperating with them." to which my response was "You don't know what kind of a universe you are in. You could be in a universe run by evil cats and the scientists are merely their slaves. Do you want Tsar Tiddles III to use your head as a scratching post? I don't think you do." This lead to an interesting idea where you could have different endings depending on what room you are caught in similar to super wagon adventure, but that would be for outside the module as I want to focus on the procedural generation of rooms and not endings.
Design Sketches

First the player has a choice of rooms that they can enter. in this example the player has 2 rooms in which they can exit the current room.

The player then chooses 1 of the rooms to exit, in this case room 1. Room 2 and the previous room are then destroyed to keep the game running smoothly. The doorway to room 1 is also blocked off.

New rooms are then generated for each open doorway in room 1. the process then repeats.
Moscow Document
I have made a MoSCoW document to keep the project on track. For the must have section I have decided that the game needs a player character (obviously), different rooms in which to test out and experiment with my mechanic and of course, the procedurally generated level system.
For the should have section I have chosen to have enemies with AI. This is designed for a stealth game and so it is important to be able test out the mechanic in that context. The game of course is going to be 3D and that's just personal preference. The game should have a scoring system to give the player incentive to go through rooms and finally a fail state so that the game can end.
For the could have section I've put layered procedural generation. what I mean by this is having random generation inside the rooms in terms of wall, enemies ect. It's not needed but it would add an extra level of depth. I could put in a user interface for if the enemy is alerted but again its not needed. I also could have screens but again not needed.
For the wont have section I have decided that health is unimportant. When you're discovered you die. Gadgets and tools aren't going to be in the build as I'm not exploring them. Fighting AI would be outside the scope of the project. Animations and character models are also not needed.
Overall the big picture would of the game would be that its a single player procedurally generated stealth game where you have to avoid enemies and proceed through rooms. You'd need to plan out how to pass enemies methodically. You'd adapt to new environments. It would have a sort of wacky and cartoony aesthetic.
MDA
I will be using the MDA framework to analyse my mechanic.
Mechanics-
The mechanics involved in my game involve enemy AI and room generation. The player of course can move around and can look around. Rooms are generated and the AI patrols around the area chosen by the designer.
Dynamics-
The dynamics behind the game in terms of the level generation system is that the player enters a new room and new random rooms are generated. The dynamics of the AI is if the player is seen, the AI chases the player and if they are caught then its game over.
Aesthetics-
Challenge- the aesthetic of challenge is involved as the goal is to stay alive as long as possible while continuing to gain score
Adaption- The room generation system is designed so that the player has to adapt to new environments and thus keeping them on their toes at all times
Prototype Development Continued
Room generation finished
the code for my procedural content generated rooms has been completed. When the player enters a room, the room behind the player is deleted. If there were any pathways the player could take, they also get deleted. I want to add in doors but right now this is the most important thing to get completed. This also works for any size of room. Right now the most important thing for me to do is design levels and bash them out
AI development
I decided to develop the AI system for the enemies. Due to the scope of the project I wanted to make this as simple as possible. The first thing I wanted to do was create categories for certain behaviours the AI would have and the script would determine what to do based on what category was chosen. I thought the best way to do this was by using an enumerator. When I made the script the editor was very messy and knowing that I would be making multiple enemies and so I learned a little bit about the unity editor classes and made an extra script using property drawer to clean it up a bit. This would be very efficient for level designers who wanted to script but didn't do a lot of programming skills, but I mostly did it for myself to help prevent human errors and to make the process less exhausting. It isn't perfect but its much better than what I had before.

Overall the system works very nicely. I can select what I want the AI to do. I've got 3 behaviours coded in currently. 1 is a simple move where I can move the AI towards an object. another one is looking around and I can input the angle and the time it takes to turn. The last is a simple wait function. I coded all these to make the AI feel more human and give it some personality. It uses the same movement as the player to move around. What I want to do is code in some pathfinding behaviours but I can't use Unity's built in navmesh as it replaces the movement system of the AI and I want the feel of the AI movement to be consistent with the player's movement. I will have to learn something to fix it.





Comments