Design Documentation for AC Captain


The title of our game is Captain AC, it is a game about managing air conditioning units in order to prevent a man from consuming too many sweets. To accomplish this, the player must use the building full of AC units  to control the individual temperature of each room to freeze or melt enemies (sentient ice cream and hot chocolate). The player has a limited amount of energy that they are able to use in order to heat and cool the building.The more ACs on at one time, the more energy will be used. The number of enemies in a wave increases over time, and if the player runs out of energy, all the AC units will shut down.

There are many systems at play within the game, some are more obvious while some are below the surface. The most prevalent system is the temperature, each room has an individual temp, changed by the player heating or cooling the room, increasing the stock of cool or hot air. Each enemy also has its own internal temperature, which is affected by the room temperature, but slower due to thermal conduction. The pathfinding and building generation systems are also incredibly important base systems to the game, allowing for randomness and modularity among the rooms, assuring they work together to assure the enemies always have a path to their goal. As the man eats, he will get larger until eventually exploding.

Yuchen’s Section

In this project I designed and developed the room & outside temperature system, AC controlling & electricity system, and pathfinding & building generator. 

Room & outside temperature system

In this game, there is an outside temperature and each room has its independent room temperature. The room temperature is affected by the air conditioner in the room(which is controlled by player) and the outside temperature. When the air conditioner is turned on, it can heat up or cool down the room. When the room temperature is higher or lower than the outside, it’s going to slowly move back to the outside temperature.

AC controlling & electricity system

In this game the player can turn on or off each AC and make it heat up or cool down the room. However, there is an electricity system to constrain the amount of ACs that player can turn on at the same time. The electricity is auto regenerated and stores in a battery, which is the stock of this system. Turning on a AC costs one unit of electricity for every seconds. If the player turns on more ACs and costs more electricity than the regenerating rate, it’s going to consume the electricity in the battery. If the battery runs out of electricity, every active AC is going to be shut down and even the camera is going to be shut down and blinking for few seconds. Therefore, this system is a soft limit of the amount of active ACs at the same time. It also requires player to use the ACs more strategically. They can use minimum amount of ACs and save energy until the critical point. Electricity regenerating rates for different levels are also different, so in a larger buildings the player can play around with more energy income, while there are also more enemies and more complex building layout.

Pathfinding & building generator

Pathfinding and building generator are two crucial procedural system for this project. The building generator can procedurally generate a building based on room prefabs with any length or height we want, then it also adds walls and air vent(as “stairs” for enemies to go up or down) to rooms. Every room has a script and all room scripts are saved in a 2D array, so other scripts are able to access to a room’s script by its floor and column number. When the building is generated, rooms in the same floor and connected together(no walls in between) are seen as an enclosed zone, and each enclosed zone must has an air vent to the upper floor. I also make the roof of the building as a “room” with the same width of the building, so enemies can walk on the roof and with these settings every room has a path to the target. 

I also write a pathfinding system by myself for this project, because I feel that it’s not reasonable to use a pathfinding library that calculates path based on colliders, since the path in this game are more like a maze or a math problem. It’s also a more optimized way to let the enemy spawner do pathfinding and tell the path to enemies. The pathfinding system is the most challenging part I made for this project, and I’m really glad that I made a working and stable system at the end. I tried 3 different versions of pathfinding. The first one just finds the stairs(air vent) on each floors and pass through it toward the target. It only works when the building don’t have walls, but then this game will not be interesting as now. In the second version it only find the reachable stairs, but it will not working when the target is at upper floor but the path has to go down to reach the target. In the third version I shift the way of doing it and let the building calculates the path after it generate all rooms. Every rooms in the building save a “next room to go” as a variable. Starting at the target room, it tells the reachable rooms around to set it as the “next room”, then it ask the reachable rooms to tell their neighboring room to do the same thing. There is a boolean in the room script to make sure that every room only be checked one time. After this process, every room in the building will have a “next room to go”. The path are saved in every rooms as a linked list. Then the enemy spawner start at the nearest room that it can enter and read the “next room” until it reaches the target, and translate these rooms into a list of vector 2 as a path for enemies. 

The part that I most enjoyed in this project is coding for the pathfinding system. I spent some time and faced some challenges during the process, but it’s really satisfying to make it very stably work at the end. It’s also very satisfying to see how the fundamental code works with arts and musics to create this procedural generated building and unique game experience. 

Yifan’s section:

