diff --git a/Bad.gd b/Bad.gd index a9c859a..5d7ab59 100644 --- a/Bad.gd +++ b/Bad.gd @@ -25,6 +25,7 @@ var screensize var health_multi = 1 var kill_reward = 0 +var boss = false var health = 1 var starting_health = 1 var hit_timer = 1000 @@ -55,5 +56,4 @@ func _process(delta): if velocity.length() > 0: velocity = velocity.normalized() * speed - position += velocity * delta - prints(health) \ No newline at end of file + position += velocity * delta \ No newline at end of file diff --git a/Bad1.gd b/Bad1.gd index 8ec409d..1d293d7 100644 --- a/Bad1.gd +++ b/Bad1.gd @@ -25,6 +25,7 @@ export (PackedScene) var Laser var screensize var health_multi = 1 +var boss = false var health = 50 var hit_timer = 1000 diff --git a/BadLaser.gd b/BadLaser.gd index 90376d9..7c65800 100644 --- a/BadLaser.gd +++ b/BadLaser.gd @@ -28,7 +28,7 @@ var health = 400 var hit_timer = 1000 var can_shoot = true var health_multi = 1 - +var boss = false func _on_Visibility_screen_exited(): prints("bye-bye, bad bad") queue_free() diff --git a/BlackHole.gd b/BlackHole.gd index 87badde..6e1c46d 100644 --- a/BlackHole.gd +++ b/BlackHole.gd @@ -6,12 +6,14 @@ extends "res://Bad.gd" var rot_speed = 1 +signal flash + func _ready(): - starting_health = 5000 + starting_health = 20000 health = starting_health speed = 10 - position.x = 700 - position.y = 300 + kill_reward = 1000 + boss = true var splitting = false @@ -47,5 +49,12 @@ func _process(delta): $BotHalf.position.y += delta*500 $BotHalf.position.x += delta*250 + if $TopHalf.position.y < -2000: + $Music.volume_db -= delta*50 + + if $TopHalf.position.y < -4000: + emit_signal("dead", kill_reward) + queue_free() + $TopHalf.rotation += delta $BotHalf.rotation -= delta \ No newline at end of file diff --git a/BlackHole.tscn b/BlackHole.tscn index 6061571..28f4b09 100644 --- a/BlackHole.tscn +++ b/BlackHole.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=17 format=2] [ext_resource path="res://Bad.tscn" type="PackedScene" id=1] [ext_resource path="res://BlackHole.gd" type="Script" id=2] @@ -11,13 +11,14 @@ [ext_resource path="res://art/bad/BlackHole/base_6.png" type="Texture" id=9] [ext_resource path="res://art/bad/BlackHole/half2.png" type="Texture" id=10] [ext_resource path="res://art/bad/BlackHole/half1.png" type="Texture" id=11] +[ext_resource path="res://late_stage_boss.ogg" type="AudioStream" id=12] -[sub_resource type="CircleShape2D" id=2] +[sub_resource type="CircleShape2D" id=1] custom_solver_bias = 0.0 radius = 904.987 -[sub_resource type="SpriteFrames" id=1] +[sub_resource type="SpriteFrames" id=2] animations = [ { "frames": [ ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ) ], @@ -44,19 +45,20 @@ animations = [ { "speed": 5.0 } ] -[node name="BlackHole" index="0" instance=ExtResource( 1 )] +[node name="BlackHole" instance=ExtResource( 1 )] +position = Vector2( 1302.7, 306.846 ) scale = Vector2( 0.3, 0.3 ) script = ExtResource( 2 ) _sections_unfolded = [ "Collision", "Transform" ] [node name="CollisionBox" parent="." index="0"] -shape = SubResource( 2 ) +shape = SubResource( 1 ) [node name="MainSprite" parent="." index="2"] -frames = SubResource( 1 ) +frames = SubResource( 2 ) [node name="TopHalf" type="AnimatedSprite" parent="." index="3"] @@ -70,4 +72,12 @@ visible = false frames = SubResource( 4 ) animation = "default" +[node name="Music" type="AudioStreamPlayer" parent="." index="5"] + +stream = ExtResource( 12 ) +volume_db = 0.0 +autoplay = true +mix_target = 0 +bus = "Master" + diff --git a/Bloob.gd b/Bloob.gd index 0e14187..6ad331b 100644 --- a/Bloob.gd +++ b/Bloob.gd @@ -24,9 +24,7 @@ export (int) var SPEED var screensize var health_multi = 1 -# class member variables go here, for example: -# var a = 2 -# var b = "textvar" +var boss = false var health = 150 var hit_timer = 1000 diff --git a/Image Sources/SettingsMenu.xcf b/Image Sources/SettingsMenu.xcf new file mode 100644 index 0000000..69e77e5 Binary files /dev/null and b/Image Sources/SettingsMenu.xcf differ diff --git a/Laser.gd b/Laser.gd index 740c1d5..6894ced 100644 --- a/Laser.gd +++ b/Laser.gd @@ -29,6 +29,7 @@ var plasma = false var current_pen = 0 var friendly_laser = true var damage = DEFAULT_DAMAGE +var boss = false func _ready(): $AnimatedSprite.play() diff --git a/Laser.tscn b/Laser.tscn index e89973e..67a95e9 100644 --- a/Laser.tscn +++ b/Laser.tscn @@ -19,7 +19,7 @@ animations = [ { "speed": 20.0 } ] -[node name="Laser" type="Area2D"] +[node name="Laser" type="Area2D" index="0"] input_pickable = true gravity_vec = Vector2( 0, 1 ) diff --git a/Main.gd b/Main.gd index e8dd429..4685f15 100644 --- a/Main.gd +++ b/Main.gd @@ -48,6 +48,8 @@ func _ready(): # Prepare black rectangle for fading in $ColorRect.visible = true + randomize() + if OS.has_touchscreen_ui_hint(): $HowTo.visible = true else: @@ -139,7 +141,7 @@ var sendblob = 1 var bad_health_multi = 1.5 var total_bads_spawned = 0 func BaddieTimer(): - if total_bads_spawned == 5: # 75 default + if total_bads_spawned%6 == 0: # 75 default if get_tree().is_network_server(): total_bads_spawned += 1 rpc("bossMode") @@ -282,8 +284,11 @@ sync func bossMode(): func _launch_boss(): prints("_launch_boss()") var bad - #bad = RectangleBoss.instance() - bad = BlackHole.instance() + var which_boss = randi()%2 + if which_boss == 0: + bad = RectangleBoss.instance() + elif which_boss == 1: + bad = BlackHole.instance() add_child(bad) # Flash screen when signalled diff --git a/Mothership.gd b/Mothership.gd index dbaaf7f..f4570ae 100644 --- a/Mothership.gd +++ b/Mothership.gd @@ -53,7 +53,11 @@ func _on_Mothership_area_shape_entered(area_id, area, area_shape, self_shape): if get_tree().is_network_server(): health -= 50 rset("slave_health", health) - + + if area.boss: + emit_signal("flash") + health = 0 + _update_health_bar() if health <= 250: diff --git a/Player.gd b/Player.gd index ec67e47..f3ef1a8 100644 --- a/Player.gd +++ b/Player.gd @@ -78,7 +78,7 @@ const LASER_DAMAGE_TIER5_COST = 2000 const STARTING_POSITION = Vector2(130, 250) # the amount of money the player starts with -const STARTING_MONEY = 100 +const STARTING_MONEY = 10000 ################################# diff --git a/RectangleBoss.tscn b/RectangleBoss.tscn index 0ba7ddc..39e3f3f 100644 --- a/RectangleBoss.tscn +++ b/RectangleBoss.tscn @@ -51,7 +51,7 @@ animations = [ { custom_solver_bias = 0.0 extents = Vector2( 404.313, 217.774 ) -[node name="RectangleBoss" type="Area2D" index="0"] +[node name="RectangleBoss" type="Area2D"] position = Vector2( 336.401, -1.22772 ) scale = Vector2( 0.25, 0.25 ) diff --git a/TODO b/TODO index 595141b..a6b824d 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ +* Get the game on F-Droid * More enemy variety * A way of increasing difficulty without it suddenly becoming impossible * Mothership art @@ -5,4 +6,5 @@ * The main menu stars could do something silly and fun, like change colors, maybe taking the menu colors with them. * Purchasable Mothership upgrades (like turrets), and make all upgrades exponentially more expensive for higher tiers +* Sounds effects for upgrades * etc., etc. diff --git a/late_stage_boss.ogg b/late_stage_boss.ogg new file mode 100644 index 0000000..f17868e Binary files /dev/null and b/late_stage_boss.ogg differ