Make a 3d game in unity

Build a simple 3D Unity game with a controllable player, obstacles, collectible items, and basic movement scripting to learn game design and programming.

Game Development2 hrs12 steps
Start buildingMore tutorials
Make a 3d game in unity
Make a 3d game in unity
2 hrsVibe coding
12 steps →

About this tutorial

Build a simple 3D Unity game with a controllable player, obstacles, collectible items, and basic movement scripting to learn game design and programming.

What you need

đź§°Unity Hubđź§°Unity Editor (2020 LTS or later)đź§°Visual Studio or another code editorđź§°adult supervision required

Step by step

  1. 1

    Step 1

    Open Unity Hub and create a new 3D project named "My3DGame" then open that project.

  2. 2

    Step 2

    In the Hierarchy create a 3D Object → Plane to act as the Ground.

  3. 3

    Step 3

    In the Hierarchy create a 3D Object → Capsule to be the Player then move it up a little so it sits above the Ground and set its Tag to "Player".

  4. 4

    Step 4

    With the Player selected add a Rigidbody component so physics works on the Player.

  5. 5

    Step 5

    Make the Main Camera a child of the Player and move it behind and above the Player so you can see the player and the area ahead.

  6. 6

    Step 6

    Create a C# script named PlayerController attach it to the Player then open it in your code editor and replace its contents with this code and save:

  7. 7

    Step 7

    Create several 3D Object → Cube obstacles and place them around the Ground to make a simple course.

  8. 8

    Step 8

    Create several 3D Object → Sphere collectibles and place them around the course then select each collectible and check the Sphere Collider box labeled "Is Trigger".

  9. 9

    Step 9

    In the Hierarchy create UI → Canvas then inside it create UI → Text and rename that text object to "ScoreText" and set its text to "Score: 0".

  10. 10

    Step 10

    Create a C# script named Collectible attach it to each collectible Sphere then open the script and replace its contents with this code and save:

  11. 11

    Step 11

    Press the Play button to test movement collecting and collisions and then stop Play to tweak Player speed obstacle layout or collectible positions until the game feels fun.

  12. 12

    Step 12

    Take screenshots or a short description and share your finished 3D Unity game project on DIY.org.

Fun facts

🎮Unity was first released in 2005 and quickly became popular for making both 2D and 3D games.
🧑‍💻Unity uses C# as its primary scripting language to control player movement, interactions, and game logic.
🧩Game engines provide reusable systems—rendering, physics, input, and asset management—so creators focus on gameplay instead of low-level code.
🪙Collectible items like coins and stars became iconic in platformers (think Super Mario) and are great for teaching scoring and feedback.
⚙️Building a simple 3D game teaches core programming ideas: variables, input handling, collision detection, and the game loop.
🎮Unity was first released in 2005 and quickly became popular for making both 2D and 3D games.
🧑‍💻Unity uses C# as its primary scripting language to control player movement, interactions, and game logic.
🧩Game engines provide reusable systems—rendering, physics, input, and asset management—so creators focus on gameplay instead of low-level code.
🪙Collectible items like coins and stars became iconic in platformers (think Super Mario) and are great for teaching scoring and feedback.
⚙️Building a simple 3D game teaches core programming ideas: variables, input handling, collision detection, and the game loop.

How do you build a simple 3D Unity game with a controllable player, obstacles, and collectibles?

Install Unity Hub and create a new 3D project. Add a player object (capsule or character model) and attach a basic C# movement script for keyboard or joystick input and jumping. Place obstacles with colliders and rigidbodies, and create collectible prefabs with trigger colliders that increase a score and destroy themselves. Add a UI text element to display score, playtest frequently, then tweak movement, obstacle spacing, and collectible placement.

Go deeper

What materials and tools do I need to make this Unity 3D game?

You need a computer that meets Unity’s system requirements, Unity Hub and a recent Unity Editor install, and a code editor (Visual Studio or VS Code). Optional: game assets (free from the Asset Store), a mouse and keyboard or gamepad, basic art tools (Paint or free editors), and internet access for tutorials. Parental supervision and printer or notepad for planning levels can help younger kids.

Go deeper

What ages is creating a simple 3D Unity game suitable for?

This activity suits children about 10 years and up who can follow programming logic; motivated 8–9 year olds can participate with adult guidance. Younger children benefit from pairing with an adult or using visual block tools first. Adjust complexity: let beginners start with moving a capsule and collecting items, while older kids can add physics, UI, and simple scripts to deepen learning.

Go deeper

What are the benefits of making a simple 3D Unity game with kids?

Building a small Unity game teaches problem-solving, basic programming concepts, logic, and sequencing. It boosts creativity through level and asset design, encourages persistence when debugging, and introduces maths and physics ideas. Kids gain a tangible portfolio piece, improved digital literacy, and teamwork skills if they collaborate. Short, focused projects keep motivation high and show clear progress.

Go deeper

Watch & Learn

Need help?

What can we use instead of the Capsule Player or the built-in UI Text if those items aren't available?

Use a Sphere or Cylinder as the Player (set its Tag to "Player" and add a Rigidbody) and replace the Canvas → Text with a TextMeshPro object (install TMP and rename it "ScoreText").

When I press Play nothing happens or collectibles don't register—what should I check?

Ensure the Player Capsule has a Rigidbody and is tagged "Player", each collectible Sphere has the Collectible script and its Sphere Collider 'Is Trigger' box checked, and the ScoreText reference in the script is assigned before pressing Play.

How can I change the project to suit younger children or older kids?

For younger kids use fewer Cube obstacles, larger Sphere collectibles, and reduce PlayerController speed or use an auto-forward movement, while older kids can add jumping, timers, more obstacles, and edit the PlayerController and camera for extra challenge.

What are easy ways to extend or personalize the finished game before sharing it on DIY.org?

Personalize the game by changing the Capsule's material color, adding AudioSource clips for footsteps and a pickup sound, spawning particle effects in the Collectible script on collection, and updating ScoreText to display high scores or level numbers before taking screenshots to share on DIY.org.

Your first game is on us.

Describe a game below - no sign-up needed to try.

Make me

Kids GPT is now ChatDino

Kid-safe AI for discovery and learning.

Open ChatDino

Powered by AstroSafe

3,127Devs Online
1,284Games Made
1,415,800Total Plays

Make real games - not just chat

DIY.org

Kid-safe AI for discovery and learning. Ask anything, explore everything, learn with confidence.

Product

  • Pricing
  • App
  • All Apps

Resources

  • Blog
  • Kids Wikipedia
  • Worksheets
  • Activities for Kids
  • Build a Hacker Simulator
  • SafeTube

Company

  • About
  • Terms & Conditions
  • Privacy Policy
  • AstroSafe
TwitterInstagramYouTube

© 2026 DIY.org. All rights reserved. · Powered by AstroSafe