what is : Write data into a memory bank

Blitz3D Forums/Blitz3D Beginners Area/what is : Write data into a memory bank

Santiworld(Posted 2016) [#1]
Hi!, this is a another simply question i have.

i never use the functions like createbank, pokebyte, pokeint, etc etc.

my question is, what is the correct use for place data in memory. maibe can give me a simple example.


in the help description says :

The bank commands allow you to perform high-speed data operations on a block of memory. This is useful for writing your own compression/decompression routines, passing and receiving data to and from a DLL and more. Banks start at 0 and finish at size-1.



as I mentioned in another post, I do not know much about DLL.
I do not know if Createbank is useful for use in a video game.

I usually when I do keep a lot of information in files, but is a bit slow writing or reading when thousands of data .

as always, thanks for patience people like me who have little understanding of these things! :)


_PJ_(Posted 2016) [#2]
It is basically just reading and writing data stored in memory as a collection of bytes rather than, say, individual variables or defined data types.
The adavnatages of using memory banks then are the speed (much faster than disk), no need to pre-allocate or reserve the memory space when it's not in use (i.e. as you would need if using global variables or custom types etc.)
The disadvantage may be taht of course, you would need a more coherent organisation for storing and retrieving specific information from within the databank.


Santiworld(Posted 2016) [#3]
Thanks _PJ_!