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.

Dark GDK / Add Camera views

Author
Message
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 14th Nov 2009 20:52
How can I add a new camera and use that view and make it small and fix it in one of the corner of the screen.

I want to do that to have a top view of the environment but that one will be separetly of the original one.


Thanks in advance for your help
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 15th Nov 2009 15:26
Please read the help for dbMakeCamera and dbSetCameraView.
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 15th Nov 2009 16:21
The help content is here in this website or in Visual C++
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 15th Nov 2009 16:29
C:/program files/the game creators/dark gdk/documentation/dark gdk

Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 15th Nov 2009 16:42
You can also find it in the Windows start menu, if Dark GDK managed to install correctly: start menu, programs, The GameCreators, Dark GDK, Documentation, Information.
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 15th Nov 2009 19:29 Edited at: 15th Nov 2009 19:44
When it comes to positioning the camera in the screen how can figure it out the coordenates positions or is it gonna be a trial and error method??


void dbSetCameraView ( int iCamera, float fLeft, float fTop, float fRight, float fBottom )

Cuz if there is an actual information about different positions in the screen it will be good to know.

Thanks in advance
CokeBoi
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location:
Posted: 15th Nov 2009 19:56
Trial and Error or Inferences based on nearby Objects. Thats what I normally do, at least.

LOL
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 15th Nov 2009 22:56
So how can I resize it o make it smaller, cuz it's been created in the same size as the original one and in order for me to put it in the corner I need to make it smaller so it can fit in there.

Thanks in advance
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 16th Nov 2009 21:59 Edited at: 16th Nov 2009 21:59
The parameters of dbSetCameraView are pixels.
Top left corner of the screen is pixel 0,0.
Default resolution of the Dark GDK window is 640 x 480 unless you change it in your program.
Just give some pixel parameters to that function to size and position the camera view.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 16th Nov 2009 22:48
P.S. The dbSetCameraView influences only how the view is displayed on the screen, not what the camera shows. To get a top-down view, you need to use dbPositionCamera and dbRotateCamera, just as you would position the default camera as well, only the camera ID number is different. And yes, that is mostly trial and error but you can get a good idea based on the coordinates of other objects on the scene.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 17th Nov 2009 07:39
To give you an example as well: to position the camera view in the bottom right corner and set it 200 pixels wide, you can use:

tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 18th Nov 2009 00:35
Why when I create and position the new screen it turns green.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 18th Nov 2009 07:54
The primary camera background is blue, the camera number one background is green. You can change the background colour with dbColorBackdrop or even turn it completely off with dbBackdropOff, but in that case you have to take care of clearing the screen background in each loop.

Login to post a reply

Server time is: 2024-11-20 09:33:51
Your offset time is: 2024-11-20 09:33:51