Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Tutorial:Making a simple matrix

Author
Message
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 13th Dec 2004 08:12 Edited at: 13th Dec 2004 08:31
This is a tutorial on making a simple matrix.
This was written for for dbc but it might work on pro.

First you have to hide the mouse,so enter:

Hide Mouse

Next you need to put

Backdrop On

so you can color,texture,use,etc... the backdrop
Next you need to turn the fog on so put this in your code:

Fog On

To color the backdrop and fog put

Fog color RGB(120,120,120)
Color Backdrop RGB(128,128,128)

you can change the color values to the way you like them.
Now to make the matrix:

Make matrix 1,10000,10000,20,20

the most important number there is the first one it sets the number for the matrix which we will call it by.
change the other values to see what they are used for.
Now we load the image of grass that we will use to texture the matix:

Load image "grass.bmp",1

the number after the name is what we will call the image by.
Before texturing the matrix we have to select the texture:

Prepare matrix texture 1,1,1,1

the most important number there is the first one it selects which image to use.
Change the other numbers to see what they are used for.
Now to texture the matrix enter:

Fill matrix 1,0,1

The first number says which matrix to texture
Lastly to randomize the matrix height enter:

randomize matrix 1,100

The first number says which matrix to randomize
The second number says for much.
Now the code you should have is:


The End

Please post comments and suggestions
Zotoast
20
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 14th Dec 2004 03:59
Sync on : REM Syncronises
Sync rate 100 : REM Sync Rate
hide mouse : REM Hide The Mouse
backdrop on : REM Make a 3D Background colour
Set camera range 1,999999 : REM see really far

make matrix 1,10000,10000,70,70 : REM Matrix his 5000 pixels wide/long and has 70 tiles on each side
Randomize Matrix 1,250 : REM Randomises Matrix Heights
Update matrix 1 : REM Updates matrix changes (MUST USE!!!)

DO : REM Starts main loop (Where the controls go)

If upkey()=1 then x#=newxvalue(x#,a#,10) : z#=newzvalue(z#,a#,10) : REM Move camera forward
If downkey()=1 then x#=newxvalue(x#,a#,-10) : z#=newzvalue(z#,a#,-10) : REM Move camera backward
If leftkey()=1 then a#=wrapvalue(a#-3) : REM Turn camera left
If rightkey()=1 then a#=wrapvalue(a#+3) : REM Turn camera right

y#=get ground height(1,x#,z#)+50 : REM Dont let camera go under matrix

Position camera x#,y#,z# : REM Position the Camera
Yrotate camera a# : REM rotate camera around its Y axis

Sync : REM Refresh the screen

Loop : REM End the main loop


==================================

MY TUTARIALS BETTER

"Well, if he dies it'll teach him not to do it again." - Me
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 14th Dec 2004 05:11
They both suck...
j/k lol

But at least your trying, which is definitely a good thing.

Quote: "Change the other numbers to see what they are used for."

This shows that you don't really know exactly what that command does, to write tutorials you need really in depth knowledge. Its good that you want to help people out, but make sure you know exactly what you're talking about.


DBP Fanboy is a Unregistered trademark of ReD_eYe uninteractive, no rights reserved.
http://redeye.dbspot.com/fanboy.html
BaZko
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location:
Posted: 14th Dec 2004 07:31
Next time il go into more details.
Thanks for the replies tho.

Login to post a reply

Server time is: 2024-11-27 16:59:08
Your offset time is: 2024-11-27 16:59:08