1 / 8

Game Programming Step-04

Game Programming Step-04. Learn how to create a low altitude of the ground. http://www.prasansoft.com. Purpose Step 04. Learn how to create a low altitude of the ground. Learn how to write a loop statement for. http://www.prasansoft.com. Write Command Step-04.

erasto
Download Presentation

Game Programming Step-04

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Game Programming Step-04 Learn how to create a low altitude of the ground. http://www.prasansoft.com

  2. PurposeStep 04 • Learn how to create a low altitude of the ground. • Learn how to write a loop statement for. http://www.prasansoft.com

  3. Write Command Step-04 SET CAMERA RANGE 0,0.2,10000 MAKE MATRIX 1,5000,5000,20,20 FOR x=5 TO 10 Write Comamand FOR z=5 TO 10 Write Comamand SET MATRIX HEIGHT 1,x,z,100+RND(500) Write Comamand NEXT z Write Comamand NEXT x Write Comamand UPDATE MATRIX 1 DO SET TEXT FONT "COURIER NEW" SET TEXT SIZE 16 SET TEXT TO BOLD SET CURSOR 20,50 PRINT "STEP-001 set up camera prasansoft.com" SET CURSOR 20,70 PRINT " YOU CAN SEE SCREEN IN 3DGAME RENDER BY CAMERA “ rem CONTROL CAMERA USING ARROWKEYS 0,10,1 CONTROL CAMERA USING ARROWKEYS 0,2,1 LOOP http://www.prasansoft.com

  4. FOR This command will define a program loop that will loop a finite number of times. The FOR command requires a variable and two values to begin the loop. • Syntax • FOR Variable=Start-Value TO End-Value STEP Step-Value • Example • FOR x=5 TO 10 http://www.prasansoft.com

  5. NEXT This command will define a program loop that will loop a finite number of times. • Syntax • NEXT Variable • Example • NEXT z http://www.prasansoft.com

  6. RND This command will return a random number between 0 and the range provided. • Syntax • Return Float=RND(Range Value) • Example • SET MATRIX HEIGHT 1,x,z,100+RND(500) http://www.prasansoft.com

  7. 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,x,z,100+RND(500) http://www.prasansoft.com

  8. Result Step-04

More Related