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.
Then in the step event i just have someting really basic like that for the points interaction
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?
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;
}}
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;
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?