diff --git a/graphics/enemy/stg_bullet.png b/graphics/enemy/stg_bullet.png new file mode 100644 index 0000000..0d77065 Binary files /dev/null and b/graphics/enemy/stg_bullet.png differ diff --git a/graphics/enemy/stg_bullet.png.import b/graphics/enemy/stg_bullet.png.import new file mode 100644 index 0000000..d230970 --- /dev/null +++ b/graphics/enemy/stg_bullet.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/stg_bullet.png-3ab70a711eb012e51f77e11932f8bd02.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/enemy/stg_bullet.png" +dest_files=[ "res://.import/stg_bullet.png-3ab70a711eb012e51f77e11932f8bd02.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/maps/boss/2600.gd b/maps/boss/2600.gd new file mode 100644 index 0000000..497f875 --- /dev/null +++ b/maps/boss/2600.gd @@ -0,0 +1,16 @@ +extends Node2D + +onready var Bullet = preload("res://objects/enemy/2600_bullet.tscn") +onready var positions = $Positions +export var shot_speed = 50 +export var fire_rate: float = 1 +onready var shoot_timer = $ShootTimer + +func _on_ShootTimer_timeout(): + for pos in positions.get_children(): + var bullet = Bullet.instance() + bullet.global_position = pos.global_position + bullet.direction = Vector2.LEFT.rotated(pos.rotation) + bullet.speed = shot_speed + get_parent().add_child(bullet) + shoot_timer.wait_time = fire_rate diff --git a/maps/boss/boss2_arena.tscn b/maps/boss/boss2_arena.tscn new file mode 100644 index 0000000..865c20d --- /dev/null +++ b/maps/boss/boss2_arena.tscn @@ -0,0 +1,251 @@ +[gd_scene load_steps=16 format=2] + +[ext_resource path="res://tilesets/t_factory.tres" type="TileSet" id=1] +[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=2] +[ext_resource path="res://objects/environment/falling_block/falling_block_graveyard.tscn" type="PackedScene" id=3] +[ext_resource path="res://graphics/backgrounds/factory.png" type="Texture" id=4] +[ext_resource path="res://maps/map.gd" type="Script" id=5] +[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=6] +[ext_resource path="res://objects/environment/moving_platform/moving_platform.tscn" type="PackedScene" id=7] +[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=8] +[ext_resource path="res://objects/environment/turniwood/turning_platform.tscn" type="PackedScene" id=9] +[ext_resource path="res://objects/environment/ladder/ladder.tscn" type="PackedScene" id=10] +[ext_resource path="res://objects/enemy/robosnake.tscn" type="PackedScene" id=11] +[ext_resource path="res://objects/delayed_instance.tscn" type="PackedScene" id=12] +[ext_resource path="res://objects/environment/death tile/death_tile.tscn" type="PackedScene" id=13] +[ext_resource path="res://tilesets/t_ladders.tres" type="TileSet" id=14] +[ext_resource path="res://maps/boss/2600.gd" type="Script" id=16] + +[node name="Map" type="Node2D" groups=["map"]] +pause_mode = 1 +script = ExtResource( 5 ) + +[node name="HUD" parent="." instance=ExtResource( 6 )] +song_name = "♫Klystron" + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( 128, 96 ) +z_index = -2 +texture = ExtResource( 4 ) +__meta__ = { +"_edit_lock_": true +} + +[node name="Ground" type="Node2D" parent="."] + +[node name="TileMap" type="TileMap" parent="Ground"] +tile_set = ExtResource( 1 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 458763, 0, 131074, 458764, 0, 131074, 458765, 0, 131074, 458766, 0, 131074, 524298, 0, 131074, 524299, 0, 131074, 524300, 0, 131074, 524301, 0, 131074, 524302, 0, 131074, 589830, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589839, 0, 131074, 589840, 0, 131074, 655376, 0, 131074, 720909, 0, 131074, 720910, 0, 131074, 720911, 0, 131074, 720912, 0, 131074, 786447, 0, 131074, 851971, 0, 0, 917504, 0, 0, 917510, 0, 0, 917511, 0, 0, 917512, 0, 0, 917513, 0, 0, 917514, 0, 0, 917515, 0, 0, 917516, 0, 0, 917517, 0, 0, 1048577, 0, 0, 1048578, 0, 0, 1048583, 0, 131074, 1114119, 0, 131074, 1114120, 0, 131074, 1179656, 0, 0, 1310734, 0, 0, 1310735, 0, 0, 1441792, 0, 1, 1441793, 0, 2, 1441794, 0, 2, 1441795, 0, 2, 1441796, 0, 2, 1441797, 0, 2, 1441798, 0, 2, 1441799, 0, 2, 1441800, 0, 2, 1441801, 0, 2, 1441802, 0, 2, 1441803, 0, 2, 1441804, 0, 2, 1441805, 0, 2, 1441806, 0, 2, 1441807, 0, 2, 1441808, 0, 2, 1441809, 0, 2, 1441810, 0, 2, 1441811, 0, 2, 1441812, 0, 2, 1441813, 0, 2, 1441814, 0, 2, 1441815, 0, 2, 1441816, 0, 2, 1441817, 0, 2, 1441818, 0, 2, 1441819, 0, 2, 1441820, 0, 2, 1441821, 0, 2, 1441822, 0, 2, 1441823, 0, 3, 1507328, 0, 65536, 1507329, 0, 0, 1507330, 0, 65536, 1507331, 0, 0, 1507332, 0, 65536, 1507333, 0, 0, 1507334, 0, 65536, 1507335, 0, 0, 1507336, 0, 65536, 1507337, 0, 0, 1507338, 0, 65536, 1507339, 0, 0, 1507340, 0, 65536, 1507341, 0, 0, 1507342, 0, 65536, 1507343, 0, 0, 1507344, 0, 65536, 1507345, 0, 0, 1507346, 0, 65536, 1507347, 0, 0, 1507348, 0, 65536, 1507349, 0, 0, 1507350, 0, 65536, 1507351, 0, 0, 1507352, 0, 65536, 1507353, 0, 0, 1507354, 0, 65536, 1507355, 0, 0, 1507356, 0, 65536, 1507357, 0, 0, 1507358, 0, 65536, 1507359, 0, 0 ) + +[node name="Ladder" type="TileMap" parent="Ground"] +tile_set = ExtResource( 14 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 655374, 0, 196609, 720910, 0, 196609, 786446, 0, 196609, 851982, 0, 196609, 917518, 0, 196609 ) + +[node name="FallingBlock" parent="Ground" instance=ExtResource( 3 )] +position = Vector2( 96, 152 ) + +[node name="FallingBlock3" parent="Ground" instance=ExtResource( 3 )] +position = Vector2( 72, 40 ) + +[node name="FallingBlock5" parent="Ground" instance=ExtResource( 3 )] +position = Vector2( 8, 56 ) + +[node name="FallingBlock6" parent="Ground" instance=ExtResource( 3 )] +position = Vector2( 16, 72 ) + +[node name="FallingBlock7" parent="Ground" instance=ExtResource( 3 )] +position = Vector2( 32, 40 ) + +[node name="MovingPlatform" parent="Ground" instance=ExtResource( 7 )] +position = Vector2( 40, 144 ) +scale = Vector2( 2, 1 ) +speed = 40 +left_up_boundary = 2.0 +right_down_boundary = 2.0 + +[node name="Player" parent="." instance=ExtResource( 2 )] +position = Vector2( 24, 176 ) +use_iframes = true + +[node name="TurningPlatform" parent="." instance=ExtResource( 9 )] +position = Vector2( 48, 216 ) + +[node name="Ladder2" parent="." instance=ExtResource( 10 )] +position = Vector2( 112, 80 ) +scale = Vector2( 1, 5 ) + +[node name="DelayedArrow" parent="." instance=ExtResource( 12 )] +delay = 5.0 +autostart = true + +[node name="Arrow" parent="DelayedArrow" instance=ExtResource( 8 )] +position = Vector2( 104, 32 ) + +[node name="DelayedArrow2" parent="." instance=ExtResource( 12 )] +delay = 5.0 + +[node name="Arrow2" parent="DelayedArrow2" instance=ExtResource( 8 )] +position = Vector2( 72, 168 ) + +[node name="DelayedArrow3" parent="." instance=ExtResource( 12 )] +delay = 5.0 + +[node name="Arrow3" parent="DelayedArrow3" instance=ExtResource( 8 )] +position = Vector2( 120, 32 ) + +[node name="DeathTile" parent="." instance=ExtResource( 13 )] +position = Vector2( 0, 192 ) +scale = Vector2( 32, 1 ) + +[node name="ExitTimer" type="Timer" parent="."] +wait_time = 5.0 +one_shot = true + +[node name="2600" type="Node2D" parent="."] +position = Vector2( 0, -16 ) +script = ExtResource( 16 ) +shot_speed = 70 +fire_rate = 0.8 + +[node name="Leg2" type="Node2D" parent="2600"] +position = Vector2( -23, 0 ) + +[node name="ColorRect2" type="ColorRect" parent="2600/Leg2"] +margin_left = 200.0 +margin_top = 80.0 +margin_right = 232.0 +margin_bottom = 112.0 +color = Color( 0.286275, 0.298039, 0.305882, 1 ) + +[node name="ColorRect3" type="ColorRect" parent="2600/Leg2"] +margin_left = 208.0 +margin_top = 104.0 +margin_right = 224.0 +margin_bottom = 152.0 +rect_rotation = -30.0 +color = Color( 0.286275, 0.298039, 0.305882, 1 ) + +[node name="ColorRect5" type="ColorRect" parent="2600/Leg2"] +margin_left = 232.0 +margin_top = 128.0 +margin_right = 248.0 +margin_bottom = 176.0 +rect_rotation = 30.0 +color = Color( 0.286275, 0.298039, 0.305882, 1 ) + +[node name="ColorRect4" type="ColorRect" parent="2600/Leg2"] +margin_left = 222.0 +margin_top = 125.0 +margin_right = 246.0 +margin_bottom = 149.0 +color = Color( 0.286275, 0.298039, 0.305882, 1 ) + +[node name="ColorRect6" type="ColorRect" parent="2600/Leg2"] +margin_left = 177.0 +margin_top = 168.0 +margin_right = 229.0 +margin_bottom = 192.0 +color = Color( 0.286275, 0.298039, 0.305882, 1 ) + +[node name="Head" type="ColorRect" parent="2600"] +margin_left = 152.0 +margin_top = 40.0 +margin_right = 240.0 +margin_bottom = 104.0 +color = Color( 0.505882, 0.537255, 0.54902, 1 ) + +[node name="ColorRect2" type="ColorRect" parent="2600/Head"] +margin_right = 57.0 +margin_bottom = 32.0 +color = Color( 0, 0.882353, 1, 1 ) + +[node name="Leg" type="Node2D" parent="2600"] + +[node name="ColorRect2" type="ColorRect" parent="2600/Leg"] +margin_left = 200.0 +margin_top = 80.0 +margin_right = 232.0 +margin_bottom = 112.0 +color = Color( 0.45098, 0.47451, 0.486275, 1 ) + +[node name="ColorRect3" type="ColorRect" parent="2600/Leg"] +margin_left = 208.0 +margin_top = 104.0 +margin_right = 224.0 +margin_bottom = 152.0 +rect_rotation = -30.0 +color = Color( 0.505882, 0.537255, 0.54902, 1 ) + +[node name="ColorRect5" type="ColorRect" parent="2600/Leg"] +margin_left = 232.0 +margin_top = 128.0 +margin_right = 248.0 +margin_bottom = 176.0 +rect_rotation = 30.0 +color = Color( 0.505882, 0.537255, 0.54902, 1 ) + +[node name="ColorRect4" type="ColorRect" parent="2600/Leg"] +margin_left = 222.0 +margin_top = 125.0 +margin_right = 246.0 +margin_bottom = 149.0 +color = Color( 0.45098, 0.47451, 0.486275, 1 ) + +[node name="ColorRect6" type="ColorRect" parent="2600/Leg"] +margin_left = 177.0 +margin_top = 168.0 +margin_right = 229.0 +margin_bottom = 192.0 +color = Color( 0.45098, 0.47451, 0.486275, 1 ) + +[node name="Positions" type="Node2D" parent="2600"] + +[node name="Position2D" type="Position2D" parent="2600/Positions"] +position = Vector2( 152, 80 ) + +[node name="Position2D2" type="Position2D" parent="2600/Positions"] +position = Vector2( 152, 88 ) +rotation = -0.436332 + +[node name="Position2D3" type="Position2D" parent="2600/Positions"] +position = Vector2( 152, 96 ) +rotation = -0.872665 + +[node name="ShootTimer" type="Timer" parent="2600"] +autostart = true + +[node name="Enemies" type="Node2D" parent="."] + +[node name="Snake" parent="Enemies" instance=ExtResource( 11 )] +position = Vector2( 112, 224 ) +left_up_boundary = 3.0 + +[node name="ColorRect" type="ColorRect" parent="."] +visible = false +margin_left = 155.0 +margin_top = 75.0 +margin_right = 163.0 +margin_bottom = 228.0 +rect_rotation = 45.0 + +[node name="ColorRect3" type="ColorRect" parent="."] +visible = false +margin_left = 152.0 +margin_top = 67.0 +margin_right = 160.0 +margin_bottom = 220.0 +rect_rotation = 70.0 + +[node name="ColorRect2" type="ColorRect" parent="."] +visible = false +margin_left = 8.0 +margin_top = 59.0 +margin_right = 152.0 +margin_bottom = 67.0 + +[connection signal="timeout" from="ExitTimer" to="." method="_on_ExitTimer_timeout"] +[connection signal="timeout" from="2600/ShootTimer" to="2600" method="_on_ShootTimer_timeout"] diff --git a/objects/enemy/2600_bullet.gd b/objects/enemy/2600_bullet.gd new file mode 100644 index 0000000..f282180 --- /dev/null +++ b/objects/enemy/2600_bullet.gd @@ -0,0 +1,7 @@ +extends "res://objects/enemy/enemy.gd" + +export var direction: Vector2 = Vector2.LEFT +export var speed: float = 50 + +func _physics_process(delta): + position += direction * speed * delta diff --git a/objects/enemy/2600_bullet.tscn b/objects/enemy/2600_bullet.tscn new file mode 100644 index 0000000..894e37f --- /dev/null +++ b/objects/enemy/2600_bullet.tscn @@ -0,0 +1,42 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://graphics/enemy/stg_bullet.png" type="Texture" id=1] +[ext_resource path="res://objects/enemy/2600_bullet.gd" type="Script" id=2] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 6, 6 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 6, 0, 6, 6 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 12, 0, 6, 6 ) + +[sub_resource type="SpriteFrames" id=4] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ) ], +"loop": true, +"name": "default", +"speed": 15.0 +} ] + +[sub_resource type="RectangleShape2D" id=5] +extents = Vector2( 3, 3 ) + +[node name="2600Bullet" type="Node2D"] +script = ExtResource( 2 ) + +[node name="AnimatedSprite" type="AnimatedSprite" parent="."] +frames = SubResource( 4 ) +frame = 1 +playing = true + +[node name="Hitbox" type="Area2D" parent="." groups=["arrow"]] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"] +shape = SubResource( 5 ) + +[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]