Saving Banks

Blitz3D Forums/Blitz3D Beginners Area/Saving Banks

AbbaRue(Posted 2004) [#1]
After creating a bank there should be a way to save it.
But I don't see a SaveBank command anywhere.
How do I go about doing so.

What I am really trying to do is find a way to save a large amount of data.
I don't see a SaveArray command, converting it to an image file doesn't work either.
Because image files are converted to powers of 2.
I thought of using a memory bank, but that doesn't have a save command either.

The "Dim" command has a limit to the size an array can be.
I need a way to store an area of data about 1600 x 800.

Any help on this would be greatly appreciated.


Barnabius(Posted 2004) [#2]
There's plenty of file and stream commands in Blitz to serve your purpose. Just setup a function where you read your bank sequentially and save the resulting values into a file. Easy...

Barney


koekjesbaby(Posted 2004) [#3]
. forget that .


AbbaRue(Posted 2004) [#4]
I did some research and found out that banks can be written to disk with the command:
"WriteBytes bank,filehandle/stream,offset,count"

And loaded back in with the command:
"ReadBytes bank,file/stream,offset,count"

I was looking in the wrong place, under Load and Save commands.
Thanks for the help.


PowerPC603(Posted 2004) [#5]

The "Dim" command has a limit to the size an array can be.



How so?
What is the maximum size of an array in Blitz?

I intend to use lots of arrays in my game.


eBusiness(Posted 2004) [#6]
100000000 units seems to work fine. I think you will get problems around 2^31, but that is related to the 32 bit system.


AbbaRue(Posted 2004) [#7]
I used to get an error message when ever I made an array larger then a certain size.
But I just tried it again and I don't get the error message any more.
I think this was a limitation that was changed with either the last Blitz3D update or the one before that.
I think arrays used to be limited to a 16 bit number.

The total number of Verts in a mesh was also limited to a total of 32,768.
I think this limitation is still there.
If you try making a square mesh with more then 180x180 you will have one of the dimensions truncated.