This is the Complete Unity Developer - one of the most successful e-learning courses on the internet! Completely re-worked from scratch with brand-new projects and our latest teaching techniques. You will benefit from the fact we have already taught over 360,336 students game development, many shipping commercial games as a result.
You're welcome to download, fork or do whatever else legal with all the files! The real value is in our huge, high-quality online tutorials that accompany this repo. You can check out the course here: Complete Unity Developer
About the Game Design Doc
- This part of the section notes is a simple reference for the important specifications of the game.
- This is just for reference, we'll refer to it as needed during the videos.
- Your Bowlmaster assets attached.
- What BowlMaster Teaches
- Manipulating a 3D world.
- Test driven development.
- Introducing Unity 5.
Useful Links
- Section Links
- How to keep Unity 4.6.3 as well
- Installing the latest Unity 5
- A brief tour of what's different
- Get used to 3D controls.
- Create a bowling lane floor according to GDD.
- Set your main camera to look down the lane.
- Blender is a 3D art program.
- We need it to import .blend files.
- It's amazingly powerful, but tricky to get started.
- You only need to install for this course, not use.
- www.CompleteBlenderCreator.com to learn more.
Useful Links
- Import our bowling pin from Blender*
- Learn about render and collider meshes.
- Create a pin prefab.
- Lay-out all 10 bowling pins on the floor.
Useful Links
- * Find out more at www.CompleteBlenderCreator.com
- Create a 3D sphere of the right size.
- Apply a temporary texture so we can see it roll.
- Add a sphere collider.
- Add a Rigidbody (3D) and set properties.
- Make the ball roll down the lane.
Useful Links
- Create CameraControl.cs for the Main Camera.
- Make the camera track the ball.
- Stop when it gets close to the headpin.
- Add Rigidbody to the pins.
- Adjust physics so that collisions work*
- Create new, richer pin prefab.
* We will make this more lifelike later
- Create a render texture* ready for camera output.
- Position a top-down camera looking at pins.
- Create a user interface panel.
- Embed a “Raw Image” with this render texture.
Useful Links
- Add new UI > Panel ready for swipe gesture.
- Set scaling & anchors for UI panels
- Make sure it scales well.
- Re-factor Ball.cs to create public Launch ()
- Write DragLaunch.cs component for ball.
- Wire the UI Panel's events to DragLaunch.cs
- Test new drag control system.
- Add another UI panel at bottom of screen.
- Ensure this panel “occludes” the touch input.
- Add two arrows, for moving ball left and right.
- Write a simple method to allow this at start.
- Overview the pinsetter and our end-goal.
- Setup “swiper” bar to tidy & reset pins.
- Add a “Swipe” animation for pin clearing.
- About animation sub state-machines.
- Managing pin tidying and resetting.
- Unity doesn't support “nested prefabs”.
- Care: the pins in Pins assembly are unlinked.
- Adding Pin.cs to the right place(s).
- About transform.rotation.eulerAngles.
- Writing code to detect if pins are standing
- About setting-up game object communication.
- Setup a simple UI Text display for pin count.
- Create a PinSetter box, and PinSetter.cs
- Continuously count standing pins.
- Only find standing pins after ball enters box.
Ben encourages you to keep going, even though the lectures are long, and the subject matter is more complex.
- Use the PinSetter's trigger collider to detect ball.
- Only start counting upright pins when ball enters.
- Detect when pins have stopped wobbling.
- Update pin count display to green.
- Set lastStandingCount to -1 when settled.
- Overview how Tidy & Reset will work.
- Modify the architecture of the game.
- Learn about sub-state machines.
- Learn about default transitions.
- Setup Tidy & Reset sub-states.
- Add temporary UI Buttons for Reset and Tidy.
- Write RaisePins() to lift all the standing pins up.
- Write LowerPins() to lower them down again.
- Test state machines work properly.
- A bit more about Transform.Translate().
- Using the Step button to slow things down.
- The perils of moving static colliders.
- How default animation blends can cause issues.
- Warnings about moving motion clips around
- A reminder about Fixed Timestep.
- About bounciness & default materials.
- Issues of scale & effect on Physics Settings.
- Stopping rigidbody's passing through each other.
- About re-factoring your code.
- Single Responsibility Principle*
- Wider framework of SOLID.
Useful Links
- Read how bowling scoring works*
- Draw an Object Communication Diagram.
Some useful links...
- An overview of Test Driven Development (TDD).
- The Red > Green > Refactor loop.
- NEVER refactor with a failing test.
Useful Links
- What Unity Test Tools are*
- How to find and install them.
- Setting up your first failing test.
Useful Links
- Setup our ScoreMaster.cs class.
- Write our first few tests.
- Get the first frame scoring properly.
- Go through a few more TDD loops
- Remember Red > Green > Refactor
- Be strict with yourself, build the discipline
- Save a version snapshot regularly
- Have fun!
- Finish the Control Code
- Go through the Red > Green > Refactor loop strictly
- Focus your failing tests on edge cases
- Keep your ActionMaster.cs looking clean
- Stop when you're confident it's done
- Challenge the community to write a failing test!
- Failing tests challenge
- A brief overview of a TDD bug reporting cycle
- Creating relevant tests from user bug reports
- Sticking to the TDD discipline
- Connect PinSetter.cs to ActionMaster.cs
- Refactor PinSetter.cs to report pin fall
- Connect PinSetter.cs to the animator
- Remove the Tidy and Reset test buttons
- Ensure our game controls it's self now
- Recap the problem with the current setup
- Use OnTriggerExit() for objects leaving colliders
- Refactor PinSetters.cs for the new paradigm.
- Taking the time to refactor
- Being your own boss
- Our current architecture
- A target architecture
- Keeping our tests in place
- Removing unnecessary Unity Testing folders
- Importing an animated gif texture
- Quaternion.Euler() & Quaternion.Identy()
- Using a boolean flag to prevent dragging
- Using continuous dynamic collision detection
- Refactor your ActionMaster tests for new API
- Refactor your code to single responsibility*
Useful Links
- Correcting a bug due to incorrect responsibility
- Create GameManager.cs and PinCounter.cs
- 'Weed' PinSetter.cs into these new classes
- Call the static ActionMaster.NextAction()
- Repeatably test everything still works ok
- An overview of the challenge (and delight) ahead
- Find and move ScoreMasterTest.cs to Editor folder
- Temporarily disable ActionMasterTest.cs
- Write cumulative scorer in ScoreMaster.cs
- Set THE challenge
- How we solved the scoring problem.
- A reminder that it's the destination that counts.
- How tests protect your refactoring.
“Make things as simple as possible, but not simpler” Albert Einstein
NOTE: I use a for loop in my solution, which you can read about in the resources below. You can just as easily use a while loop.
Useful Links
- What golden copies are.
- Why they are useful for verification testing.
- Using the [Category (“Name”)] test annotation.
- Using binary search to find the failing test(s).
- Commenting our code for future readability.
- Rearrange your UI to make space for scores.
- Create your scoreboard.
- Wire-up your scoreboard.
- Break your whole game!
- Trace your bug via console.
- Discuss handling undefined states.
- Discuss isolating and fixing bugs.
- How to decouple code with try{}, catch{}
- Mainly used in file handling applications
- Could be used in a team so one could move on
- Isolating our ScoreDisplay.cs issues
- Making our game fail gracefully
- What it means to define a class as static.
- The perils (and advantages) of statics.
- Why we're using static here.
- Refactoring a class to be static.
- Learning to accept other people's code!
- MonoBehaviour classes are hard to test*
- Code a testable static helper method.
- Create our testing structure.
Useful Links
- public static string FormatRolls (List rolls)
- Write your own tests as you go.
- Stick to the red-green-refactor loop.
- Aim for 20 lines or less of beautiful code.
- Enjoy the process & share with [SPOILER].
Useful Links
- Our Score Display Test 1
- Stopping nudging ball off the floor
- Make ball collisions detection continuous
- Suggestions for improvement
- Fix display of spare on last bowl.
- Check that 0X displays properly.
- Talk about upgrading Unity Test Tools.