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.

DarkBASIC Professional Discussion / How to save/load 3D array of UDTs?

Author
Message
Darkhog
13
Years of Service
User Offline
Joined: 25th Nov 2012
Location: Mushroom Kingdom
Posted: 4th Dec 2012 00:43
How to save/load 3D array of UDTs? I'm planning to make Minecraft clone (it's great way to learn procedural generation) and saving is important aspect in such project. So how do I save 3D array of UDTs into file and then load it? I have access to Matrix1Utils, so functions utilizing it are permitted.
Ramon156
14
Years of Service
User Offline
Joined: 13th Jul 2011
Location: Netherlands
Posted: 4th Dec 2012 12:25
There is a command, in Matrix1. That lets you save an UDT array to a file, and load it up.

http://www.matrix1.demon.co.uk/Matrix1Utils_Help/Matrix1Util_29_index.html

LOAD ARRAY FROM DATAFILE
LOAD ARRAYPTR FROM DATAFILE
SAVE ARRAY TO DATAFILE
SAVE ARRAYPTR TO DATAFILE

Is that what you're looking for?
Darkhog
13
Years of Service
User Offline
Joined: 25th Nov 2012
Location: Mushroom Kingdom
Posted: 4th Dec 2012 17:04
Yup, that'd be it.
Ramon156
14
Years of Service
User Offline
Joined: 13th Jul 2011
Location: Netherlands
Posted: 5th Dec 2012 09:31
In my topic the user "nonZero" posted this code. I haven't looked into it yet but I will be soon, maybe it's usefull also.

Login to post a reply

Server time is: 2026-07-07 09:28:51
Your offset time is: 2026-07-07 09:28:51