
Welcome to my Unity PacMan 3D Course.
You can buy the Unity Package providing all Prefabs i will use in the course directly on my website.
Link: https://www.octomangames.com/downloads/arcade-classics-pack-volume-1/
You can buy the Unity Package providing all Prefabs i will use in the course directly on my website.
Link: https://www.octomangames.com/downloads/arcade-classics-pack-volume-1/
Import packaged assets to build a 10x10 playfield and outline the pacman maze with walls, then show the grid and enable snapping for precise placement.
Set up walls with box colliders and an unworkable layer to mark walkable and unworkable areas, then use bottom-left and top-right helper points to compute the grid via script.
Develop a grid analysis and anti-star pathfinding system that targets specific goals, navigates walkable white tiles, and uses transforms and game objects to run the setup.
organize the Pac-Man 3D playfield by grouping walls under a parent object, creating an environment, and adding box colliders; then implement node, grid, and pathfinding scripts for a-star navigation.
Update the grid to match the cell count on vertical and horizontal axes, then run a physics check with a 0.4 radius on the walkable layer mask to fill nodes.
Explore pathfinding basics in a Pac-Man 3D grid by managing open and closed node lists. Calculate start and goal positions and query grid coordinates to navigate.
Implement pathfinding in Unity PacMan 3D by iterating neighbor nodes, skipping non-walkable ones, calculating move cost and distance, and updating open list to find the path from start to goal.
Finish the pathfinding workflow by triggering the path tracer at the goal, set start and goal nodes, and visualize and update the path in Unity PacMan 3D.
Move pac man through a grid using Unity's physics and recasting to detect walls, enabling tile-based movement with keyboard controls; future updates may add swipe or Android interfaces.
Check the distance to the destination and set the current direction under a threshold, then cast a forward ray with a walkable layer mask to verify obstacles and movement.
Update Pac-Man movement by validating input, setting the new destination to the current position, and aligning direction, while tagging walls and using ray casting to prevent collisions, enabling grid-based movement.
Create Clyde the ghost to chase Pac-Man using a pathfinding system on a grid, updating its route as Pac-Man moves and preventing backward movement.
Clyde moves by dynamically recalculating the optimal path to Pac-Man, updating open and closed lists each step, translating grid passes into next positions, and moving with a defined speed.
Clyde rotates to face the next grid direction by analyzing current and next path nodes, updating rotation vectors for up, right, down, and left, and setting the look direction accordingly.
Explore pac-man 3d ghost pathfinding for Clyde, preventing backward movement, tracking last visited nodes, and skipping non-walkable or already visited neighbors to avoid out-of-range errors.
Switch between ghost states using a state machine and a switch statement, embedding state-specific logic in each case to control chase, home, frightened, and eaten behaviors within the update loop.
Explore implementing Pac-Man style ghost scattering in Unity using a targets array of corner positions, distance checks, and state transitions from chase to scatter for smooth movement.
Create and save prefabs for PacMan, grid, and level; assemble the scene, apply a 0.5 unit offset for alignment, and update the grid check script to enable Clyde's chase mode.
Optimize the pacman ghost scatter logic by replacing target arrays with a transform list, using contains checks and a for loop to select the target and prevent overflow.
Show ghost #12 entering frightened state in Pac-Man 3D, heading to the home area at reduced speed, using scatter targets, and switching to chase when Pac-Man eats a power pill.
Clean up the cubes by removing box colliders and disabling target visualizations with a loop that disables mesh renderers at game start, including the home and frightened targets.
Implement chase and scatter timers for a PacMan 3D ghost, switching between chase and scatter modes every 20 seconds after releasing from PacMan, with timers reset when the state changes.
Since there has been a rendering problem, i had re-recorded the audio and i hope everything works better in the fixed video.
Since there has been a rendering problem, i had re-recorded the audio and i hope everything works better in the fixed video.
Since there has been a rendering problem, i had re-recorded the audio and i hope everything works better in the fixed video.
Learn how Inky chases PacMan by using Blinky's position to compute a target inside the grid, calculating vectors, distances, and grid-aware pathfinding.
Create a script to fill the complete playfield with pellets by iterating the grid and instantiating pellet prefabs at empty spots, measured by corner objects.
Configure a pellet system in Unity for PacMan 3D by creating an empty object, a pellet holder, a prefab, and an editor script to auto-fill fields.
Create a Unity editor script with a custom inspector button to auto fill the Pac-Man 3D playfield, manage colliders, and place helper objects in the spawn area.
Learn to instantiate prefabs in a Unity editor script using PrefabUtility. Preserve prefab connections while iterating the playfield, copy data, and set transforms and parents for rapid pellet setup.
Create a game manager to handle win and loss states and pellet collisions. Track pellet count, communicate pellet collection to the game manager, and reload levels until lives run out.
Implement a pellet-based scoring system in Unity PacMan 3D by reducing pellets and increasing score with a tunable amount, while updating the game manager and user interface.
Fix the inky bug by creating a goal transform, setting the current target to the grid target or the nearest wall target, and updating the goal to stabilize timing.
Replace the timing function with a timing system in the Unity PacMan 3D game manager, orchestrating ghost AI states (chase, scatter, frightened, home) via a ghost list and score-based releases.
Implement the win condition in Unity PacMan 3D by eating all pellets and reloading the level, while tracking score and level with static variables.
Implement a life system that decreases on ghost collision, reset Pac-Man and ghosts to their starting positions, and trigger game over when lives run out.
Set a starting position and public reset for Pac-Man and ghosts using vector3, then locate Pac-Man by tag, access its script, and trigger resets when lives are lost.
Create a game over scene with a solid background and game over text, and update score and level from the score holder via a read score script on scene start.
Add scoring for ghosts in Pac-Man by implementing a score function in the game manager, awarding points when eating frightened ghosts and enabling a basic combo multiplier.
Define pickup rules for cherries and strawberries, assign scores, and destroy them after a timer. Build a spawn system and a pickup script to handle collisions and game manager scoring.
Create a pickup spawner in Unity to spawn random strawberry or cherry prefabs after a set delay, using a coroutine, a pickups list, and random indexing.
Build a canvas with two text components to display level and score, anchor ui for scalable cross-aspect layouts (16:9 or 16:10), and position life and level indicators.
Create a UI manager on the canvas to display score, level, and lives using text components. Read data from the game manager and flush it to the UI.
Create a camera follow script that smoothly tracks Pac-Man, using a public target transform, fixed height, and a lerp-based position update with a configurable speed.
The Cleanup State has come:
We clean:
We do:
In this Course you will learn how to create your own PacMan Game using the Unity Game Engine & Inkscape for the Grafics. For the functionality we write C# Code in Monodevelop.
This course is an Intermediate course, so if you have trouble in any case, write me a message or Q&A, and i'll help as best as i can.
If you are beginner, you might have some trouble to follow, but the videos will guide you through the complete course. Don't forget you only become better if you repeat things and keep on learning!
Unity (5.6)
You will learn to create the complete process in Unity and setup everything needed
I will show you how you can setup the playfield and organize the Hierarchy.
We use the Canvas System for Grafics or Score later which requires Unity 4.6+
C# (Monodevelop)
We will put in functionality with scripts using Monodevelop and C# (you can also use Visual Studio)
We will implement A* to simplify pathfinding for the ghosts
We will create all other behaviors the ghosts had in the original game
Inkscape
You will learn the basics how you can create the Grafics on your own using Inkscape. You can also use any other software.
Course Material
Assets separately available! Feel free to create your own.
Conclusion
As a result of this course you should be able to create your own levels for a PacMan Game in 3D.
So what are you waiting for?
Let's make your dream game a reality!!
Level: Intermediate
Video Course Length: ~8hours
Unity Version required: 4.6+