When we initially started this project, I tasked myself with more of a coding focused responsibility since that is what I have been doing for the most part in the past. Coding, compared to other aspects of game development, is one of the things I am best at. However, three out of the four members in our team were going to code, and to me it just got a little messy. We all have different code habits and I decided to take on a more art-focused role (using Aseprite). I still did a little bit of code, that went into the game, but it is not even worth mentioning (I did a script which gives all the rooms random colors as well as coded all the buttons). What ended up happening was that I did majority of the art. I communicated with Jefferey, who is essentially my boss, in terms of what sprites he needs for the game, but he didn’t request a whole lot of things, therefore I took the liberty to do what I think is appropriate for the game.

The team agreed to pursue a low-pixel, 8-bit art style for the game. We first thought that we were able to find assets online that would fit the aesthetics that we wanted, but had no luck. So, what ended up happening is that we mostly just used original art for the game.

And when I initially saw Jeffery’s building generator prototype (at the time it was just blocks on rooms of the same dimension stacked on top of one another), I immediately had this image in mind, of this 8-bit office building, with pixelated tables and chairs (and office stuff) and set out to work. I can draw, to an extent, but I do lack in experience. I had to look up a lot of references of both 8-bit art and real-life objects, when I was working on the sprites. One major takeaway from this is shades. With hand drawing things you can do a lot with just lines, but this is not the case with pixel art. So I had to pay a lot of attention to shades, and reflections, in order to make the objects appear more “3-dimensional”, and that the audience can actually tell what they are (if a sofa is just a block of brown it would be very confusing). Creating pixel art is by no means difficult, but it can be quite time consuming. Since the levels are randomly generated, in order to prevent it from being too repetitive, I had to create a lot of variants of the same object, for instance, I had to do a chair at three different rotational angles, each with three different colors. And speaking of variations, how the level generation works is that we have a set number of room prefabs that are of different sizes, and they would be stacked up at random every game. What I did was I created variants of these room, 8 in total, and “manually” placed all the object sprites in each room to make them look different. This means to an extent I also did level design, but only from a visual aspect. As I worked on these room, I kept coming up with new things to make. I needed a lamp, a switch, sockets, etc. I ended up adding bunch of details to these room, which enriches the visual elements.

In addition to the above, I also worked on the title screen with Jefferey, I did all the buttons, and the logo. I did not want to use a font to type the title out in Unity, so I drew it like I did my other sprites. Again, I had to look up some references on 8-bit fonts.

I did the art for winning and losing as well. I communicated with the team and had this great idea of the player losing by the human character’s stomach exploding from eating too much, and for winning we show the character standing over bunch of dead bodies of the food while holding an AC unit. I couldn’t really do these two in 8-bit because they were more complex than the rest of the art, so what I ended up doing was hand drawing them and then converting them to a pixelated style using an online tool. They look a little different from the rest of the game, since the arts are native to 8-bit they are a bit less crip. But I think it’s a good look, sort of reminds me of these old games where the actual game is 8-bit for the posters for the games are really detailed illustrations.

Kurt‘s Section

This final group project is the best time for me to group and communicate this semester, because every member of our group has worked together on different projects before, so they know what they are good at. At the beginning, we simply divided different tasks according to each person's expertise. Jeffery and Jackson were responsible for the coding work, I was responsible for the sound design, and Yifan was responsible for the art part. Then we tried to make everyone's division of labor equal and reasonable. Yifan and I added the item of room design. Let’s talk about the part of room design. Yifan and I designed three rooms of different sizes. Based on this, we designed two types of large rooms, three types of medium rooms, and four types of small rooms. This design is for us to provide ideas to the people responsible for the code part (Jeffery and Jason). Each room is designed to have different interaction methods, and players can control the temperature of the room in different ways through these interaction methods. This can increase the diversified fun of the game.

Regarding the part of the sound effects that I am responsible for, I first communicated with Jeffey, the Leader of our team, about the main emotions of the game and the sound effects we want to achieve. Because the original idea of this game was Jeffery's idea, so I think communicating with him is the most effective. The advice he gave was an old-fashioned video game-style soundtrack, and he gave me a list (listing all the required sound effects). I made 20 different sound effects on the basis of this list, so that programmers can diversify into this game. At present, the FX of this game is still in the process of increasing. Then there is the background music part of this game. I made a BGM for the game when I just finished communicating with Jeffery. Later I thought this BGM was a bit too intense, and then I made three different ones. I chose a suitable one among the four, modified according to the mode of this one (adding or subtracting instruments), and made a BGM with three emotions. This BGM will change according to the number of enemies spawned in the game (enemy The more the BGM becomes, the tenser it becomes), and two ending music (victory/failure) are made, and there is a title scene music. Most of the synthesizer sounds are designed by myself, and the plug-in I use is Serum. I drew the main waveform of the synthesizer, and then added a compressor and filter to adjust the tone to achieve the tone of an old-fashioned video game soundtrack.

