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

@ -16,6 +16,7 @@
<sprite>sprites\spr_enemy</sprite>
<sprite>sprites\spr_asteroid</sprite>
<sprite>sprites\spr_boom</sprite>
<sprite>sprites\spr_empty</sprite>
</sprites>
<backgrounds name="background">
<background>background\bg_space</background>
@ -30,6 +31,7 @@
<object>objects\obj_controller</object>
<object>objects\obj_bullet</object>
<object>objects\obj_asteriod</object>
<object>objects\obj_air</object>
</objects>
<rooms name="rooms">
<room>rooms\rm_game</room>

View File

@ -0,0 +1,23 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>spr_empty</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<persistent>0</persistent>
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events/>
<PhysicsObject>0</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>0</PhysicsObjectShape>
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
<PhysicsObjectGroup>0</PhysicsObjectGroup>
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
<PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
<PhysicsObjectKinematic>0</PhysicsObjectKinematic>
<PhysicsShapePoints/>
</object>

View File

@ -27,12 +27,10 @@
<kind>1</kind>
<string>image_speed = 0;
image_index = random_range(0,1);
var angle = random_range(0,180);
angle = random_range(0,180);
direction = angle;
image_angle = angle;
speed = 1;
</string>
</argument>
</arguments>

View File

@ -25,11 +25,7 @@
<arguments>
<argument>
<kind>1</kind>
<string>generated_count = 0;
generated_areas[10000] = 0;
</string>
<string></string>
</argument>
</arguments>
</action>

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);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

View File

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>0</xorig>
<yorigin>0</yorigin>
<colkind>0</colkind>
<coltolerance>0</coltolerance>
<sepmasks>-1</sepmasks>
<bboxmode>1</bboxmode>
<bbox_left>0</bbox_left>
<bbox_right>31</bbox_right>
<bbox_top>0</bbox_top>
<bbox_bottom>31</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>32</width>
<height>32</height>
<frames>
<frame index="0">images\spr_empty_0.png</frame>
</frames>
</sprite>