2Pacs is a collaborative game where two players armed with wiimotes control a deranged Pac-man across a labyrinthine landscape while ghosts give endless chase. Each player has their own controller and view of the game and, together, they embody 2Pac.
What we wanted to create was a simple and fun game that emphasises teamwork and communication. We wanted to get back to the roots of multiplayer games in a local setting but still make it relevant to today's technologies. That is why we chose to create a game where two people control one body. Both players also has different view of the environment and thus have different information about their surroundings. This forces the players to communicate in order to survive and collect more pellets.
This game was created during the course Advanced Graphics and Interaction (DH2413) along some of the other projects. Take a look at some of the interesting projects created during this course.
Unity is a game engine we chose to use since it enables us to focus on the content and fast prototyping. With Unity it is simple to create a project without having to set up a lot of boilerplate application settings. It also enabled us to use a plugin in order to use the Wiimotes as controllers.
We knew we wanted a Tron like theme for one of the levels and in order to achieve that sort of look we investigated in glow effects and Bloom technology. It turns out that Unity already had a script that enables Bloom effect but it can get very overexagerated if you have a directional light in the scene since a lot of pixels will be lit and thus smeared out over several neighboring pixels. This led to us having to investigate with self-illuminated materials in order to avoid directional lighting.
All of the materials in the scene use a self-illuminated shader which makes the scene look like it has some ambient light. It also gives a nice effect together with the Bloom-effect whenever there is a light source directly hitting the bright areas of the material. This creates some cool effects when Pacman is right on the bright edges of textures.
One of the things we put a lot of graphical effort into were the particle effects.. There is a built in particle effect system in Unity but for the sake of learning, we implemented our own. From that particle system we can create particle effects easily as we see fit. We use it whenever a pellet dissapears and when Pacman hits a wall with high velociry.
What better way to play with graphical effects than an EMP-blast? The EMP-blast consists of two main parts. The first one is a particle effect and texture animation for simulating an omni-sphere blast radiating out. The second is a vertex-displacement shader that creates a ripple-effect on the ground radiating out. Whenever the EMP is triggered out materials go dark in order to simulate the loss of power in all of the surroundings.
3ds Max is a modeling software we used for modeling and animating the characters in the game.
Blender is a free and open source 3D modeling software that we used to create the Levels for the game
The wiimotes are used as controls in 2Pacs. They are easy and intuitive to use for players of all ages. Even people who don't play a lot of video games could quickly get the hang of the controls which is great and something we value a lot.
One of the players will see from a third-person perspective and controls the speed and movement forward of the character by shaking the controller. The more you shake the faster the character will go. The second player with a first-person perspective is in control of the direction of the character. By turning the wiimote the character will also turn in the same direction. This player is also responsible for jumping over holes and ghosts but must coordinate with the other player to do so successfully. When the players get inte a difficult situation and must escape the ghosts they can release an EMP but have to coordinate and trigger it simultaneously by jumping and smashing the controller downwards.
One of our biggest challanges was just to get the technology working. The wiimotes communicate through bluetooth and there is not a free and easy way to get wiimotion support. We had to rely on a Unity plugin that has not been updated for some time and did not work bug free. The wiimotes did not always want to connect with the unity engine and was very random. Sometimes it could take 15 minutes before we got it working properly so we could test features. This lead us to have some backup plans on control schemes since we quickly wanted to be able to try new features that are not dependent on the wiimotes.
Another challange we had to overcome was how to balance the difficulty of the levels. In the beginning we had a level with a lot of holes in it which was way too difficult for most players and they did not get very far before dying. The lack of friction from the ground also contributed to the level of difficulty, but was something we though was good and a fair challange. What we ended up doing was simply creating a level that did not have as many holes in it and made the steering of the character the challenging part. In the end this turned out great and we saw more success from the players without leaving them unchallanged. Since the character slides around a lot, the players who were more restrictive and patient also did better in the end.
When people first played our game they were zig-zaging a lot due to the controls and had a hard time to pick up the pellets in the game. This was due to the collision detection beeing a little bit too strict. We knew we had to combat this somehow and we wanted it to be a little bit more unforgiving but don't just increase the hit-box of the pellets. We as a team did not like the look of consuming pellets that were not touching the player. What we did instead was to make the main character have a gravitational pull on the pellets. So whenever the player is moving close to a pellet it will start attracting it until it finally collides with the player. This gave much better results both graphically and gameplay wise.
With the wiimotes you have to work with motion and acceleration, we learned how an accelorometer actually works and what information we can extract from it. The novel approach of shaking and looking at all the accelerometer axis worked best in the end even though we started out trying more advanced techniques. We learned that trying to overengineering things does not always give the best results.
Even though Unity gave us a lot when it comes to graphics we still had to learn how materials and light interact and how the bloom-effect works. When creating the levels we also played around with normal maps which was something new to us. When we created the EMP-effect we had to go into lower level shaders to do vertex-displacement. In order to get the vertex-displacement shader to work with the other materials we had to write the shading for self-illuminated surfaces and texture mapping aswell.
Another area that we learned a great deal from was particle effects. Since we wanted to do our own implementation we had to learn and figure out ourselves how it works and some best practises. Even though our implementation might not be the best or most efficient we did do it ourselves and we will be able to improve it in the future.