rem Several cameras - OpenDBC tutorial (DarkBASIC Professional) sync on : sync rate 60 autocam off color backdrop rgb(120, 160, 210) rem A field, a red car and a few crates make object box 1, 300, 1, 300 color object 1, rgb(60, 110, 60) make object box 2, 10, 4, 16 color object 2, rgb(230, 80, 60) for n = 3 to 12 make object cube n, 12 position object n, rnd(240) - 120, 6, rnd(240) - 120 color object n, rgb(200, 190, 160) next n rem Camera 0 exists already and fills the screen. rem Camera 1 is a second view, drawn in a corner rectangle on top of it make camera 1 set camera view 1, screen width() - 220, 20, screen width() - 20, 170 color backdrop 1, rgb(20, 20, 40) do t = wrapvalue(t + 0.6) rem The car drives in a circle position object 2, sin(t) * 90, 2.5, cos(t) * 90 yrotate object 2, wrapvalue(t + 90) rem Camera 0 chases the car from behind set camera to follow 0, object position x(2), 2, object position z(2), object angle y(2), 40, 18, 10, 0 rem Camera 1 looks straight down from high above position camera 1, object position x(2), 140, object position z(2) point camera 1, object position x(2), 0, object position z(2) + 0.1 rem 2D is drawn over every view, so a white frame outlines camera 1 ink rgb(255, 255, 255), 0 x1 = screen width() - 221 : x2 = screen width() - 20 line x1, 19, x2, 19 : line x2, 19, x2, 170 line x2, 170, x1, 170 : line x1, 170, x1, 19 text 10, 10, "Camera 0: chase Camera 1: top view" sync loop