Skip to content

Your First 3D App - Part C: Deeper Understanding

Now that you've run the code, let's dig deeper into the important concepts!


What is a library (Library)?

What is a library (Library)?

library is a collection of code that other people have already written. Just like borrowing a book from a library to read, programmers import and use libraries.

For example: - If you need math calculations, you use the math library - If you work with dates and times, you use the datetime library - If you make 3D games, you use the ursina library

Why use libraries?

When you use a library, you don't have to build complex features from scratch. By importing and using code that others have already written, you can build programs much faster and more easily!

For example, instead of writing the math calculations yourself:

import math
result = math.pi  # 3.14159...

you can use it this simply!


What is the Ursina engine?

The Ursina engine is a library that lets you build 3D games and applications in Python. It's called an "engine" because, like a car's engine, it's the core part that makes the game run.

With the Ursina engine, you can: - Easily create 3D objects (cubes, spheres, etc.) - Create and manage a game window - Use cameras, lighting, physics effects, and more - Handle mouse and keyboard input

Ursina is a special library

Ursina is a specialized library for game development. Making a 3D game with plain Python code alone is hard, but with Ursina you can get started easily!


What is an object?

What is an object?

Object is a single unit that bundles together a LEGO block properties and behaviors.

  • A variable is like a sticky note that holds a property
  • A function Instruction manual for behaviors that holds a property
  • An object combines the two

Ursina's Entity is an object: - It has model, color, scale properties like these - It has animate_position() methods (behaviors) like these