CommitLog |

This commit is contained in:
SilicaAndPina 2020-07-23 12:38:08 +12:00
parent a5d1b47015
commit e74edd8841
7 changed files with 61 additions and 28 deletions

View file

@ -13,32 +13,21 @@ startx = startx - (startx % 32);
starty = starty - (starty % 32);
for(var xx = startx; xx < xmax;xx+=32)
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 <= generated_count; i++)
{
if(obj_controller_world_gen.generated_areas[i] == expe)
if(!place_free(xx,yy))
{
instance_create(xx,yy,obj_air);
if(random_range(0,10) > 5)
{
should_continue = true;
break;
instance_create(xx,yy,obj_asteriod);
}
}
if(should_continue)
{
continue;
}
generated_areas[generated_count] = expe;
generated_count ++;
if(random_range(0,10) > 5)
{
instance_create(xx,yy,obj_asteriod);
}
}
}