TGC Codebase Backup



DBProV2ODE by Avoth

11th Nov 2010 23:06
Summary

Hands on DBPro Volume 2 ODE Snippet



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    ScreenSetup()
` Make Cube
Make Object Cube 1, 7
Position Object 1, 2, 20, 0
` Make Object Cone
Make Object Cone 2, 8
Position Object 2, 0, 5, 0
` Make Ground Using Object Plane
Make Object Plane 4, 100, 100
XRotate Object 4, -90
` Wait for Any Key to Continue
Wait Key
` Start Physics Engine
ODE START
` Set ODE Gravity
ODE Set World Gravity 0, -2, 0
` Link an ODE to Objects
ODE Create Dynamic Box 1
ODE Create Static Box 2
ODE Create Static Box 4

` Update the Screen
Do
    ODE UPDATE
LOOP

` End Physics Engine
ODE End

FUNCTION ScreenSetup()
    Color Backdrop 0
    Backdrop On
    Autocam Off
    Position Camera 0, 10, -50
    Point Camera 0, 0, 0
ENDFUNCTION