Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Using multiple cameras

Author
Message
3than
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 6th Oct 2011 07:26
Hi
I'm using DarkBASIC Pro with Dark Physics. It doesn't really make a difference with having physics or not, I'm just asking about using multiple cameras.

I'm making a very simple program where a bunch of cubes are placed randomly on the screen in a line going straight down onto a box(the floor). I want to make 2 cameras, one viewing the whole scene, and another where all the cubes will collide with the floor pointing up, so it's like you're a person lying on the floor with a load of boxes about to collide with your face.

Here's my code:



And here's an example for you if you don't have Dark Physics:



Now, I've made the two cameras, but what I'm trying to achieve is making two cameras on either side of the screen. Kind of like a first person shooter in split screen muultiplayer. But what I get with this is just the latest camera that has been made shows up on the screen.

Is there any way to split the screen into 2 so one camera is shown on one side, and the other camera is shown on the other side?

P.S. And also, if you could use more than two, like splitting the screen into 4 different sections, or maybe even more...
Thanks in advance for any help
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Oct 2011 15:27
Take a look at the SET CAMERA VIEW command - that allows you to specify the screen coordinates that the camera will render to.

Remember though that each camera requires it's own render, adding to the time taken to do all rendering (eg, if you have one camera that renders in 10ms, then 2 cameras will take 20ms, 3 cameras will take 30ms etc).

Login to post a reply

Server time is: 2026-07-11 09:47:39
Your offset time is: 2026-07-11 09:47:39