Maarten Baert's website

Game Maker / C++ projects

Home Model Creator ExtremePhysics Game Maker DLLs SimpleScreenRecorder AlterPCB Quadcopters   Recent comments Search

Last modified: Mon, 29 Oct 2012
Refresh

ds_bin


What is ds_bin?

This DLL adds a new data structure to Game Maker. A ds_bin looks a bit like a grid, but there are some differences:
- 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

Download ds_bin - ZIP (200kb) (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

Source code is included too, but keep in mind that this is a really old project and the source is very messy. Do not use this as an example :).

Image: ds_bin-example.png

A screenshot of the Langton's Ant simulation

Good luck!


Comments

There are no comments yet.

Write a comment