level select WIP

fuck metroidvania, back to room-based
This commit is contained in:
Harmony Monroe 2020-11-18 14:37:43 -05:00
parent 935db40a67
commit 2d3bebeb77
12 changed files with 63 additions and 8 deletions

View file

@ -10,6 +10,7 @@
[node name="Stage" type="Node2D"]
script = ExtResource( 1 )
stage_name = "1-1"
[node name="SolidTileMap" parent="." instance=ExtResource( 3 )]
tile_data = PoolIntArray( 65529, 0, 65538, 65530, 0, 65536, 65531, 0, 65538, 65532, 0, 0, 65533, 0, 0, 65534, 0, 65537, 65535, 0, 0, 0, 0, 0, 1, 0, 65538, 2, 0, 0, 3, 0, 65537, 4, 0, 0, 5, 0, 0, 6, 0, 196609 )

View file

@ -41,3 +41,6 @@ position = Vector2( -8, -8 )
[node name="Box" parent="Actors" instance=ExtResource( 1 )]
position = Vector2( -32, -8 )
hitbox_x = 8
hitbox_y = 8
gravity = 0.2

View file

@ -43,3 +43,6 @@ position = Vector2( -4, -8 )
[node name="Box" parent="Actors" instance=ExtResource( 1 )]
position = Vector2( -28, -8 )
hitbox_x = 8
hitbox_y = 8
gravity = 0.2

View file

@ -43,6 +43,12 @@ position = Vector2( -16, -8 )
[node name="Box" parent="Actors" instance=ExtResource( 1 )]
position = Vector2( -52, -8 )
hitbox_x = 8
hitbox_y = 8
gravity = 0.2
[node name="Box2" parent="Actors" instance=ExtResource( 1 )]
position = Vector2( -43, -8 )
hitbox_x = 8
hitbox_y = 8
gravity = 0.2

View file

@ -43,4 +43,6 @@ position = Vector2( -45, -8 )
[node name="Box" parent="Actors" instance=ExtResource( 1 )]
position = Vector2( -76, -8 )
hitbox_x = 8
hitbox_y = 8
gravity = 0.0

View file

@ -43,12 +43,18 @@ position = Vector2( -42, 8 )
[node name="Box" parent="Actors" instance=ExtResource( 1 )]
position = Vector2( 54, 8 )
hitbox_x = 8
hitbox_y = 8
gravity = 0.0
[node name="Box2" parent="Actors" instance=ExtResource( 1 )]
position = Vector2( 20, 0 )
hitbox_x = 8
hitbox_y = 8
gravity = 0.0
[node name="Box3" parent="Actors" instance=ExtResource( 1 )]
position = Vector2( -59, 8 )
hitbox_x = 8
hitbox_y = 8
gravity = 0.0

View file

