This repository has been archived on 2025-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
spaceinator/scripts/generate_world.gml
2020-07-23 12:01:43 +12:00

31 lines
745 B
Text

for(var xx = startx; xx < xmax;xx+=32)
{
for(var yy = starty; yy < ymax;yy+=32)
{
var expe = string(xx)+string(yy)
var should_continue = false;
for(var i = 0; i <= count; i++)
{
if(obj_controller_world_gen.generated_areas[i] == expe)
{
should_continue = true;
break;
}
}
if(should_continue)
{
continue;
}
obj_controller_world_gen.generated_areas[obj_controller_world_gen.generated_count] = expe;
obj_controller_world_gen.generated_count ++;
if(random_range(0,10) > 5)
{
instance_create(xx,yy,obj_asteriod);
}
}
}