diff --git a/backgounds/nebula_-_6044 (360p).ogv b/backgounds/nebula_-_6044 (360p).ogv new file mode 100644 index 0000000..8b510dd Binary files /dev/null and b/backgounds/nebula_-_6044 (360p).ogv differ diff --git a/exit.gd b/exit.gd new file mode 100644 index 0000000..5d350ab --- /dev/null +++ b/exit.gd @@ -0,0 +1,16 @@ +extends Label + +var frequency = 5 +var amplitude = 550 +var time = 0 +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + #pass + time += delta + var movement = -cos(time*frequency)*amplitude + position.x+=movement * delta diff --git a/levels/antenna.gd b/levels/antenna.gd index 89f5e84..f263c70 100644 --- a/levels/antenna.gd +++ b/levels/antenna.gd @@ -21,13 +21,13 @@ func _process(delta): #var mousepos = get_viewport().get_mouse_position() - origmpos self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5)) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta origpos = self.position diff --git a/levels/ast1.gd b/levels/ast1.gd index 785f795..0b19f47 100644 --- a/levels/ast1.gd +++ b/levels/ast1.gd @@ -27,13 +27,13 @@ func _process(delta): Global.mousepos = get_viewport().get_mouse_position() - Global.origmpos self.position = Vector2(origpos.x+Global.mousepos.x, origpos.y+Global.mousepos.y) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -10000 * xm * delta)-Vector2.UP.rotated(rotation) * -10000 * ym * delta origpos = self.position diff --git a/levels/ast2.gd b/levels/ast2.gd index 42be782..b07b863 100644 --- a/levels/ast2.gd +++ b/levels/ast2.gd @@ -21,13 +21,13 @@ func _process(delta): #var mousepos = get_viewport().get_mouse_position() - origmpos self.position = Vector2(origpos.x+(Global.mousepos.x*2), origpos.y+(Global.mousepos.y*2)) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -20000 * xm * delta)-Vector2.UP.rotated(rotation) * -20000 * ym * delta origpos = self.position diff --git a/levels/ast3.gd b/levels/ast3.gd index 2700234..6ba75ff 100644 --- a/levels/ast3.gd +++ b/levels/ast3.gd @@ -21,13 +21,13 @@ func _process(delta): #var mousepos = get_viewport().get_mouse_position() - origmpos self.position = Vector2(origpos.x+(Global.mousepos.x*3), origpos.y+(Global.mousepos.y*3)) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -30000 * xm * delta)-Vector2.UP.rotated(rotation) * -30000 * ym * delta origpos = self.position diff --git a/levels/css1.gd b/levels/css1.gd index c44e63a..7c31f43 100644 --- a/levels/css1.gd +++ b/levels/css1.gd @@ -21,13 +21,13 @@ func _process(delta): #var mousepos = get_viewport().get_mouse_position() - origmpos self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5)) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta origpos = self.position diff --git a/levels/wall1.gd b/levels/wall1.gd index c49f000..85cf3a2 100644 --- a/levels/wall1.gd +++ b/levels/wall1.gd @@ -21,13 +21,13 @@ func _process(delta): #var mousepos = get_viewport().get_mouse_position() - origmpos self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5)) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta origpos = self.position diff --git a/levels/wall2.gd b/levels/wall2.gd index 9f3b2c7..2fe9764 100644 --- a/levels/wall2.gd +++ b/levels/wall2.gd @@ -21,13 +21,13 @@ func _process(delta): #var mousepos = get_viewport().get_mouse_position() - origmpos self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5)) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta origpos = self.position diff --git a/levels/wall3.gd b/levels/wall3.gd index 695a69b..f71d673 100644 --- a/levels/wall3.gd +++ b/levels/wall3.gd @@ -21,13 +21,13 @@ func _process(delta): #var mousepos = get_viewport().get_mouse_position() - origmpos self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5)) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta origpos = self.position diff --git a/levels/wall4.gd b/levels/wall4.gd index 3038574..ce8a438 100644 --- a/levels/wall4.gd +++ b/levels/wall4.gd @@ -21,13 +21,13 @@ func _process(delta): #var mousepos = get_viewport().get_mouse_position() - origmpos self.position = Vector2(origpos.x+(Global.mousepos.x*5), origpos.y+(Global.mousepos.y*5)) else: - if Input.is_action_pressed("ui_left"): + if Input.is_action_pressed("ui_left") || Input.is_key_pressed(KEY_A): xm = -1 - if Input.is_action_pressed("ui_right"): + if Input.is_action_pressed("ui_right") || Input.is_key_pressed(KEY_D): xm = 1 - if Input.is_action_pressed("ui_up"): + if Input.is_action_pressed("ui_up") || Input.is_key_pressed(KEY_W): ym = -1 - if Input.is_action_pressed("ui_down"): + if Input.is_action_pressed("ui_down") || Input.is_key_pressed(KEY_S): ym = 1 velocity = (Vector2.RIGHT.rotated(rotation) * -50000 * xm * delta)-Vector2.UP.rotated(rotation) * -50000 * ym * delta origpos = self.position diff --git a/nebula.gd b/nebula.gd new file mode 100644 index 0000000..c1d331a --- /dev/null +++ b/nebula.gd @@ -0,0 +1,16 @@ +extends VideoStreamPlayer + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _on_finished(): + play() + #pass # Replace with function body. diff --git a/start.gd b/start.gd new file mode 100644 index 0000000..a4f33f4 --- /dev/null +++ b/start.gd @@ -0,0 +1,16 @@ +extends Label + +var frequency = 5 +var amplitude = 550 +var time = 0 +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + #pass + time += delta + var movement = cos(time*frequency)*amplitude + position.x+=movement * delta diff --git a/title.tscn b/title.tscn index 4687c69..383d1ad 100644 --- a/title.tscn +++ b/title.tscn @@ -1,8 +1,12 @@ -[gd_scene load_steps=4 format=3 uid="uid://p010jtursgo2"] +[gd_scene load_steps=8 format=3 uid="uid://p010jtursgo2"] [ext_resource type="Script" path="res://title.gd" id="1_fbo7u"] [ext_resource type="Script" path="res://Game name.gd" id="2_bbb0f"] +[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (360p).ogv" id="2_bhkux"] +[ext_resource type="Script" path="res://nebula.gd" id="3_bn1r3"] [ext_resource type="Script" path="res://fps.gd" id="3_tsoef"] +[ext_resource type="Script" path="res://start.gd" id="4_cc41w"] +[ext_resource type="Script" path="res://exit.gd" id="5_scoec"] [node name="title" type="Control"] layout_mode = 3 @@ -13,6 +17,21 @@ grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_fbo7u") +[node name="nebula" type="VideoStreamPlayer" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 40.0 +scale = Vector2(2, 1.96) +stream = ExtResource("2_bhkux") +autoplay = true +script = ExtResource("3_bn1r3") + +[node name="fps" type="Label" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 23.0 +script = ExtResource("3_tsoef") + [node name="Game name" type="Label" parent="."] layout_mode = 0 offset_left = 108.0 @@ -23,7 +42,24 @@ scale = Vector2(6.38131, 6.11486) text = "The Red Robot Radio" script = ExtResource("2_bbb0f") -[node name="fps" type="Label" parent="."] -offset_right = 40.0 -offset_bottom = 23.0 -script = ExtResource("3_tsoef") +[node name="start" type="Label" parent="."] +layout_mode = 0 +offset_left = 131.0 +offset_top = 92.0 +offset_right = 501.0 +offset_bottom = 118.0 +scale = Vector2(2.61468, 1.57466) +text = "Click anywhere or press any face button to start" +script = ExtResource("4_cc41w") + +[node name="exit" type="Label" parent="."] +layout_mode = 0 +offset_left = 165.0 +offset_top = 602.0 +offset_right = 535.0 +offset_bottom = 628.0 +scale = Vector2(2.61468, 1.57466) +text = "Press escape or any shoulder button to exit" +script = ExtResource("5_scoec") + +[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]