@ -12,17 +12,18 @@
script = ExtResource( 8 )
[node name="SolidTileMap" parent="." instance=ExtResource( 4 )]
tile_data = PoolIntArray( 65529, 0, 65538, 65530, 0, 65536, 65531, 0, 65538, 65532, 0, 0, 65533, 0, 0, 65534, 0, 65537, 65535, 0, 0, 0, 0, 0, 1, 0, 65538, 2, 0, 0, 3, 0, 65537, 4, 0, 0, 5, 0, 0, 6, 0, 196609 )
tile_data = PoolIntArray( 65529, 0, 65538, 65530, 0, 65536, 65531, 0, 65538, 65532, 0, 0, 65533, 0, 0, 65534, 0, 65537, 65535, 0, 0, 0, 0, 0, 1, 0, 65538, 2, 0, 0, 3, 0, 65537, 4, 0, 0, 5, 0, 0, 6, 0, 196609, 7, 0, 0, 8, 0, 65538, 9, 0, 65536, 10, 0, 65538, 11, 0, 196609, 12, 0, 65538, 13, 0, 1, 18, 0, 65538, 19, 0, 65536, 20, 0, 1, 21, 0, 196608, 22, 0, 65538, 23, 0, 65536, 65549, 0, 131073, 65550, 0, 1, 65551, 0, 65536, 65552, 0, 65538, 65553, 0, 2, 65554, 0, 196609 )
[node name="SpikeTileMap" parent="." instance=ExtResource( 2 )]
z_as_relative = false
tile_data = PoolIntArray( 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0 )
[node name="DetailTileMap" parent="." instance=ExtResource( 6 )]
tile_data = PoolIntArray( -262145, 2, 0, -327680, 0, 0, -327679, -1610612734, 0, -196609, 0, 0, -262144, 0, 0, -262143, 0, 0, -131073, -1073741822, 0, -196608, 0, 0, -196607, 1610612738, 0, -131072, 1, 0, -7, 2, 0, -6, 0, 0, -5, -1610612734, 0, -65536, 1, 0, -65535, -1610612734, 0, 131070, 1, 0, 196606, 1610612736, 0 )
tile_data = PoolIntArray( -262145, 2, 0, -327680, 0, 0, -327679, -1610612734, 0, -196609, 0, 0, -262144, 0, 0, -262143, 0, 0, -262125, 2, 0, -262124, 0, 0, -262123, -1610612734, 0, -131073, -1073741822, 0, -196608, 0, 0, -196607, 1610612738, 0, -196589, -1073741822, 0, -196588, 0, 0, -196587, 1610612738, 0, -131072, 1, 0, -131052, 1, 0, -7, 2, 0, -6, 0, 0, -5, -1610612734, 0, -65536, 1, 0, -65535, -1610612734, 0, -65520, 0, 0, -65516, 1, 0, -65515, 2, 0, -65514, 0, 0, -65513, -1610612734, 0, 16, 1, 0, 131070, 1, 0, 196606, 1610612736, 0 )
[node name="DetailTileMap2" parent="." instance=ExtResource( 6 )]
z_index = -11
tile_data = PoolIntArray( -131075, 4, 4, -196604, 4, 4, -65540, 4, 65539, -65539, 4, 196608, -65538, 4, 6, -131069, 4, 196613, -131068, 4, 0, -131067, 4, 131078, -4, 4, 131075, -3, 4, 131072, -2, 4, 131078, -65533, 4, 131077, -65532, 4, 0, -65531, 4, 131076, 131066, 4, 65541, 131067, 4, 131073, 131068, 4, 65537, 131069, 4, 0, 131070, 4, 65538, 131071, 4, 65537, 65536, 4, 0, 65537, 4, 65536, 65538, 4, 0, 65539, 4, 65537, 65540, 4, 65538, 65541, 4, 196608, 65542, 4, 196614, 196604, 4, 5, 196605, 4, 0, 196606, 4, 0, 196607, 4, 131073, 131072, 4, 0, 131073, 4, 65538, 131074, 4, 0, 131075, 4, 196609, 131076, 4, 196612 )
tile_data = PoolIntArray( -131075, 4, 4, -196604, 4, 4, -196598, 4, 4, -65540, 4, 65539, -65539, 4, 196608, -65538, 4, 6, -131069, 4, 196613, -131068, 4, 0, -131067, 4, 131078, -131063, 4, 65539, -131062, 4, 131072, -131061, 4, 65540, -4, 4, 131075, -3, 4, 131072, -2, 4, 131078, -65533, 4, 131077, -65532, 4, 0, -65531, 4, 131076, -65527, 4, 131075, -65526, 4, 1, -65525, 4, 131076, 131066, 4, 65541, 131067, 4, 131073, 131068, 4, 65537, 131069, 4, 0, 131070, 4, 65538, 131071, 4, 65537, 65536, 4, 0, 65537, 4, 65536, 65538, 4, 0, 65539, 4, 65537, 65540, 4, 65538, 65541, 4, 196608, 65542, 4, 196614, 65545, 4, 5, 65546, 4, 1, 65547, 4, 65538, 65548, 4, 1, 65555, 4, 65538, 65556, 4, 1, 65557, 4, 65537, 65558, 4, 196614, 196604, 4, 5, 196605, 4, 0, 196606, 4, 0, 196607, 4, 131073, 131072, 4, 0, 131073, 4, 65538, 131074, 4, 0, 131075, 4, 196609, 131076, 4, 196612, 131083, 4, 196611, 131084, 4, 1, 131085, 4, 65536, 131086, 4, 2, 131087, 4, 1, 131088, 4, 131072, 131089, 4, 1, 131090, 4, 2, 131091, 4, 65538, 131092, 4, 65540, 196621, 4, 65539, 196622, 4, 196609, 196623, 4, 65537, 196624, 4, 0, 196625, 4, 0, 196626, 4, 131076 )
[node name="GameCamera" parent="." instance=ExtResource( 7 )]
smoothing_enabled = false

