
learn to build a 3d whack-a-mole game with buttons, accounts, floating scores, and a score and timer system. explore rare blue head and golden moles, level progression, and debugging.
Learn snapping and prefab workflows in Unity by duplicating holes, configuring axis snap settings, and creating prefabs for hole, mole, and head to propagate changes across the scene.
Duplicate and rename the come down animation, create a separate animation for the mole’s descent, and use animation events to destroy the mole when it returns down.
Add a capsule collider to the mole, adjust its size to fit the hole and head, set it as a trigger, and add a rigidbody with gravity off.
Learn to control a mole collider in Unity by enabling it at frame 15 during come up animation and disabling it at start and end, using a switch collider function.
Hit moles with the left mouse button by raycasting from the camera, detecting mole hits via tags, and triggering mole behavior animations while disabling colliders for repeat hits.
Configure the mole animation to trigger on hit with a hit trigger, transition to get hit, and destroy the mole via an animation event at the last frame.
Recapping the module, we cover holes that spawn moles in time, hit and destroy them, and disable the input manager's hit targeting to enable a score manager and particle systems.
Prevent double spawning in a Unity whack-a-mole game by using a has more boolean, a parent object, and controlled spawn timing to ensure only one mole per hole.
Create a user interface with a canvas and a text field to display and update the score, wired through a UI manager and score manager.
Implement a 60-second timer in a Unity game using a game manager and a coroutine. Update user interface with minutes and seconds to drive level progression when score is reached.
Implement win and lose checks by validating the score to reach with a score manager, calculating score as current level times base score, using a time-based end condition.
optimize show score by wiring the current score and score to reach into the UI update flow to show progress toward the next level.
Implement a level up system that persists the current level across scene reloads, increments on victory, and uses base score multipliers to scale points.
Enhance gameplay by adding more moles, including a golden and a time mole, with customized colors and varying scores and time bonuses.
Implement rarity-based spawning for moles in Unity, assigning weighted chances to normal, head, bad, and golden moles and wiring a rarity calculation.
Recalculate mole scores based on the current level to scale points. Use the game manager's current level to multiply base points, so level 2 normal mode yields two points.
Create a floating score text on a UI canvas, parent it to a pop up object, and animate its position and alpha to rise and disappear.
Fix the displayed score across levels by reading from the score manager, and add a countdown before each new round using a Unity UI animation.
Use a public static game manager in Unity with an instance to access countdown and start the play timer, spawning enemies and advancing levels when time runs out.
Instantiate the fx stars at the mole hit point using a public fx object in the input manager, with hit position and identity rotation, then destroy it after the timer.
Create a game over scene with a UI canvas, display final score and level, and pass data from the score manager to a score holder for display.
Reset the score and level on game over by updating the score holder, loading the next scene, and restarting the game with spacebar input.
Create a blinking press space to continue text in the game over scene by animating a Unity text element with show/hide, color transitions, and timeline keyframes, centered.
Remove all debugging lines and console messages from the game by commenting them out, then build and test to finalize the main menu and game over screen.
The request was: How to spawn holes, let only one mole come out and then get rid of the hole again.
In this Unity Video Course i will teach you how to create Whack A Mole 3D Game using the Unity Game Engine. You can later on upload to final Game to a website, build an app from it or even put on Steam if they let you ;).
The course topics are the following:
Inkscape
we are using Inkscape which is free to create:
Texture Sheet for the Particles
Texture Sheet for Countdown Grafics
Unity
You will learn to create the complete process in Unity and setup everything needed
You learn how to import and setup the provided Mole 3D Models as well as the Hole
We use the Canvas System for Grafics or Score later which requires Unity 4.6+
We go over Raycasting, Countdown System, Timer, Score Popups
C#
We will put in functionality with scripts using Monodevelop and C# (you can also use Visual Studio)
We will create code for all funtionalitys for all systems as for timer, spawning moles etc.
It's time to Whack some Moles ;)
Level: Beginnner
Video Course Length: ~4hours
Unity Version required: 5.3+