CommitLog |

This commit is contained in:
SilicaAndPina 2020-07-25 18:20:00 +12:00
parent bc21fc5141
commit e064f6d571
7 changed files with 123 additions and 8 deletions

View File

@ -32,14 +32,17 @@
<script>scripts\save_game_data.gml</script>
</scripts>
<objects name="objects">
<objects name="natural generation">
<object>objects\obj_asteriod</object>
<object>objects\obj_chunk_item</object>
<object>objects\obj_black_hole</object>
</objects>
<object>objects\obj_player</object>
<object>objects\obj_controller_world_gen</object>
<object>objects\obj_controller</object>
<object>objects\obj_bullet</object>
<object>objects\obj_asteriod</object>
<object>objects\obj_chunk</object>
<object>objects\obj_boom_fx</object>
<object>objects\obj_chunk_item</object>
<objects name="menus">
<object>objects\obj_button</object>
<object>objects\obj_respawn</object>

View File

@ -25,12 +25,13 @@
<arguments>
<argument>
<kind>1</kind>
<string>image_speed = 0;
<string>/// Init
image_speed = 0;
image_index = random_range(0,2);
angle = random_range(0,180);
direction = angle;
image_angle = angle;
//speed = 1;
</string>
</argument>
</arguments>
@ -53,7 +54,8 @@ image_angle = angle;
<arguments>
<argument>
<kind>1</kind>
<string>if(speed &gt; 0)
<string>/// Slow down if too fast
if(speed &gt; 0)
{
speed -= 1
}

View File

@ -0,0 +1,71 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>spr_blackhole</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<persistent>0</persistent>
<parentName>obj_chunk_item</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events>
<event eventtype="0" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>image_speed = 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="3" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>image_angle += 1;
</string>
</argument>
</arguments>
</action>
</event>
</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

@ -34,12 +34,24 @@ for(var xx = 0; xx &lt; CHUNK_SIZE*TILE_SIZE; xx+= TILE_SIZE)
{
for(var yy = 0; yy &lt; CHUNK_SIZE*TILE_SIZE; yy+= TILE_SIZE)
{
if(random_range(0,100) &lt; 1)
var rnd = random_range(0,500);
show_debug_message("Generation: "+string(rnd))
if(rnd &lt; 100 &gt; 200)
{
var inst = instance_create(x+xx,y+yy, obj_black_hole);
inst.CHUNK_CONTAINED = self.id;
ds_list_add(instance_list, inst);
continue;
}
if(rnd % 100 &lt; 1)
{
var inst = instance_create(x+xx,y+yy, obj_asteriod);
inst.CHUNK_CONTAINED = self.id;
ds_list_add(instance_list, inst);
continue;
}
}
}

View File

@ -253,6 +253,30 @@ image_angle -= 5;
}
image_angle += 5;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="5" enumb="0">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>/// Release keys.
event_perform(ev_keyrelease,ord('W'));
</string>
</argument>
</arguments>

View File

@ -62,6 +62,9 @@ obj_player.dead = false;
obj_player.visible = true;
obj_player.image_speed = 0;
obj_player.sprite_index = spr_player;
obj_player.is_moving = false;
obj_player.image_index = 0;
obj_controller.visible = true;
instance_destroy(obj_gameover_overlay);

View File

@ -1,8 +1,8 @@
<!--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>
<xorig>16</xorig>
<yorigin>16</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>