• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Huge amount of "points" with speed, density, position...

Sawyer

Member
Ladies and gentlmen,

I am trying to test the maximum capacity of game maker (for fun).
And i started a project.
I want to create a lots of points on a "grid", these points will interacts between them.
For exemple if A touch B create C
If C touch A or B destroy C and A or B....

For now i just create something basic with arrays (arrays because they are faster than a ds_grid)

In a create event i just create a grid with array, and i enum the points.
GML:
enum element {
   empty, A, B, C, D,
};

for(var yy = h; yy > 0; yy--) {
    for(var xx = 0; xx < w; xx++) {
        array[xx][yy] = element.empty;
}}
Then in the step event i just have someting really basic like that for the points interaction
Code:
case element.A:

    if array[xx][yy+1] || array[xx][yy-1] || array[xx+1][yy] || array[xx-1][yy] = element.B {
        do things.....
    }

break;
This system is simple and efficient for basics things like sand falling.....
But now i want to develop my idea.

I want give a point more informations than just element.A or element.B.

I want to give a point informations like active or not, updated this frame or not, density, speed.....
But how can i do it, and how can i do it to be fast?

Maybe struct, 3d arrays i read many things but i'm a bit lost, can you help me?
 
Top