Finally, after everyone has finished their tasks, I adjusted all audio volume in Unity. So as to achieve the effect I want.

Room Design: https://docs.google.com/presentation/d/1qXAaWpqBoQp5jIIT8wupz7VJ0tzwwqU_m-yW_F_4KI8/edit?usp=sharing

The systems included in my field are:

Jeffery's opinion - the prototype I made - more opinions - modify the prototype - add more FX - the final version

Design tone:

Draw waveforms - add effects - write melody-superimpose more instruments and melody - mixing.

Design room:

Conception - Discuss with Yifan - Draw design drawings.

I think the biggest difficulty is mixing. This is the most time-consuming one because, in order to achieve the desired effect, I need to adjust the details of a lot of effects and find the sweet spot of each instrument. I don’t want the high frequencies to be too harsh. I also don't want to make the low-frequency vibration too obvious. This is where I usually spend the most time making music, because for me, writing a melody is fast. I often play on the MIDI keyboard according to the mood of the melody I want to write and I will find the melody I want. 

In fact, mixing is a process where practice makes perfect. I made a lot of game soundtracks this semester, and this one is the one I am most satisfied with. I learned from the previous experience and drew the waveforms proficiently. The same is true for mixing. Because the tones that are used in soundtracks are similar, I can find the value I want quickly when I cut EQ and add other effects. I think the way to make this step easier is to make more game soundtracks to make myself more experienced.

In fact, I enjoy the production process of this game more. The part I enjoy most is the communication part, because Jeffery is a good communication person, he can clearly express what I need to do. This not only saves a lot of time, but also allows me to complete my work more effectively. Of course, I also enjoy the process of making soundtracks, because this is my hobby. I like designing tones because I think the auditory system is the perceptual system that can affect people the most. Better melody and timbre can attract players better.

Jackson’s Section: 

I worked mostly on the enemies for this project, trying to make them feel like they died at a realistic pace to the room temperature they were in. The first step   was to have them detect the temperature of the individual room they are in. This is accomplished through triggers, after they know this, they slowly lerp to the goal temp, which is checked against the threshold temperature for them to start melting or freezing. After this temperature threshold, they will begin slowly losing health. Based on this health variable, they will animate into a different state of melting or freezing, giving the effect of melting over time and then dying. After death, the enemy will fall off of its rails and will have a random amount of force added to its rigidbody. Setting up these animation states was one of the toughest parts of the job, especially when it came to the character that was eating the food. I created several different states for the character to be in depending on how much he had eaten. These states were tough to set up, given there were so many of them in need of specific ranges of variables. I also added sound effects for when the enemies melt/freeze and for when the man eats, the ice cream and the man’s sounds are both randomized between a set of potential sounds. I really enjoyed being able to work with Jeffery on this project, as he created much of the foundational groundwork for me to create my systems on  top of 

Closing Word

The building generator, enemies’ reactions to temperature, arts and decorations in different rooms, AC & electricity system, and original sound effects & BGMs make this game successful. Procedural generated building provides unique experiences for every play and the pathfinding system ensures the stable game experiences. The temperature system and enemies’ reactions to the temperature make this game special. Arts and decorations in different rooms cooperates with the building generator to make this game visually interesting. The AC & electricity system makes the gameplay more strategic. Original sound track and tons of sound effects in the game smooth the gameplay and juice up the game feel. A lot of systems in this game could be expanded in the future. The current version only has two types of enemies and lacks some diversity for replayability. Adding more enemy types with different pathfinding logics & reactions to temperatures and giving certain rooms special effects could add more fun to this game. However, the current version is still worth trying. There is a detailed tutorial level to explain mechanics and settings in this game, and three different levels for players to have fun and challenge themselves. Play the game now, become the AC Captain, save humans from eating too much by your action!

Get AC Captain

Leave a comment

Log in with itch.io to leave a comment.