Cap-Man: The Cappening
See all the entries here.
Day 1This one had me a bit puzzled when I heard the theme, I wasnt very sure on what to do with it, and I didnt really want to just make a flashy standard PacMan game.
The idea for the game ended up as a 3rd person 3d maze runner type game, with the maze using the original PacMan map.
Teleport points on each end, pickups everywhere, power ups to kill the enemies, and a few big point drops.
First up was the pickups. Since I settled on a Computer based them, a Capacitor seemed like the logical starting point.
GDL user Nanomesh gave me the idea with this character, and it helped spark a bunch of ideas for where to take the game so I ran with it.
And here is idle, running, jumping, and collecting a cap.
Next up was the maze, the biggest piece of the puzzle, and all starting with one little piece.
The best way Ive found to do this without any plugins is to create one as a prefab, place all the prefabs around, put them in a single game object, then you only have to update the single prefab if you want to make some changes. This enables me to adjust the height of the maze easily to balance the jump when I add the enemies into the game.
Day 2Day 2 started well. Put the finishing touches on the level so that when you look through the teleporters it looks like its showing the other side. And created the teleporters themselves. Its as easy as using a hit collider and setting a new Z position. There is no escape.
Next was starting with the enemy AI. Navmesh makes this super simple, and the Unity manual has a great starting example here. It was my first time doing it, and it took maybe 15 mins to set up a box that follows the player through the maze.
-What the Navmesh looks like after baking
-Enemy tracking the Player
Next up was getting the enemy models sorted, with a bit of animation. I went for floppies for these guys, old tech trying to crush the more modern stuff to stay relevant.
Im really happy with how these turned out.
As well as having a enemies chase the player, I set a couple up to move around the maze randomly. To do this I set it up to give a random destination to points within the map, which gives new points every 2.5 seconds.
private NavMeshAgent enemy;
private float randx;
private float randz;
enemy = GetComponent<NavMeshAgent>();
enemy.destination = new Vector3(randx, 0, randz);
randx = Random.Range(-14f, 4f);
randz = Random.Range(-12f, 12f);
yield return new WaitForSeconds(2.5f);
This is a really basic setup for the AI but works well enough for the purpose of the game.
You cant have AI's without a death animation either.
Then finally to set up the last of the enemies. 2 Patrol, and 2 go directly for the player.
Next up was the UI, so I could get the Health and Game Over aspect of the game working.
This was setup pretty basic, a Start button, health and score during game play, then a highscore and replay button after you die.
Finally the last 2 items before the day is over, power up pickups, and bonus score pickups.
For the power ups, there are 4 on the map, one at each corner, for the bonus score pickup, it spawns near the middle of the map, after 30 secs. This only happens once per level.
Thats it for day 2, which leaves polishing for day 3.
Day 3 was off to a slow start, the procrastination is strong with this one.
First off testing the balancing and jumping, making sure the player could jump enemies, and that they are slightly slower.
Next off was fixing a bug in the death animation, sometimes it would keep running after being hit, the simple fix for that was to add a transition from the walking and jumping animations to the the death animation.
Next was adding xbox controller support, which is pretty straight forward, and only really required a small tweak to the player settings. You can find the list of button mappings here.
Next up was particle effects. Most of them will be the same minus colour. Like the below one for when you pick up caps.
The only real difference for the the amount of particles and the lifetime of them, and is only spawned if the player kills them, not if they kill the player.
Next I cleaned up the in game UI. changed the health meter to icons over alpha/numeric, centered up the scoring text to the health icons, and reduced the size of the level display text.
The Start screen got a Title, and sub title
And the Game over screen got game over text thats flashing colours, and some witty remarks dependent on how well you did.
Lastly was the sounds. Most of them are ripped from the original Pac Man game, the music and the jump sounds are taken from sites that have Creative Commons music available.
Now this is the point were I thought I was done, could relax for the rest of the night, but lighting smacked me in the face when I did the web build.
Spent several hours, with make a change, wait 2 minutes for it to bake, test, make a change, wait 2 mins, and so on.
That wraps up this game jam for me.
Thanks for reading
Play Cap-Man here.