+ All Categories
Home > Documents > Game Programming Step-01 how to create a camera to render the game .

Game Programming Step-01 how to create a camera to render the game .

Date post: 05-Jan-2016
Category:
Upload: duane-parrish
View: 216 times
Download: 3 times
Share this document with a friend
15
Game Programming Step- 01 how to create a camera to render the game http:// www.prasansoft.com
Transcript
Page 1: Game Programming Step-01 how to create a camera to render the game .

Game Programming Step-01

how to create a camera to render the game

http://www.prasansoft.com

Page 2: Game Programming Step-01 how to create a camera to render the game .

Purpose Step 01

• Learn how to create a camera to render the game.

• Learn to build a ground game.

• Learn how to create a game loop for processing time.

http://www.prasansoft.com

Page 3: Game Programming Step-01 how to create a camera to render the game .

Write Command Step-01

SET CAMERA RANGE 0,0.2,10000 Make CameraMAKE MATRIX 1,5000,5000,20,20 Make FloorSET MATRIX HEIGHT 1,0,0,100UPDATE MATRIX 1

DO Make Real-Time Render

SET TEXT FONT "COURIER NEW" SET TEXT SIZE 16 SET TEXT TO BOLD SET CURSOR 20,50 PRINT "STEP-001 set up camera"SET CURSOR 20,70PRINT " YOU CAN SEE SCREEN IN 3DGAME RENDER BY CAMERA "

LOOP Loop Real-Time Render

http://www.prasansoft.com

Page 4: Game Programming Step-01 how to create a camera to render the game .

SET CAMERA RANGE

This command will set the viewing range of the camera.

The Front Value specifies the closest point beyond

which the camera starts to draw the 3D scene.

• Syntax • SET CAMERA RANGE Camera Number, Near Value, Far Value

• Example• SET CAMERA RANGE 0,0.2,10000

http://www.prasansoft.com

Page 5: Game Programming Step-01 how to create a camera to render the game .

MAKE MATRIX

• This command will create a matrix to a given width and depth segmented into grid square of a specified arrangement.

• Syntax • MAKE MATRIX Matrix Number, Width, Height, XSegments, ZSegments

• Example• MAKE MATRIX 1,5000,5000,20,20

http://www.prasansoft.com

Page 6: Game Programming Step-01 how to create a camera to render the game .

SET MATRIX HEIGHT

• This command will set the individual height of a point within the matrix. To raise a whole grid square you would need to raise four points.

• Syntax • SET MATRIX HEIGHT Matrix Number, TileX, TileZ, Height

• Example• SET MATRIX HEIGHT 1,0,0,100

http://www.prasansoft.com

Page 7: Game Programming Step-01 how to create a camera to render the game .

UPDATE MATRIX

• This command will update all changes you have made to an existing matrix.

• Syntax • UPDATE MATRIX Matrix Number

• Example• UPDATE MATRIX 1

http://www.prasansoft.com

Page 8: Game Programming Step-01 how to create a camera to render the game .

DO

• These commands will define a loop that will repeat indefinitely. You are able to break from the loop at any time by using the EXIT command.

• Syntax • DO

• Example• DO

http://www.prasansoft.com

Page 9: Game Programming Step-01 how to create a camera to render the game .

SET TEXT FONT

• This command will set the typeface of the font you wish to use.

• You can optionally specify a character set value when selecting your font.

• Syntax • SET TEXT FONT Fontname

• Example• SET TEXT FONT "COURIER NEW"

http://www.prasansoft.com

Page 10: Game Programming Step-01 how to create a camera to render the game .

SET TEXT SIZE

This command will set the point size of any text you are about to output.

The point size should be an integer value.

• Syntax • SET TEXT SIZE value

• Example• SET TEXT SIZE 16

http://www.prasansoft.com

Page 11: Game Programming Step-01 how to create a camera to render the game .

SET TEXT TO BOLD

This command will set the text style to bold and non-italic.

• Syntax • SET TEXT TO BOLD

• Example

• SET TEXT TO BOLD

http://www.prasansoft.com

Page 12: Game Programming Step-01 how to create a camera to render the game .

SET CURSOR • This command will set the cursor position used by the PRINT command

• Syntax • SET CURSOR X,Y

• Example• SET CURSOR 20,50

http://www.prasansoft.com

Page 13: Game Programming Step-01 how to create a camera to render the game .

PRINT

This command will print text, numbers, variables

and strings to the screen. You can position where

the text will print using the

SET CURSOR command.

• Syntax • PRINT Print Statements

• Example• PRINT " YOU CAN SEE SCREEN "

http://www.prasansoft.com

Page 14: Game Programming Step-01 how to create a camera to render the game .

LOOP

These commands will define a loop that will repeat indefinitely.

You are able to break from the loop at any time by using the EXIT command.

• Syntax • LOOP

• Example• LOOP

http://www.prasansoft.com

Page 15: Game Programming Step-01 how to create a camera to render the game .

Result Step-01


Recommended