April 2018
Beginner
552 pages
13h 58m
English
Let's run the following 3dMaze.py script by performing the following steps:
#!/usr/bin/python3 """Small maze game, try to find the exit """ from math import sin, cos, radians import demo import pi3d from pi3d.shape.Building import Building, SolidObject from pi3d.shape.Building import Size, Position KEY = {'A':97,'D':100,'H':104,'R':114,'S':115,'T':116, 'W':119,'ESC':27,'APOST':39,'SLASH':47,'NONE':-1} # Setup display and initialise pi3d DISPLAY = pi3d.Display.create() #capture mouse and key presses mykeys = pi3d.Keyboard() mymouse = pi3d.Mouse(restrict = False) #Load shader shader = pi3d.Shader("uv_reflect") flatsh = pi3d.Shader("uv_flat") ...Read now
Unlock full access