- A ds_bin can use up to 3 dimensions.
- A ds_bin contains only unsigned integers.
- You can choose the number of bits for each entry. Because of this a ds_bin uses almost no memory, this means you can use huge grids (for example 1000x1000) without running out of memory. You can use it as an alternative for surfaces, for example. For comparison: a ds_grid uses 10 bytes per cell!
There are functions for almost everything. For example, you can:
- add/subtract/multiply/divide two ds_bins
- change values of ds_bin A if the corresponding value of ds_bin B is equal/not equal/smaller/larger/... than the corresponding value of ds_bin C
- use a 'weighted' random function to select random cells (cells with a higher value will be selected more often, cells with a value of zero will never be selected)
The DLL contains 129 functions. I just added anything I could think of. If you need more functions, PM me.
Download: DS_bin - ZIP (190kb) (the compressed DLL is only 16kb, most of the file size is used by the examples)
The zip file contains the dll, a script file, an extension, and a few examples (gmk):
- Langton's Ant simulation, using both ds_bin and surfaces for comparison
- Conway's game of life
- Maze generator
A screenshot of the Langton's Ant simulation
Edited by Maarten Baert, 29 October 2012 - 12:50 AM.