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 Discussion / Multiple Cameras

Author
Message
Brick Break
User Banned
Posted: 2nd Jul 2009 05:50
I've tried a couple techniques, but I just can't seem to get it right. To have multiple cameras in DBC would require the camera is moved to camera position 1, *click*, moved to position 2, *click*. Could I see some sort of code example for either layering one camera view on top of another or splitscreen? I think it would be really cool, especially for reflective water and the like. Help?

Permanoobs are awesome.
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 2nd Jul 2009 06:10 Edited at: 2nd Jul 2009 06:15
Go into your Dark Basic folder, then go into extras, then go into cross entertainment team, then open split demo. If it's not there then download the attachment.

EDIT:
Download attached.

Attachments

Login to view attachments
Brick Break
User Banned
Posted: 2nd Jul 2009 07:00
@pictionaryjr- No, I get the same flashing problem.

Permanoobs are awesome.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 2nd Jul 2009 07:06
@Brick Break

What version of DBC are you using?

Enjoy your day.
Brick Break
User Banned
Posted: 2nd Jul 2009 07:16
@Latch- 1.21, like I should.

Permanoobs are awesome.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 2nd Jul 2009 07:37
It's just 1.13 and 1.21 behave just a little bit differently when it comes to syncing and can lead to flicker.

Anyway, here's a basic split screen with 4 different camera views:



Enjoy your day.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2009 18:36
@ Latch

I seem to recall asking the same question once and you answering it(Thanks a lot again! ), and DBC v1.13 and lower shouldn't have any syncs in the loop when using "set camera view", since it syncs itself after that command.

@ Brick Break

Another good tip, which originally also came from Latch, would be to update one camera every loop to prevent slowing down the game loop. For example, if the sync rate is set to 60, and I have 2 cameras, the game loop would run at 30 fps if you were to set 2 camera views at the same time. And if I had 4 cameras, the game loop would run at 15 fps.

So what Latch showed me, was to toggle between the cameras:



Hope that helped!

TheComet


Make the path of your enemies easier with Waypoint Pro!
Brick Break
User Banned
Posted: 2nd Jul 2009 20:29
@Latch- That gives me the same flashing problem.

@TheComet- Your edit won't even run!

Permanoobs are awesome.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2009 20:47
@ Brick Break

It's probably your version of DBC. What do you see? What happens? Also, if you want to upgrade, I can send you v1.2, just give me your e-mail.

Try this:




Make the path of your enemies easier with Waypoint Pro!
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 2nd Jul 2009 20:56
hey comet, why dont you look into the select, endselect, case, endcase, case default command family, they would really clean up your code here

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2009 21:08
I see what you mean:



I didn't know that command was that useful... Thanks Smartguy!

TheComet


Make the path of your enemies easier with Waypoint Pro!
Brick Break
User Banned
Posted: 2nd Jul 2009 21:27
@TheComet- Ahh, seizure!

Permanoobs are awesome.
Yodaman Jer
User Banned
Posted: 2nd Jul 2009 22:51
Quote: "Ahh, seizure!"


If there's ever any flashing (which in DBC it's fairly commonplace), add the command 'CLS 0' just after setting the sync rate. Like so:



Somehow that stops the flashing.


Click to go to our website!
Brick Break
User Banned
Posted: 2nd Jul 2009 23:24
@Yodaman Jer- Actually, that doesn't seem to help on any of my projects. On a side note, cameras or not, how could I correctly stop the flashing problem?

Permanoobs are awesome.
Yodaman Jer
User Banned
Posted: 2nd Jul 2009 23:48
Well, something a person could do is this...I just thought of this, so bear with me.



I honestly don't know if that will get rid of the flashing problem 100%, but by drawing the black box and then making the program sleep it should stop any flashing (I think). Other than that, I have no idea how to get rid of it.


Click to go to our website!
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 3rd Jul 2009 00:19 Edited at: 3rd Jul 2009 00:19
brick break, does the flash occur on ALL programs or just this one or what?

yodaman im not sure the flash hes talking about it the one ur telling him how to cure, cuz yeah cls stops the generic flash but he said it didnt work

also the flash ur talking about yoda doesnt happen during 3d

Brick Break
User Banned
Posted: 3rd Jul 2009 00:31
@That1Smart Guy- It's just the generic, non-3d flash. When backdrop is off and 2d is drawn to the screen, even covering up the background, the whole screen flashes, strobe-like. I can still see what's ob the screen, but it has that awful flashing.

Permanoobs are awesome.
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 3rd Jul 2009 00:38
yeah, that should be cured by putting cls at the top of ur program, i wonder if cls 0 throws it off

also it doesnt occur during 3d correct?

Brick Break
User Banned
Posted: 3rd Jul 2009 01:10
That's right. With no 3D, it flashes. With 3D, it doesn't.

Permanoobs are awesome.
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 3rd Jul 2009 02:22
just put cls at the top and it should work

Brick Break
User Banned
Posted: 3rd Jul 2009 02:25
@That1Smart Guy- It doesn't really matter anyways, because I can just use backdrop on. Thanks for your help, guys! My original question was never answered, but it doesn't matter anyways. Now could you please turn your attention to my "Alternatives to String Variables" thread? That's where I really need help.

Permanoobs are awesome.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd Jul 2009 02:57
@TheComet
Quote: "would be to update one camera every loop to prevent slowing down the game loop"

Hey, hey... keep some competition. Don't give away all the secrets!

@Brick Break
Check to see if you have a Setup.ini file in the same directory as DB.exe . Open it up and change blitflipmode=0 to blitflipmode=1.

And if you are using straight 2d, avoid using backdrop on. It calls the 3d environment refresh every loop and may cause flashing as well depending on the settings in your setup.ini file.

Enjoy your day.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Jul 2009 14:19 Edited at: 3rd Jul 2009 21:07
Quote: "Hey, hey... keep some competition. Don't give away all the secrets! "


Whoops! There I go again... Sorry...

TheComet


Make the path of your enemies easier with Waypoint Pro!

Login to post a reply

Server time is: 2024-05-20 13:28:51
Your offset time is: 2024-05-20 13:28:51