TGC Codebase Backup



Easy Spinning Cube by reuben360

2nd Oct 2009 12:10
Summary

A basic spinning cube using the arrow keys to move the cube.



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    rem Spinning Cube
rem by reuben rosario
rem source code

rem display resolution
Set Diplay Mode 1024, 768, 32
Autocam off
Sync On
Sync Rate 60

rem cube object
Make Cube Object 1, 25
Color Object 1, RGB(128, 64, 78)

rem camera position
Position Camrea 30, 30, 30
Point Camera 0, 0, 0

rem lighting 
make Light 1
Position Light 1 ,0, 30, 0

rem game loop
Do

If Upkey()= 1 then Pitch Obect Up 1,1
If Downkey() = 1 then Pitch Object Down 1,1
If Leftkey() = 1 then Pitch Object Left 1,1
If Rightkey() = 1 then Pitch Object Right 1,1

Sync
Loop