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 / Saving a Matrix Made in DarkBASIC Classic.

Author
Message
Ragnarok89
20
Years of Service
User Offline
Joined: 27th Jun 2004
Location: Look behind you! Ahhhh!~
Posted: 2nd Aug 2004 07:27 Edited at: 2nd Aug 2004 07:30
Am I able to save the matrix that was created? That way I dont ahve to have things like...

Make Matrix 1,20000,20000,50,50
Prepare Matrix Texture
Fill Matrix...Blah, Blah, Blah


an make it just...

Load Matrix "Town1.???",1

or something like that.


P.S. I thought that i seen a post like this somewhere but I couldn't find it.
Physics coder
20
Years of Service
User Offline
Joined: 25th May 2004
Location: United States
Posted: 2nd Aug 2004 07:50
you could write a file that contains the height info of the matrix. To save the height you could do something like this(in pesudo-code):

open to write matrixname$,1
write float 1,matrix_x_size#
write float 1,matrix_z_size#
write byte 1,matrix_x_Tiles
write byte 1,matrix_z_tiles
for x=0 to matrix_x_tiles
for z=0 to matrix_z_tiles
write float 1,get matrix height(1,x,z)
next z
next x
close file 1

something like that could save matrix height data.

-----------------------------------
To delete the bug, delete the code.
Specs: Sony VAIO Laptop, Windows XP, P4 2.8Ghz, 512MB RAM, ATI Radeon 64MB video memory, DBP Upgrade 5.3.
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 2nd Aug 2004 10:20
Check my tutorials at the Curved Basic website in the DarkBasic section. The tutorials are meant for DBP, but I see no reason why the one on saving matrices shouldn't work in both DBP and DBC.

If you need any more help, just post here or the Curved Basic forum.



(Click sig for link)

A book? I hate book. Book is stupid.
(Formerly known as Yellow)
Ragnarok89
20
Years of Service
User Offline
Joined: 27th Jun 2004
Location: Look behind you! Ahhhh!~
Posted: 2nd Aug 2004 12:24
Oooooh, so that's whre I seen saving a matrix before lol.

Login to post a reply

Server time is: 2024-09-22 19:32:43
Your offset time is: 2024-09-22 19:32:43