Skip to content
Quick navigationFind a place or open a tool
All labs Python 3D Lab

All labs ยท ๐Ÿงฑ Python 3D Lab

Python 3D Lab: build & script your own 3D game

Build a bigger block world, shape an obby, and bring it to life with Python. Place and stack blocks in the 3D world, then inspect or change every block in the code editor.

๐Ÿ‘‹ Free demo: try the first 2 lessons and the first tool. Subscribe to unlock everything here and in all the other labs โ€“ USD 10 a month (USD 100 a year), or included with lessons. โœจ SubscribeLog in

Activity workspace

Pick an activity. Its mission, controls and live result stay together.

My saved work

โ–ถ See it working

๐Ÿงฑ Python 3D Lab โ€“ Like Roblox, but in Python: build a 3D world of parts, coins, lava, lifts and obbies, script what happens when you touch things โ€“ then play it.

๐Ÿ“– Python 3D Lab cheat sheet
from world import *

Part(position=(x, y, z), size=(w, h, d), color="red",
     shape="block" | "ball" | "cylinder", transparency=0,
     can_collide=True, spin=0)          # spin in degrees per second
Block(position=(x, y, z), color="forestgreen")  # grid-snapped 2 x 2 x 2 block
Coin(position=โ€ฆ)        Checkpoint(position=โ€ฆ)
Spawn(position=โ€ฆ)       Finish(position=โ€ฆ)

part.on_touch(fn)       # fn(player) runs when you touch it
part.move(to=(x, y, z), seconds=2, back_and_forth=True)
part.color = "blue"     # change it any time, even inside fn
part.destroy()

player.say("hi")   player.respawn()   player.teleport((x, y, z))
player.add_score(1)   player.speed = 24   player.jump_power = 70
message("Big title")    every(seconds, fn)    set_gravity(30)
Click an object to select it. Drag to move it. Changes show at once.
โญ 0

Click the world to play ยท W A S D / arrows move ยท Space jumps ยท drag to look