From e064f6d5710ab2767c046d8d2ad698e3730de8e1 Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Sat, 25 Jul 2020 18:20:00 +1200 Subject: [PATCH] CommitLog | --- Spaceinator.project.gmx | 7 ++- objects/obj_asteriod.object.gmx | 8 ++-- objects/obj_black_hole.object.gmx | 71 +++++++++++++++++++++++++++++++ objects/obj_chunk.object.gmx | 14 +++++- objects/obj_player.object.gmx | 24 +++++++++++ objects/obj_respawn.object.gmx | 3 ++ sprites/spr_blackhole.sprite.gmx | 4 +- 7 files changed, 123 insertions(+), 8 deletions(-) create mode 100644 objects/obj_black_hole.object.gmx diff --git a/Spaceinator.project.gmx b/Spaceinator.project.gmx index 109e26c..146105d 100644 --- a/Spaceinator.project.gmx +++ b/Spaceinator.project.gmx @@ -32,14 +32,17 @@ + + objects\obj_asteriod + objects\obj_chunk_item + objects\obj_black_hole + objects\obj_player objects\obj_controller_world_gen objects\obj_controller objects\obj_bullet - objects\obj_asteriod objects\obj_chunk objects\obj_boom_fx - objects\obj_chunk_item objects\obj_button objects\obj_respawn diff --git a/objects/obj_asteriod.object.gmx b/objects/obj_asteriod.object.gmx index 8e18131..a2c945b 100644 --- a/objects/obj_asteriod.object.gmx +++ b/objects/obj_asteriod.object.gmx @@ -25,12 +25,13 @@ 1 - image_speed = 0; + /// Init +image_speed = 0; image_index = random_range(0,2); angle = random_range(0,180); direction = angle; image_angle = angle; -//speed = 1; + @@ -53,7 +54,8 @@ image_angle = angle; 1 - if(speed > 0) + /// Slow down if too fast +if(speed > 0) { speed -= 1 } diff --git a/objects/obj_black_hole.object.gmx b/objects/obj_black_hole.object.gmx new file mode 100644 index 0000000..df8792d --- /dev/null +++ b/objects/obj_black_hole.object.gmx @@ -0,0 +1,71 @@ + + + spr_blackhole + 0 + -1 + 0 + 0 + obj_chunk_item + <undefined> + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + image_speed = 0; + + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + image_angle += 1; + + + + + + + 0 + 0 + 0 + 0.5 + 0.100000001490116 + 0 + 0.100000001490116 + 0.100000001490116 + 0.200000002980232 + -1 + 0 + + diff --git a/objects/obj_chunk.object.gmx b/objects/obj_chunk.object.gmx index 7317d8c..3777f47 100644 --- a/objects/obj_chunk.object.gmx +++ b/objects/obj_chunk.object.gmx @@ -34,12 +34,24 @@ for(var xx = 0; xx < CHUNK_SIZE*TILE_SIZE; xx+= TILE_SIZE) { for(var yy = 0; yy < CHUNK_SIZE*TILE_SIZE; yy+= TILE_SIZE) { - if(random_range(0,100) < 1) + var rnd = random_range(0,500); + + show_debug_message("Generation: "+string(rnd)) + if(rnd < 100 > 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 < 1) { var inst = instance_create(x+xx,y+yy, obj_asteriod); inst.CHUNK_CONTAINED = self.id; ds_list_add(instance_list, inst); + continue; } } } diff --git a/objects/obj_player.object.gmx b/objects/obj_player.object.gmx index 3b1d240..11dd3c9 100644 --- a/objects/obj_player.object.gmx +++ b/objects/obj_player.object.gmx @@ -253,6 +253,30 @@ image_angle -= 5; } image_angle += 5; + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + /// Release keys. +event_perform(ev_keyrelease,ord('W')); diff --git a/objects/obj_respawn.object.gmx b/objects/obj_respawn.object.gmx index 1d8ab23..c0fb3f4 100644 --- a/objects/obj_respawn.object.gmx +++ b/objects/obj_respawn.object.gmx @@ -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); diff --git a/sprites/spr_blackhole.sprite.gmx b/sprites/spr_blackhole.sprite.gmx index 9c10222..01615bd 100644 --- a/sprites/spr_blackhole.sprite.gmx +++ b/sprites/spr_blackhole.sprite.gmx @@ -1,8 +1,8 @@ 0 - 0 - 0 + 16 + 16 1 0 0