100 likes | 129 Views
Learn how to create, position, and manipulate cameras in DarkBasic with this comprehensive guide. Presented by Mindless Thinking Games, this tutorial by Don Olmstead, Olga Sayenko, and Dmitry Svistula covers setting default cameras, creating/deleting cameras, positioning, pointing, setting views, selecting cameras, following objects, and utilizing various commands. Whether you're a beginner or looking to enhance your skills, this guide provides useful insights and practical examples. Master the art of camera control in DarkBasic and elevate your game development projects!
E N D
Camera Control Set Presented by Mindless Thinking Games Don Olmstead Olga Sayenko Dmitry Svistula
The Default Camera • DarkBasic gives a default camera • This camera is set as camera zero • By default it fills the entire screen
Creating and Deleting Cameras • Creating a camera is simple MAKE CAMERA [ camera_number ] • Deleting a camera DELETE CAMERA [ camera_number ]
Positioning the Camera • Use the following commands to position the camera POSITION CAMERAx, y, z POSITION CAMERA [ camera_number ], x, y, z • To get the current position of a camera, use the following commands CAMERA POSITIONX ( [camera_number ] ) CAMERA POSITION Y ( [camera_number] ) CAMERA POSITIONZ ( [camera_number] ) • This is useful for moving the camera from its current position
Pointing the camera • After setting the position of the camera, the next step is pointing it - this is where the camera is looking at POINT CAMERAx, y, z (default camera) POINT CAMERA[camera_number ], x, y, z
Setting the Camera View • Cameras can be set to avoid display on a selected portion of the screen • Example use: splitting screen for multiplayer gaming on the same monitor SET CAMERA VIEW [ camera_number ],left, top, right, bottom
Selecting a camera • You can cycle through the various cameras using the following command SET CURRENT CAMERA [ camera_number ] • Example use: changing the view for a player when they enter another room in level
Following an Object • The camera can be used to follow behind an object • Example use: a third person camera view SET CAMERA TO FOLLOW x, y, z, distance, height, smooth, collision SET CAMERA TO FOLLOW [ camera_number ], x, y, z, distance, height, smooth, collision • You will want to get the coordinates of the object OBJECT POSITIONx [ (object_number) ] … • Then have the camera set to follow those coordinates
Other Commands of Use • Use arrow keys to move the camera CONTROL CAMERA USING ARROWKEYS [ camera_number ], move_speed, turn_speed • Create a sky or other backgrounds BACKDROP ON BACKDROP ON [ camera_number ] COLOR BACKDROPcolor_value COLOR BACKDROP [ camera_number ], color_value TEXTURE BACKDROPimage_number TEXTURE BACKDROPcamera_number, image_number