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.
Activity workspace
Pick an activity. Its mission, controls and live result stay together.
โถ 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)๐งฑ Building blocks click one to add it to your code ยท tap to fold
Object
Click the world to play ยท W A S D / arrows move ยท Space jumps ยท drag to look
Make your player yours. Your look is saved with your work โ see it on the right.
Ready-made objects for your world. Copy the code, or add it to your code and change it.