1 / 8

Game Programming Step-05

Game Programming Step-05. Learn how to create a border of the ground. http://www.prasansoft.com. Purpose Step 05. 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-05. FOR i=0 TO 20

raiden
Download Presentation

Game Programming Step-05

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-05 Learn how to create a border of the ground. http://www.prasansoft.com

  2. PurposeStep 05 • 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-05 FOR i=0 TO 20 SET MATRIX HEIGHT 1,0,i,500 SET MATRIX HEIGHT 1,20,i,500 SET MATRIX HEIGHT 1,i,0,500 SET MATRIX HEIGHT 1,i,20,500 NEXT i FOR tx=11 to 15 FOR tz=11 to 15 SET MATRIX HEIGHT 1,tx,tz,-100-RND(100) NEXT tz NEXT tx 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-05

More Related