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 / How to get a terrain into DB??

Author
Message
Xenosis
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location:
Posted: 13th Dec 2002 06:06
How do i exsample get a terrain made whit Magic world into Darkbasic as grund??

Please show me what to write in this script:

REM SET UP SYNC
sync on
sync rate 30
Backdrop on
hide mouse

Fog on
Fog distance 3000
Fog color RGB(128,128,128)
Color Backdrop RGB(128,128,128)


REM LOAD IMAGES
load image "grass09.bmp",1

REM CREATE MATRIX
make matrix 1,10000,10000,150,150
prepare matrix texture 1,1,2,2
randomize matrix 1,10

REM PLACE THE TEXTURE TILES ONTO THE MATRIX
for x = 0 to 19
for z = 0 to 19
t = rnd(3) +1
set matrix tile 1,x,z,t
next z
next x

REM UPDATE CHANGES TO THE MATRIX
update matrix 1

rem Load object
Load object "house.3ds",2
Loop object 2

position object 2,5000,Get Ground Height(1,5000,5500),5500

Rem Main loop
Do
set cursor 0,0
print X#
print Y#
print Z#

Rem Store Object angle
CameraAngleY# = Camera angle Y()


REM MAIN LOOP////////////////////////////////////////////////////////
Do

CamX# = Camera position X()
CamZ# = Camera position Z()
CamY# = Camera position Y()


OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#

CameraAngleY# = WrapValue(CameraAngleY#+MousemoveX()*0.2)
CameraAngleX# = WrapValue(CameraAngleX#+MousemoveY()*0.2)

REM CONTROL INPUT FOR CAMERA

If Upkey()=1
XTest# = Newxvalue(X#,CameraAngleY#,10)
ZTest# = Newzvalue(Z#,CameraAngleY#,10)
If XTest#>0 and XTest#0 and ZTest#0 and XTest#0 and ZTest#0 and XTest#0 and ZTest#0 and XTest#0 and ZTest#
Xenosis
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location:
Posted: 13th Dec 2002 06:07


Bighead
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location:
Posted: 13th Dec 2002 07:06
Or:

Xenosis
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location:
Posted: 13th Dec 2002 07:24
No one knows how to get terrains into Darkbasic??

Bighead
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location:
Posted: 13th Dec 2002 08:03
Perhaps what you're trying to mean is creating a terrain from a heightmap. If so:
1) forget matrix and use the terrain commands directly (but take due note that mayor improvements will be introduced with Patch 4 to terrains)
2) visit http://www.darkbasic.net/modules.php?name=News&file=article&sid=58
Xenosis
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location:
Posted: 13th Dec 2002 08:46
Okay now i got a code like this:



How du i make hiils and perfaps a lake??

Xenosis
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location:
Posted: 13th Dec 2002 09:50
No one want to help me??

Necrym
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: Australia
Posted: 13th Dec 2002 10:29
If your using magic world from then you need to include the loader file like this at the start of your program. Also ensure the magicload is in the same directory as your project.

#include "magicload1-1.dba"

then u load the world u have made with this command
MagicLoad("mymap",1,1,1000)

All should load well

Watch the bouncing cursor - now in 3d
Xenosis
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location:
Posted: 13th Dec 2002 11:30
Am a afraid you have to explain that a little better..

Am a newbie..

You can example contact me on ICQ whit support:
ICQ:
132388998

Necrym
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: Australia
Posted: 14th Dec 2002 13:55
sorry Xenosis dont use icq any more but you can email me at necrym@hotmail and ill email you an example or more explantion if you like.

Watch the bouncing cursor - now in 3d
Necrym
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: Australia
Posted: 14th Dec 2002 13:56
oops thats necrym@hotmail.com

Watch the bouncing cursor - now in 3d
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 14th Dec 2002 21:54
For hills and a lake, just make the hills in a matrix editor. For the lake, just make the land go down to a specific height, then make a new matrix, texture it with water, then cover up the hole with it.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
Xenosis
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location:
Posted: 15th Dec 2002 00:33
Necrym I have sent a mail now.. Hope you will help

Thanks

QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 16th Dec 2002 05:19
you could just specify what you are talking about
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 16th Dec 2002 23:27
Agreed.

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com

Login to post a reply

Server time is: 2024-04-24 00:06:21
Your offset time is: 2024-04-24 00:06:21