

For years, Sonic games have consistently promised a lot to fans, only to leave them grossly disappointed. You’ll know that it’s not always an easy existence when you love the speedy hedgehog. Try changing the values in the "Make Matrix" command to see how they effect the size and dimensions of the matrix.If you have been a Sonic fan throughout the last two decades or more. This allows you to create sharp peaks or rolling hills. When you press the space key the matrix is changed. In the program you can change the value of the "mY" variable by pressing the up and down keys. The second number is the range of the random value we wish to set the matrix to.

The first number after the command is the number of the matrix we wish to affect. When the space key is pressed this command is called to set the height value of each of the matrix vertices to a random height between 0 and the number represented by the variable "mY". This line of code introduces the "Randomize Matrix" command". If Spacekey()=1 then Randomize Matrix 1,mY In this example 50 divisions of 40 world units are made in each directions to create a 2000x2000 world unit matrix. The second two numbers are the number of divisions you wish to have in the matrix. In most cases these two will be the same but we're sure you can find uses for odd sized matrices. They represent an "X" and "Z" value in world coordinates. The second two numbers are the dimensions in world units of the matrix you wish to create. It allows you to create and manipulate multiple matrices in the 3D world. This number like the object and image commands is a unique identifier for the matrix you wish to create. The first number after the command is the number of the matrix you wish to create. This command creates a matrix object in your 3D world.

The first new command we will discuss is the "Make Matrix" command. The up, down and spacebar keys allow you to control the height and radomization of the matrix. This simple program creates a matrix and allows you to zoom in and out in isometric view using the up and down keys. As with all of the tutorials, if you see a command that is unfamiliar and not explained, review earlier tutorials or consult the help files. You can easily create mountains, rolling hills, caves and oceans with a few lines of code. A matrix finds its most popular use as a terrain object. In this example we will introduce the matrix commands.

If Spacekey()=1 then randomize matrix 1,mY Rem Position Camera above the matrix Rem mY is the variable for random matrix height Purpose: To Introduce the matrix commands. This page is an archived page from a discontinued product, the information is provided for informational purposes only.