View file

@ -14,12 +14,17 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="Control"]
margin_right = 320.0
margin_bottom = 180.0
[node name="List" type="RichTextLabel" parent="Control"]
margin_left = 17.764
margin_top = 90.0
margin_right = 106.764
margin_bottom = 180.0
custom_fonts/normal_font = ExtResource( 1 )
custom_colors/default_color = Color( 0, 0, 0, 1 )
text = "list"
fit_content_height = true
scroll_active = false
@ -33,6 +38,7 @@ margin_top = 10.0
margin_right = 320.0
margin_bottom = 170.0
custom_fonts/normal_font = ExtResource( 1 )
custom_colors/default_color = Color( 0, 0, 0, 1 )
text = "info"
scroll_active = false
__meta__ = {
@ -45,4 +51,20 @@ margin_top = 90.0
margin_right = 50.0
margin_bottom = 104.0
custom_fonts/font = ExtResource( 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
text = ">"
[node name="ViewportContainer" type="ViewportContainer" parent="Control"]
margin_left = 210.0
margin_top = 70.0
margin_right = 310.0
margin_bottom = 170.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Viewport" type="Viewport" parent="Control/ViewportContainer"]
size = Vector2( 100, 100 )
own_world = true
handle_input_locally = false
render_target_update_mode = 3

View file

@ -247,7 +247,7 @@ func death():
Shared.start_reset()
queue_free()
dev.out(name + " died")
Shared.stage.death()
#Shared.stage.death()
#Shared.death()
func win():

View file

@ -10,10 +10,14 @@ var maps : PoolStringArray = []
var cursor := 0
var line_height = 9
var viewport : Viewport
func _ready():
label_list = $Control/List
label_info = $Control/Info
viewport = $Control/ViewportContainer/Viewport
map_list = ""
var dir = Directory.new()
@ -30,7 +34,7 @@ func _ready():
maps.append_array(map_list.split("\n", false))
label_list.text = map_list
info()
scroll()
func _process(delta):
var btny = btn.p("down") - btn.p("up")
@ -46,6 +50,7 @@ func scroll(arg = 0):
cursor = clamp(cursor + arg, 0, maps.size() - 1)
label_list.rect_position.y = 90 - (cursor * line_height)
info()
view_map()
func info():
label_info.text = str(cursor) + " / " + maps[cursor] + "\n"
@ -55,7 +60,13 @@ func info():
label_info.text += str(i.keys()[j]) + ": " + str(i.values()[j]) + "\n"
break
func view_map():
for i in viewport.get_children():
i.queue_free()
if ResourceLoader.exists("res://Map/" + maps[cursor] + ".tscn"):
var m = load("res://Map/" + maps[cursor] + ".tscn").instance()
viewport.add_child(m)

View file

@ -1,7 +1,7 @@
extends Node2D
class_name Stage
export var stage_name := "1-1"
export var stage_name := "unnamed"
var timer := 0.0
var is_timer = true

View file

@ -87,7 +87,7 @@ _global_script_class_icons={
[application]
config/name="gdBox"
run/main_scene="res://Map/world.tscn"
run/main_scene="res://Scene/select.tscn"
config/icon="res://icon.png"
[autoload]