Hi
Quote: " Is it possible to have the screen divided in half and have 2 seperate cameras being displayed at the same time?"
This depends on what Darkbasic version you have actually. if you have DarkBasic Classic, this in not possible as it don't have support for multiple camera's. But if you have DarkBasic Professional, then it's a hole other story!
With DarkBasic Professional you can have multiple camera's.
I've just made a little example for you, showing how to divide the screen up into 2 screen. You can select between the 2 cameras and control them around.
Onto the code!:
`Multiple Camera's
`By - The Nerd
`initialize screen
sync on
sync rate 60
autocam off
hide mouse
`\\
`make two objects for position in the 3D world
make object box 1,10,10,10
color object 1,RGB(0,64,0)
make object box 2,10,10,10
color object 2,RGB(255,0,0)
position object 2,0,0,30
`\\
`make a new camera and set it up
make camera 1
set camera view 1,0,0,screen width(),screen height()/2
`\\
`Set the camera view for the default camera
set camera view 0,0,screen height()/2,screen width(),screen height()
`\\
`make the variable for controlling what camera you're on
currentCamera=0
`\\
`**Main Loop**
do
`Show some information
set cursor 0,0
print "d=Camera 1 s=Camera 0"
print "Frames Per Second: ", screen fps()
print "Current Camera: ",currentCamera
`\\
`Rotate the two objects
yrotate object 1,object angle y(1)+10
yrotate object 2,object angle y(2)+1
`\\
`These two are the buttons used to switch between the cameras
if keystate(32)=1
currentCamera=1
endif
if keystate(31)=1
currentCamera=0
endif
`\\
`Simple control for the camera
control camera using arrowkeys currentCamera,2,2
`\\
sync
loop
`\\
Now i will explain how i did this.
First of all, we need to make a new camera. I do this by writing "make Camera camera number".
Now as you maybe know, the default camera in DarkBasic is 0, so we only need to make 1 new camera to have our two camera's ready.
Now right after we've made the new camera(1), we need to put it on the screen, so you can see it. I do this by writing "set camera view", followed by integers. The first two integers are the position of the screen, we want this camera to be the top camera on the screen, so we position it in the top left corner of the screen. The next thing i do is to strecth the camera view to fill the hole screen width, and then i divide the camera view with the screen height. Now the first camera is actually set up! Now we just need to set up the default camera(wich is 0). We use the same command for this("set camera view").
Next thing I do is to make an integer called "currentCamera". With this integer we can control wich camera to use. Try to study the rest of the code to see if you can figure out what it do
Just ask if you need help to understand it
About the other question you had. I'm not sure that you can record the camera view.
-The Nerd
PanzerGames
here
Free Particle Engine For dbpro :
here