Fixed Main Menu with level select, new Tile Sizes & assets
Main change is the fixed main menu The other changes include newly added resources, like the new ground tile and blobby animations/designs I also experimented with the display size and camera To adapt to the new Blobby design, the default tile size was changed to 24x24
|
Before Width: | Height: | Size: 270 B |
|
Before Width: | Height: | Size: 261 B |
@ -1,35 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/blobby3.png-f3049c49f8261c7d40c3ceedc1afb230.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://assets/blobby/blobby3.png"
|
|
||||||
dest_files=[ "res://.import/blobby3.png-f3049c49f8261c7d40c3ceedc1afb230.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
|
|
||||||
BIN
assets/blobby/fall/neu-blobby-falllose_altitude.aseprite
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="aseprite.wizard.plugin"
|
||||||
|
type="SpriteFrames"
|
||||||
|
path="res://.import/neu-blobby-falllose_altitude.aseprite-5026cd44477475935af029c69cb83a32.res"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/blobby/fall/neu-blobby-falllose_altitude.aseprite"
|
||||||
|
dest_files=[ "res://.import/neu-blobby-falllose_altitude.aseprite-5026cd44477475935af029c69cb83a32.res" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
split_layers=false
|
||||||
|
exclude_layers_pattern=""
|
||||||
|
only_visible_layers=false
|
||||||
|
sheet_type="Packed"
|
||||||
|
sprite_filename_pattern="{basename}.{layer}.{extension}"
|
||||||
|
texture_strip/import_texture_strip=false
|
||||||
|
texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}"
|
||||||
|
texture_atlas/import_texture_atlas=false
|
||||||
|
texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}"
|
||||||
|
texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}"
|
||||||
|
animated_texture/import_animated_texture=false
|
||||||
|
animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}"
|
||||||
|
animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}"
|
||||||
|
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 272 B |
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/Sprite Sheet.png-bf757f9f4ec21b36f2986389d3f1a11f.stex"
|
path="res://.import/blobby1.png-009f95b04cac8d11a75a960ffcd58226.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://src/Actors/Blobby/Sprite Sheet.png"
|
source_file="res://assets/blobby/idle/blobby1.png"
|
||||||
dest_files=[ "res://.import/Sprite Sheet.png-bf757f9f4ec21b36f2986389d3f1a11f.stex" ]
|
dest_files=[ "res://.import/blobby1.png-009f95b04cac8d11a75a960ffcd58226.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
BIN
assets/blobby/idle/proto-blobby.png
Normal file
|
After Width: | Height: | Size: 366 B |
35
assets/blobby/idle/proto-blobby.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/proto-blobby.png-6768aaa5a5f6a2768fc93f268f8abcbc.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/blobby/idle/proto-blobby.png"
|
||||||
|
dest_files=[ "res://.import/proto-blobby.png-6768aaa5a5f6a2768fc93f268f8abcbc.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=false
|
||||||
|
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=false
|
||||||
|
svg/scale=1.0
|
||||||
BIN
assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="aseprite.wizard.plugin"
|
||||||
|
type="SpriteFrames"
|
||||||
|
path="res://.import/neu-blobby-jumpgain_altitude.aseprite-d3e743388ba919f7b0dd56646d0f0fe2.res"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/blobby/jump/neu-blobby-jumpgain_altitude.aseprite"
|
||||||
|
dest_files=[ "res://.import/neu-blobby-jumpgain_altitude.aseprite-d3e743388ba919f7b0dd56646d0f0fe2.res" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
split_layers=false
|
||||||
|
exclude_layers_pattern=""
|
||||||
|
only_visible_layers=false
|
||||||
|
sheet_type="Packed"
|
||||||
|
sprite_filename_pattern="{basename}.{layer}.{extension}"
|
||||||
|
texture_strip/import_texture_strip=false
|
||||||
|
texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}"
|
||||||
|
texture_atlas/import_texture_atlas=false
|
||||||
|
texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}"
|
||||||
|
texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}"
|
||||||
|
animated_texture/import_animated_texture=false
|
||||||
|
animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}"
|
||||||
|
animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}"
|
||||||
BIN
assets/blobby/walk/neu-blobby-proto-walk-anm-test.aseprite
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="aseprite.wizard.plugin"
|
||||||
|
type="SpriteFrames"
|
||||||
|
path="res://.import/neu-blobby-proto-walk-anm-test.aseprite-d81d15d3e33a50344468dd958b4174fe.res"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/blobby/walk/neu-blobby-proto-walk-anm-test.aseprite"
|
||||||
|
dest_files=[ "res://.import/neu-blobby-proto-walk-anm-test.aseprite-d81d15d3e33a50344468dd958b4174fe.res" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
split_layers=false
|
||||||
|
exclude_layers_pattern=""
|
||||||
|
only_visible_layers=false
|
||||||
|
sheet_type="Packed"
|
||||||
|
sprite_filename_pattern="{basename}.{layer}.{extension}"
|
||||||
|
texture_strip/import_texture_strip=false
|
||||||
|
texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}"
|
||||||
|
texture_atlas/import_texture_atlas=false
|
||||||
|
texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}"
|
||||||
|
texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}"
|
||||||
|
animated_texture/import_animated_texture=false
|
||||||
|
animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}"
|
||||||
|
animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}"
|
||||||
BIN
assets/enemy/blobby.aseprite
Normal file
26
assets/enemy/blobby.aseprite.import
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="aseprite.wizard.plugin"
|
||||||
|
type="SpriteFrames"
|
||||||
|
path="res://.import/blobby.aseprite-dcc9b305224ade5e06d0d4fa84cb5431.res"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/enemy/blobby.aseprite"
|
||||||
|
dest_files=[ "res://.import/blobby.aseprite-dcc9b305224ade5e06d0d4fa84cb5431.res" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
split_layers=false
|
||||||
|
exclude_layers_pattern=""
|
||||||
|
only_visible_layers=false
|
||||||
|
sheet_type="Packed"
|
||||||
|
sprite_filename_pattern="{basename}.{layer}.{extension}"
|
||||||
|
texture_strip/import_texture_strip=false
|
||||||
|
texture_strip/filename_pattern="{basename}.{layer}.Strip.{extension}"
|
||||||
|
texture_atlas/import_texture_atlas=false
|
||||||
|
texture_atlas/filename_pattern="{basename}.{layer}.Atlas.{extension}"
|
||||||
|
texture_atlas/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Atlas.{extension}"
|
||||||
|
animated_texture/import_animated_texture=false
|
||||||
|
animated_texture/filename_pattern="{basename}.{layer}.{animation}.Texture.{extension}"
|
||||||
|
animated_texture/frame_filename_pattern="{basename}.{layer}.{animation}.{frame}.Texture.{extension}"
|
||||||
BIN
assets/environment/blocks/24BlockBasic.png
Normal file
|
After Width: | Height: | Size: 482 B |
35
assets/environment/blocks/24BlockBasic.png.import
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/24BlockBasic.png-d22d95ec52ec186648a7c640e38c8926.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/environment/blocks/24BlockBasic.png"
|
||||||
|
dest_files=[ "res://.import/24BlockBasic.png-d22d95ec52ec186648a7c640e38c8926.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=false
|
||||||
|
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=false
|
||||||
|
svg/scale=1.0
|
||||||
|
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 628 B |
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/background tile.png-f280c3bf572e5293d0867d12a982e05d.stex"
|
path="res://.import/background tile.png-9e3fb43db4ce7cb4754d0ba67d4fcd00.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/environment/background/background tile.png"
|
source_file="res://assets/environment/blocks/background tile.png"
|
||||||
dest_files=[ "res://.import/background tile.png-f280c3bf572e5293d0867d12a982e05d.stex" ]
|
dest_files=[ "res://.import/background tile.png-9e3fb43db4ce7cb4754d0ba67d4fcd00.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
@ -52,11 +52,10 @@ settings/fps/force_fps=144
|
|||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/size/width=1920
|
window/size/width=640
|
||||||
window/size/height=1080
|
window/size/height=360
|
||||||
window/stretch/mode="2d"
|
window/stretch/mode="2d"
|
||||||
window/stretch/aspect="keep"
|
window/stretch/aspect="keep"
|
||||||
window/stretch/shrink=3.59
|
|
||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.8 KiB |
@ -1,35 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/Adventurer Sprite Sheet v1.1.png-0502b0b1561dd006fe088f5e624f97d0.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://src/Actors/Blobby/Adventurer Sprite Sheet v1.1.png"
|
|
||||||
dest_files=[ "res://.import/Adventurer Sprite Sheet v1.1.png-0502b0b1561dd006fe088f5e624f97d0.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=true
|
|
||||||
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
|
|
||||||
@ -7,8 +7,6 @@ onready var right_wall_raycasts = $WallRaycasts/RightWallRaycast
|
|||||||
onready var player_state_machine = $BlobbyStateMachine
|
onready var player_state_machine = $BlobbyStateMachine
|
||||||
onready var init_boost = player_state_machine.init_boost
|
onready var init_boost = player_state_machine.init_boost
|
||||||
onready var init_boost_type = player_state_machine.init_boost_type
|
onready var init_boost_type = player_state_machine.init_boost_type
|
||||||
onready var camera_tween = $Camera2D/ShiftTween
|
|
||||||
onready var camera = $Camera2D
|
|
||||||
|
|
||||||
# TODO Too much speed through midair boosting
|
# TODO Too much speed through midair boosting
|
||||||
# TODO Walljump of of enemies/object not only walls
|
# TODO Walljump of of enemies/object not only walls
|
||||||
|
|||||||
@ -1,50 +1,68 @@
|
|||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/blobby/blobby1.png" type="Texture" id=1]
|
[ext_resource path="res://src/Actors/Blobby/BlobbyCam.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://src/Actors/Blobby/Camera2D.gd" type="Script" id=2]
|
|
||||||
[ext_resource path="res://src/Actors/Blobby/BlobbyStateMachine.gd" type="Script" id=3]
|
[ext_resource path="res://src/Actors/Blobby/BlobbyStateMachine.gd" type="Script" id=3]
|
||||||
[ext_resource path="res://src/Actors/Blobby/Blobby.gd" type="Script" id=4]
|
[ext_resource path="res://src/Actors/Blobby/Blobby.gd" type="Script" id=4]
|
||||||
[ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=5]
|
[ext_resource path="res://assets/meta/new_dynamicfont.tres" type="DynamicFont" id=5]
|
||||||
|
|
||||||
|
[sub_resource type="StreamTexture" id=3]
|
||||||
|
load_path = "res://.import/Layer 1.png-0b67f940a501a482178a05e168cce974.stex"
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=4]
|
||||||
|
resource_name = "idle"
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
|
extents = Vector2( 13, 9 )
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=2]
|
||||||
|
extents = Vector2( 13, 9 )
|
||||||
|
|
||||||
[node name="Blobby" type="KinematicBody2D" groups=["player"]]
|
[node name="Blobby" type="KinematicBody2D" groups=["player"]]
|
||||||
collision_mask = 120
|
collision_mask = 120
|
||||||
script = ExtResource( 4 )
|
script = ExtResource( 4 )
|
||||||
|
|
||||||
[node name="Player" type="Sprite" parent="."]
|
[node name="BlobbySprite" type="Sprite" parent="."]
|
||||||
position = Vector2( -0.00490093, 0.00763269 )
|
position = Vector2( 0, -10 )
|
||||||
scale = Vector2( 0.668819, 1.21494 )
|
texture = SubResource( 3 )
|
||||||
texture = ExtResource( 1 )
|
hframes = 2
|
||||||
|
__meta__ = {
|
||||||
|
"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUJsb2JieVNwcml0ZS9CbG9iYnltYXRpb25QbGF5ZXIKc291cmNlfD1yZXM6Ly9hc3NldHMvYmxvYmJ5L2p1bXAvbmV1LWJsb2JieS1qdW1wZ2Fpbl9hbHRpdHVkZS5hc2Vwcml0ZQpsYXllcnw9TGF5ZXIgMQpvcF9leHB8PUZhbHNlCm9fZm9sZGVyfD0Kb19uYW1lfD0Kb25seV92aXNpYmxlfD1GYWxzZQpvX2V4X3B8PQo="
|
||||||
|
}
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="Player"]
|
[node name="BlobbymationPlayer" type="AnimationPlayer" parent="BlobbySprite"]
|
||||||
|
pause_mode = 1
|
||||||
|
anims/idle = SubResource( 4 )
|
||||||
|
|
||||||
[node name="BlobbyBody" type="CollisionPolygon2D" parent="." groups=["player"]]
|
[node name="BlobbyBody" type="CollisionShape2D" parent="." groups=["player"]]
|
||||||
polygon = PoolVector2Array( -6.7, -3.273, -2.676, -7.3, 3.939, -7.3, 8, -1.768, 8, 4.912, 4.944, 8.5, -1.03623, 8.5, -4.213, 8.5, -6.7, 6.089 )
|
position = Vector2( 0, -9 )
|
||||||
|
shape = SubResource( 1 )
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="."]
|
[node name="BlobbyCam" type="Camera2D" parent="."]
|
||||||
position = Vector2( 80, 0 )
|
position = Vector2( 70, 0 )
|
||||||
current = true
|
current = true
|
||||||
|
zoom = Vector2( 0.666, 0.666 )
|
||||||
limit_left = 0
|
limit_left = 0
|
||||||
limit_top = 0
|
limit_top = 0
|
||||||
limit_right = 0
|
limit_right = 0
|
||||||
limit_bottom = 0
|
limit_bottom = 0
|
||||||
limit_smoothed = true
|
|
||||||
drag_margin_h_enabled = true
|
drag_margin_h_enabled = true
|
||||||
drag_margin_v_enabled = true
|
drag_margin_v_enabled = true
|
||||||
drag_margin_left = 0.08
|
drag_margin_left = 0.05
|
||||||
drag_margin_top = 0.08
|
drag_margin_top = 0.05
|
||||||
drag_margin_right = 0.08
|
drag_margin_right = 0.05
|
||||||
drag_margin_bottom = 0.08
|
drag_margin_bottom = 0.05
|
||||||
editor_draw_screen = false
|
editor_draw_screen = false
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
|
||||||
[node name="ShiftTween" type="Tween" parent="Camera2D"]
|
[node name="ShiftTween" type="Tween" parent="BlobbyCam"]
|
||||||
|
|
||||||
[node name="BlobbySkin" type="Area2D" parent="." groups=["player"]]
|
[node name="BlobbySkin" type="Area2D" parent="." groups=["player"]]
|
||||||
collision_mask = 126
|
collision_mask = 126
|
||||||
|
|
||||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="BlobbySkin"]
|
[node name="CollisionPolygon2D" type="CollisionShape2D" parent="BlobbySkin"]
|
||||||
scale = Vector2( 1.04, 1.04 )
|
position = Vector2( 0, -9 )
|
||||||
polygon = PoolVector2Array( -6.7, -3.311, -2.676, -7.3, 3.939, -7.3, 8, -1.863, 8, 4.912, 4.944, 8.5, -1.03623, 8.5, -4.213, 8.5, -6.7, 6.089 )
|
scale = Vector2( 1.03, 1.03 )
|
||||||
|
shape = SubResource( 2 )
|
||||||
|
|
||||||
[node name="BlobbyStateMachine" type="Node" parent="."]
|
[node name="BlobbyStateMachine" type="Node" parent="."]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
@ -58,10 +76,10 @@ wait_time = 0.067
|
|||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
[node name="StateLabel" type="Label" parent="."]
|
[node name="StateLabel" type="Label" parent="."]
|
||||||
margin_left = -25.3386
|
margin_left = -37.0
|
||||||
margin_top = -34.2836
|
margin_top = -44.0
|
||||||
margin_right = 25.6614
|
margin_right = 36.0
|
||||||
margin_bottom = -20.2836
|
margin_bottom = -30.0
|
||||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||||
custom_fonts/font = ExtResource( 5 )
|
custom_fonts/font = ExtResource( 5 )
|
||||||
text = "Ihre Werbung"
|
text = "Ihre Werbung"
|
||||||
@ -69,35 +87,41 @@ align = 1
|
|||||||
valign = 1
|
valign = 1
|
||||||
|
|
||||||
[node name="WallRaycasts" type="Node2D" parent="."]
|
[node name="WallRaycasts" type="Node2D" parent="."]
|
||||||
|
position = Vector2( 0, -1 )
|
||||||
|
|
||||||
[node name="LeftWallRaycast" type="Node2D" parent="WallRaycasts"]
|
[node name="LeftWallRaycast" type="Node2D" parent="WallRaycasts"]
|
||||||
position = Vector2( 3.86988, 6.34765 )
|
position = Vector2( 0, -8 )
|
||||||
|
|
||||||
[node name="Left_Wallcast1" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"]
|
[node name="Left_Wallcast1" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"]
|
||||||
position = Vector2( -10.5748, -8.60978 )
|
position = Vector2( -13, -4 )
|
||||||
enabled = true
|
enabled = true
|
||||||
cast_to = Vector2( -2, 0 )
|
exclude_parent = false
|
||||||
collision_mask = 9
|
cast_to = Vector2( -1, 0 )
|
||||||
|
collision_mask = 8
|
||||||
|
|
||||||
[node name="Left_Wallcast2" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"]
|
[node name="Left_Wallcast2" type="RayCast2D" parent="WallRaycasts/LeftWallRaycast"]
|
||||||
position = Vector2( -10.5888, -1.27766 )
|
position = Vector2( -13, 6 )
|
||||||
enabled = true
|
enabled = true
|
||||||
cast_to = Vector2( -2, 0 )
|
exclude_parent = false
|
||||||
collision_mask = 9
|
cast_to = Vector2( -1, 0 )
|
||||||
|
collision_mask = 8
|
||||||
|
|
||||||
[node name="RightWallRaycast" type="Node2D" parent="WallRaycasts"]
|
[node name="RightWallRaycast" type="Node2D" parent="WallRaycasts"]
|
||||||
|
position = Vector2( 0, -8 )
|
||||||
|
|
||||||
[node name="Right_Wallcast1" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"]
|
[node name="Right_Wallcast1" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"]
|
||||||
position = Vector2( 8.00081, -0.776408 )
|
position = Vector2( 13, -5 )
|
||||||
enabled = true
|
enabled = true
|
||||||
cast_to = Vector2( 2, 0 )
|
exclude_parent = false
|
||||||
collision_mask = 9
|
cast_to = Vector2( 1, 0 )
|
||||||
|
collision_mask = 8
|
||||||
|
|
||||||
[node name="Right_Wallcast2" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"]
|
[node name="Right_Wallcast2" type="RayCast2D" parent="WallRaycasts/RightWallRaycast"]
|
||||||
position = Vector2( 8.01643, 3.91567 )
|
position = Vector2( 13, 5 )
|
||||||
enabled = true
|
enabled = true
|
||||||
cast_to = Vector2( 2, 0 )
|
exclude_parent = false
|
||||||
collision_mask = 9
|
cast_to = Vector2( 1, 0 )
|
||||||
|
collision_mask = 8
|
||||||
|
|
||||||
[connection signal="area_entered" from="BlobbySkin" to="." method="_on_BlobbySkin_area_entered"]
|
[connection signal="area_entered" from="BlobbySkin" to="." method="_on_BlobbySkin_area_entered"]
|
||||||
[connection signal="body_entered" from="BlobbySkin" to="." method="_on_BlobbySkin_body_entered"]
|
[connection signal="body_entered" from="BlobbySkin" to="." method="_on_BlobbySkin_body_entered"]
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
extends Camera2D
|
extends Camera2D
|
||||||
|
|
||||||
var horizontal_facing = 0
|
var horizontal_facing = 0
|
||||||
var camera_x_shift = 80
|
var vertical_facing = 0
|
||||||
|
var camera_horizontal_shift = 70
|
||||||
|
var camera_vertical_shift = 90
|
||||||
|
|
||||||
onready var prev_camera_pos = get_camera_position()
|
onready var prev_camera_pos = get_camera_position()
|
||||||
onready var tween = $ShiftTween
|
onready var tween = $ShiftTween
|
||||||
@ -9,6 +11,13 @@ onready var tween = $ShiftTween
|
|||||||
# Gets the camera limits from the tilemap of the level
|
# Gets the camera limits from the tilemap of the level
|
||||||
# Requires "TileMap" to be a sibling of blobby
|
# Requires "TileMap" to be a sibling of blobby
|
||||||
func _ready():
|
func _ready():
|
||||||
|
_set_boundaries()
|
||||||
|
|
||||||
|
func _process(_delta: float) -> void:
|
||||||
|
_adapt_to_movement()
|
||||||
|
prev_camera_pos = get_camera_position()
|
||||||
|
|
||||||
|
func _set_boundaries():
|
||||||
# TODO Pass Reference to child and do not traverse the tree upwards
|
# TODO Pass Reference to child and do not traverse the tree upwards
|
||||||
# This is ok, because it only happens on initialization
|
# This is ok, because it only happens on initialization
|
||||||
# But it is also quite fickle
|
# But it is also quite fickle
|
||||||
@ -21,22 +30,30 @@ func _ready():
|
|||||||
limit_top = rect.position.y * cell_size.y
|
limit_top = rect.position.y * cell_size.y
|
||||||
limit_bottom = rect.end.y * cell_size.y
|
limit_bottom = rect.end.y * cell_size.y
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
|
||||||
_check_facing()
|
|
||||||
prev_camera_pos = get_camera_position()
|
|
||||||
|
|
||||||
|
|
||||||
# TODO Smoothing the camera limits in godot ruins this
|
# TODO Smoothing the camera limits in godot ruins this
|
||||||
func _check_facing():
|
func _adapt_to_movement():
|
||||||
|
var target_offset: Vector2 = Vector2(0,0)
|
||||||
|
var tween_v = false
|
||||||
|
var tween_h = false
|
||||||
var new_h_facing = sign(get_camera_position().x - prev_camera_pos.x)
|
var new_h_facing = sign(get_camera_position().x - prev_camera_pos.x)
|
||||||
if new_h_facing != 0 && horizontal_facing != new_h_facing:
|
if new_h_facing != 0 && horizontal_facing != new_h_facing:
|
||||||
horizontal_facing = new_h_facing
|
horizontal_facing = new_h_facing
|
||||||
var target_offset = camera_x_shift * new_h_facing
|
target_offset.x = camera_horizontal_shift * horizontal_facing
|
||||||
|
tween_h = true
|
||||||
|
|
||||||
|
# var new_v_facing = sign(get_camera_position().y - prev_camera_pos.y)
|
||||||
|
# if new_v_facing != 0 && vertical_facing != new_v_facing:
|
||||||
|
# vertical_facing = new_v_facing
|
||||||
|
# target_offset.y = camera_vertical_shift * vertical_facing
|
||||||
|
# print(target_offset)
|
||||||
|
# tween_v = true
|
||||||
|
|
||||||
|
if (tween_h || tween_v):
|
||||||
|
#TODO Motion may be too complex
|
||||||
tween.interpolate_property(
|
tween.interpolate_property(
|
||||||
self,
|
self,
|
||||||
"transform:origin:x",
|
"transform:origin",
|
||||||
self.transform.origin.x,
|
self.transform.origin,
|
||||||
target_offset,
|
target_offset,
|
||||||
1.2,
|
1.2,
|
||||||
Tween.TRANS_SINE,
|
Tween.TRANS_SINE,
|
||||||
@ -152,6 +152,7 @@ func _get_transition(_delta):
|
|||||||
|
|
||||||
func _enter_state(new_state, old_state):
|
func _enter_state(new_state, old_state):
|
||||||
if old_state == "idle" && (new_state == "walk" || new_state == "run"):
|
if old_state == "idle" && (new_state == "walk" || new_state == "run"):
|
||||||
|
|
||||||
init_boost = true
|
init_boost = true
|
||||||
init_boost_type = old_state + "_" + new_state
|
init_boost_type = old_state + "_" + new_state
|
||||||
|
|
||||||
|
|||||||
BIN
src/Actors/Blobby/Layer 1.png
Normal file
|
After Width: | Height: | Size: 615 B |
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/blobby2.png-d294ac62d2147eb34557adf70d20152f.stex"
|
path="res://.import/Layer 1.png-0b67f940a501a482178a05e168cce974.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/blobby/blobby2.png"
|
source_file="res://src/Actors/Blobby/Layer 1.png"
|
||||||
dest_files=[ "res://.import/blobby2.png-d294ac62d2147eb34557adf70d20152f.stex" ]
|
dest_files=[ "res://.import/Layer 1.png-0b67f940a501a482178a05e168cce974.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
@ -24,12 +24,12 @@ flags/filter=false
|
|||||||
flags/mipmaps=false
|
flags/mipmaps=false
|
||||||
flags/anisotropic=false
|
flags/anisotropic=false
|
||||||
flags/srgb=2
|
flags/srgb=2
|
||||||
process/fix_alpha_border=true
|
process/fix_alpha_border=false
|
||||||
process/premult_alpha=false
|
process/premult_alpha=false
|
||||||
process/HDR_as_SRGB=false
|
process/HDR_as_SRGB=false
|
||||||
process/invert_color=false
|
process/invert_color=false
|
||||||
process/normal_map_invert_y=false
|
process/normal_map_invert_y=false
|
||||||
stream=false
|
stream=false
|
||||||
size_limit=0
|
size_limit=0
|
||||||
detect_3d=true
|
detect_3d=false
|
||||||
svg/scale=1.0
|
svg/scale=1.0
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB |
@ -10,9 +10,9 @@ var wallslide_threshold := 300
|
|||||||
# TODO Map to floor types and move to physics constants
|
# TODO Map to floor types and move to physics constants
|
||||||
var normal_floor_friction := 0.5
|
var normal_floor_friction := 0.5
|
||||||
var max_velocity := {
|
var max_velocity := {
|
||||||
"walk": 120, "run": 160, "fall": 400, "walljump": 150, "idle": 120
|
"walk": 120, "run": 160, "fall": 420, "walljump": 200, "idle": 12000
|
||||||
}
|
}
|
||||||
var velocity_jump_boost_ratio := 12
|
var velocity_jump_boost_ratio := 10
|
||||||
# This is added to the acceleration force initially
|
# This is added to the acceleration force initially
|
||||||
var init_acceleration_force := {
|
var init_acceleration_force := {
|
||||||
"idle_walk": 4181, "idle_run": 5765, "walk_run": 1000
|
"idle_walk": 4181, "idle_run": 5765, "walk_run": 1000
|
||||||
@ -20,11 +20,11 @@ var init_acceleration_force := {
|
|||||||
# Oriented around deltas of 0.0166666...s
|
# Oriented around deltas of 0.0166666...s
|
||||||
# newtonmeters is the unit
|
# newtonmeters is the unit
|
||||||
var acceleration_force := {
|
var acceleration_force := {
|
||||||
"walk": Vector2(2000, 68000),
|
"walk": Vector2(2000, 56000),
|
||||||
"idle": Vector2(2000, 68000),
|
"idle": Vector2(2000, 56000),
|
||||||
"run": Vector2(2000, 68000),
|
"run": Vector2(2800, 59000),
|
||||||
"walljump": Vector2(36000, 58000),
|
"walljump": Vector2(36000, 58000),
|
||||||
"air_strafe": Vector2(20000, 0)
|
"air_strafe": Vector2(20000, 100)
|
||||||
}
|
}
|
||||||
# Gravity as m/s^2
|
# Gravity as m/s^2
|
||||||
var _gravity: float = PhysicsConst.gravity
|
var _gravity: float = PhysicsConst.gravity
|
||||||
|
|||||||
63
src/Levels/24TileSizeLevel.tscn
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
[gd_scene load_steps=5 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=1]
|
||||||
|
[ext_resource path="res://assets/environment/blocks/24BlockBasic.png" type="Texture" id=2]
|
||||||
|
|
||||||
|
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||||
|
points = PoolVector2Array( 23.7224, 24, 0, 24, 0, 0, 24, 0 )
|
||||||
|
|
||||||
|
[sub_resource type="TileSet" id=2]
|
||||||
|
0/name = "24BlockBasic.png 0"
|
||||||
|
0/texture = ExtResource( 2 )
|
||||||
|
0/tex_offset = Vector2( 0, 0 )
|
||||||
|
0/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
0/region = Rect2( 22, 23, 0, 0 )
|
||||||
|
0/tile_mode = 0
|
||||||
|
0/occluder_offset = Vector2( 0, 0 )
|
||||||
|
0/navigation_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_offset = Vector2( 0, 0 )
|
||||||
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
0/shape_one_way = false
|
||||||
|
0/shape_one_way_margin = 0.0
|
||||||
|
0/shapes = [ ]
|
||||||
|
0/z_index = 0
|
||||||
|
1/name = "24BlockBasic.png 1"
|
||||||
|
1/texture = ExtResource( 2 )
|
||||||
|
1/tex_offset = Vector2( 0, 0 )
|
||||||
|
1/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
1/region = Rect2( 0, 0, 24, 24 )
|
||||||
|
1/tile_mode = 0
|
||||||
|
1/occluder_offset = Vector2( 0, 0 )
|
||||||
|
1/navigation_offset = Vector2( 0, 0 )
|
||||||
|
1/shape_offset = Vector2( 0, 0 )
|
||||||
|
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
1/shape = SubResource( 3 )
|
||||||
|
1/shape_one_way = false
|
||||||
|
1/shape_one_way_margin = 1.0
|
||||||
|
1/shapes = [ {
|
||||||
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
|
"one_way": false,
|
||||||
|
"one_way_margin": 1.0,
|
||||||
|
"shape": SubResource( 3 ),
|
||||||
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
} ]
|
||||||
|
1/z_index = 0
|
||||||
|
|
||||||
|
[node name="LevelTemplate" type="Node2D"]
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_horizontal_guides_": [ 464.0 ],
|
||||||
|
"_edit_vertical_guides_": [ 2880.0 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Blobby" parent="." instance=ExtResource( 1 )]
|
||||||
|
position = Vector2( -259.915, 710.547 )
|
||||||
|
|
||||||
|
[node name="TileMap" type="TileMap" parent="."]
|
||||||
|
tile_set = SubResource( 2 )
|
||||||
|
cell_size = Vector2( 24, 24 )
|
||||||
|
cell_quadrant_size = 12
|
||||||
|
cell_custom_transform = Transform2D( 24, 0, 0, 24, 0, 0 )
|
||||||
|
collision_layer = 8
|
||||||
|
collision_mask = 0
|
||||||
|
format = 1
|
||||||
|
tile_data = PoolIntArray( 1179797, 1, 0, 1179798, 1, 0, 1179799, 1, 0, 1179800, 1, 0, 1179801, 1, 0, 1245311, 1, 0, 1245316, 1, 0, 1245317, 1, 0, 1245318, 1, 0, 1245319, 1, 0, 1245320, 1, 0, 1245321, 1, 0, 1245322, 1, 0, 1245323, 1, 0, 1245324, 1, 0, 1245325, 1, 0, 1245326, 1, 0, 1245327, 1, 0, 1245328, 1, 0, 1245329, 1, 0, 1245330, 1, 0, 1245331, 1, 0, 1245332, 1, 0, 1245333, 1, 0, 1245337, 1, 0, 1376242, 536870913, 0, 1310847, 1, 0, 1310864, 1, 0, 1310873, 1, 0, 1441778, 536870913, 0, 1376383, 1, 0, 1376384, 1, 0, 1376409, 1, 0, 1507314, 536870913, 0, 1441919, 1, 0, 1441945, 1, 0, 1572850, 536870913, 0, 1507455, 1, 0, 1507480, 1, 0, 1507481, 1, 0, 1638386, 536870913, 0, 1572991, 1, 0, 1572992, 1, 0, 1572993, 1, 0, 1572994, 1, 0, 1572995, 1, 0, 1572996, 1, 0, 1572997, 1, 0, 1572998, 1, 0, 1572999, 1, 0, 1573000, 1, 0, 1573001, 1, 0, 1573002, 1, 0, 1573017, 1, 0, 1703922, 536870913, 0, 1638527, 1, 0, 1638553, 1, 0, 1769458, 536870913, 0, 1704063, 1, 0, 1704077, 1, 0, 1704078, 1, 0, 1704079, 1, 0, 1704080, 1, 0, 1704081, 1, 0, 1704089, 1, 0, 1834994, 536870913, 0, 1769599, 1, 0, 1769625, 1, 0, 1900530, 536870913, 0, 1835037, 1, 0, 1835135, 1, 0, 1835157, 1, 0, 1835158, 1, 0, 1835159, 1, 0, 1835160, 1, 0, 1835161, 1, 0, 1966066, 536870913, 0, 1966069, 536870912, 0, 1966070, 536870912, 0, 1900544, 0, 0, 1900562, 1, 0, 1900573, 1, 0, 1900697, 1, 0, 2031602, 536870913, 0, 1966080, 0, 0, 1966089, 1, 0, 1966098, 1, 0, 1966109, 1, 0, 1966119, 1, 0, 1966121, 1, 0, 1966122, 1, 0, 1966125, 1, 0, 1966126, 1, 0, 1966127, 1, 0, 1966131, 1, 0, 1966132, 1, 0, 1966133, 1, 0, 1966134, 1, 0, 1966139, 1, 0, 1966140, 1, 0, 1966141, 1, 0, 1966142, 1, 0, 1966143, 1, 0, 1966149, 1, 0, 1966150, 1, 0, 1966151, 1, 0, 1966152, 1, 0, 1966153, 1, 0, 1966154, 1, 0, 1966161, 1, 0, 1966162, 1, 0, 1966163, 1, 0, 1966164, 1, 0, 1966165, 1, 0, 1966166, 1, 0, 1966167, 1, 0, 1966175, 1, 0, 1966176, 1, 0, 1966177, 1, 0, 1966178, 1, 0, 1966179, 1, 0, 1966180, 1, 0, 1966181, 1, 0, 1966182, 1, 0, 1966191, 1, 0, 1966192, 1, 0, 1966193, 1, 0, 1966194, 1, 0, 1966195, 1, 0, 1966196, 1, 0, 1966197, 1, 0, 1966198, 1, 0, 1966233, 1, 0, 2097138, 536870913, 0, 2097139, 536870913, 0, 2097140, 536870913, 0, 2097141, 536870913, 0, 2097142, 1, 0, 2097143, 1, 0, 2097144, 1, 0, 2097145, 1, 0, 2097146, 1, 0, 2097147, 1, 0, 2097148, 1, 0, 2097149, 1, 0, 2097150, 1, 0, 2097151, 1, 0, 2031616, 1, 0, 2031617, 1, 0, 2031618, 1, 0, 2031619, 1, 0, 2031620, 1, 0, 2031621, 1, 0, 2031622, 1, 0, 2031623, 1, 0, 2031624, 1, 0, 2031625, 1, 0, 2031626, 1, 0, 2031627, 1, 0, 2031628, 1, 0, 2031629, 1, 0, 2031630, 1, 0, 2031631, 1, 0, 2031632, 1, 0, 2031633, 1, 0, 2031634, 1, 0, 2031635, 1, 0, 2031636, 1, 0, 2031637, 1, 0, 2031638, 1, 0, 2031639, 1, 0, 2031640, 1, 0, 2031641, 1, 0, 2031642, 1, 0, 2031643, 1, 0, 2031644, 1, 0, 2031645, 1, 0, 2031646, 1, 0, 2031647, 1, 0, 2031648, 1, 0, 2031649, 1, 0, 2031650, 1, 0, 2031651, 1, 0, 2031652, 1, 0, 2031653, 1, 0, 2031654, 1, 0, 2031655, 1, 0, 2031656, 1, 0, 2031657, 1, 0, 2031658, 1, 0, 2031659, 1, 0, 2031660, 1, 0, 2031661, 1, 0, 2031662, 1, 0, 2031663, 1, 0, 2031664, 1, 0, 2031665, 1, 0, 2031666, 1, 0, 2031667, 1, 0, 2031668, 1, 0, 2031669, 1, 0, 2031670, 1, 0, 2031671, 1, 0, 2031672, 1, 0, 2031673, 1, 0, 2031674, 1, 0, 2031675, 1, 0, 2031676, 1, 0, 2031677, 1, 0, 2031678, 1, 0, 2031679, 1, 0, 2031680, 1, 0, 2031681, 1, 0, 2031682, 1, 0, 2031683, 1, 0, 2031684, 1, 0, 2031685, 1, 0, 2031686, 1, 0, 2031687, 1, 0, 2031688, 1, 0, 2031689, 1, 0, 2031690, 1, 0, 2031691, 1, 0, 2031692, 1, 0, 2031693, 1, 0, 2031694, 1, 0, 2031695, 1, 0, 2031696, 1, 0, 2031697, 1, 0, 2031698, 1, 0, 2031699, 1, 0, 2031700, 1, 0, 2031701, 1, 0, 2031702, 1, 0, 2031703, 1, 0, 2031704, 1, 0, 2031705, 1, 0, 2031706, 1, 0, 2031707, 1, 0, 2031708, 1, 0, 2031709, 1, 0, 2031710, 1, 0, 2031711, 1, 0, 2031712, 1, 0, 2031713, 1, 0, 2031714, 1, 0, 2031715, 1, 0, 2031716, 1, 0, 2031717, 1, 0, 2031718, 1, 0, 2031719, 1, 0, 2031720, 1, 0, 2031721, 1, 0, 2031722, 1, 0, 2031723, 1, 0, 2031724, 1, 0, 2031725, 1, 0, 2031726, 1, 0, 2031727, 1, 0, 2031728, 1, 0, 2031729, 1, 0, 2031730, 1, 0, 2031731, 1, 0, 2031732, 1, 0, 2031733, 1, 0, 2031734, 1, 0, 2031735, 1, 0, 2031736, 1, 0, 2031737, 1, 0, 2031738, 1, 0, 2031739, 1, 0, 2031740, 1, 0, 2031741, 1, 0, 2031742, 1, 0, 2031743, 1, 0, 2031744, 1, 0, 2031745, 1, 0, 2031746, 1, 0, 2031747, 1, 0, 2031748, 1, 0, 2031749, 1, 0, 2031750, 1, 0, 2031751, 1, 0, 2031752, 1, 0, 2031753, 1, 0, 2031754, 1, 0, 2031755, 1, 0, 2031756, 1, 0, 2031757, 1, 0, 2031758, 1, 0, 2031759, 1, 0, 2031760, 1, 0, 2031761, 1, 0, 2031762, 1, 0, 2031763, 1, 0, 2031764, 1, 0, 2031765, 1, 0, 2031766, 1, 0, 2031767, 1, 0, 2031768, 1, 0, 2031769, 1, 0 )
|
||||||
BIN
src/Levels/Layer 1.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/blobby1.png-a4f53cbbf18025f2df7be0d13bd4c968.stex"
|
path="res://.import/Layer 1.png-52e5c3fdf7fae7b4b7f3caca0133b862.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://assets/blobby/blobby1.png"
|
source_file="res://src/Levels/Layer 1.png"
|
||||||
dest_files=[ "res://.import/blobby1.png-a4f53cbbf18025f2df7be0d13bd4c968.stex" ]
|
dest_files=[ "res://.import/Layer 1.png-52e5c3fdf7fae7b4b7f3caca0133b862.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
@ -2,9 +2,13 @@ tool
|
|||||||
extends Button
|
extends Button
|
||||||
|
|
||||||
export(String, FILE) var next_scene_path: = ""
|
export(String, FILE) var next_scene_path: = ""
|
||||||
|
onready var selected_level_base_path: String = "res://src/Levels/"
|
||||||
|
|
||||||
func _on_button_up() -> void:
|
func _on_button_up() -> void:
|
||||||
get_tree().change_scene(next_scene_path)
|
get_tree().change_scene(next_scene_path)
|
||||||
|
|
||||||
func _get_configuration_warning() -> String:
|
func _get_configuration_warning() -> String:
|
||||||
return "next_scene_path must be set for the button to work" if next_scene_path == "" else ""
|
return "next_scene_path must be set for the button to work" if next_scene_path == "" else ""
|
||||||
|
|
||||||
|
func _level_selection_changed(button):
|
||||||
|
next_scene_path = selected_level_base_path + button.text + ".tscn"
|
||||||
@ -28,13 +28,12 @@ __meta__ = {
|
|||||||
[node name="EndScreenLabel" parent="." instance=ExtResource( 3 )]
|
[node name="EndScreenLabel" parent="." instance=ExtResource( 3 )]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
margin_left = -169.0
|
margin_left = -170.0
|
||||||
margin_top = 55.0
|
margin_right = 170.0
|
||||||
margin_right = 171.0
|
margin_bottom = 93.0
|
||||||
margin_bottom = 148.0
|
|
||||||
rect_pivot_offset = Vector2( 170, 0 )
|
rect_pivot_offset = Vector2( 170, 0 )
|
||||||
size_flags_horizontal = 2
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 2
|
size_flags_vertical = 3
|
||||||
size_flags_stretch_ratio = 0.0
|
size_flags_stretch_ratio = 0.0
|
||||||
custom_fonts/font = ExtResource( 2 )
|
custom_fonts/font = ExtResource( 2 )
|
||||||
text = "Thank You For Playing!"
|
text = "Thank You For Playing!"
|
||||||
@ -42,27 +41,26 @@ autowrap = true
|
|||||||
|
|
||||||
[node name="StatsLabel" parent="." instance=ExtResource( 6 )]
|
[node name="StatsLabel" parent="." instance=ExtResource( 6 )]
|
||||||
margin_left = -146.5
|
margin_left = -146.5
|
||||||
margin_top = -64.5
|
margin_top = -33.5
|
||||||
margin_right = 146.5
|
margin_right = 146.5
|
||||||
margin_bottom = 2.5
|
margin_bottom = 33.5
|
||||||
|
size_flags_vertical = 1
|
||||||
align = 1
|
align = 1
|
||||||
script = ExtResource( 8 )
|
script = ExtResource( 8 )
|
||||||
|
|
||||||
[node name="MenuContainer" type="VBoxContainer" parent="."]
|
[node name="MenuContainer" type="VBoxContainer" parent="."]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 1.0
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 1.0
|
||||||
margin_left = -123.0
|
margin_left = -100.0
|
||||||
margin_top = 72.5001
|
margin_top = -120.0
|
||||||
margin_right = 123.0
|
margin_right = 100.0
|
||||||
margin_bottom = 233.5
|
margin_bottom = -20.0
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="PlayButton" parent="MenuContainer" instance=ExtResource( 4 )]
|
[node name="PlayButton" parent="MenuContainer" instance=ExtResource( 4 )]
|
||||||
margin_right = 246.0
|
margin_right = 200.0
|
||||||
|
margin_bottom = 48.0
|
||||||
text = "Begin Again"
|
text = "Begin Again"
|
||||||
next_scene_path = "res://src/UserInterface/Screens/MainScreen.tscn"
|
next_scene_path = "res://src/UserInterface/Screens/MainScreen.tscn"
|
||||||
|
|
||||||
@ -70,6 +68,6 @@ next_scene_path = "res://src/UserInterface/Screens/MainScreen.tscn"
|
|||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
margin_left = 0.0
|
margin_left = 0.0
|
||||||
margin_top = 82.0
|
margin_top = 52.0
|
||||||
margin_right = 246.0
|
margin_right = 200.0
|
||||||
margin_bottom = 160.0
|
margin_bottom = 100.0
|
||||||
|
|||||||
46
src/UserInterface/Screens/LevelList.gd
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
extends ScrollContainer
|
||||||
|
|
||||||
|
onready var LEVELS_PATH = "res://src/Levels/"
|
||||||
|
onready var BUTTON_GROUP : ButtonGroup = load("res://src/UserInterface/Screens/LevelSelectButtonGroup.tres")
|
||||||
|
onready var vbox = $VBoxContainer
|
||||||
|
|
||||||
|
# Declare member variables here. Examples:
|
||||||
|
# var a: int = 2
|
||||||
|
# var b: String = "text"
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
_fill_level_list()
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
func _fill_level_list():
|
||||||
|
var levels = []
|
||||||
|
var dir = Directory.new()
|
||||||
|
if dir.open(LEVELS_PATH) == OK:
|
||||||
|
dir.list_dir_begin()
|
||||||
|
while true:
|
||||||
|
var file_name = dir.get_next()
|
||||||
|
if file_name == "":
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
if(file_name.ends_with(".tscn")):
|
||||||
|
levels.append(file_name)
|
||||||
|
if levels.size() != 0:
|
||||||
|
_spawn_level_options(levels)
|
||||||
|
|
||||||
|
func _spawn_level_options(levels: Array):
|
||||||
|
BUTTON_GROUP.connect("pressed", get_node('../Buttons/PlayButton'), "_level_selection_changed")
|
||||||
|
for level in levels:
|
||||||
|
var check_box = CheckBox.new()
|
||||||
|
check_box.text = level.trim_suffix(".tscn")
|
||||||
|
check_box.set_button_group(BUTTON_GROUP);
|
||||||
|
vbox.add_child(check_box)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
#func _process(delta: float) -> void:
|
||||||
|
# pass
|
||||||
4
src/UserInterface/Screens/LevelSelectButtonGroup.tres
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[gd_resource type="ButtonGroup" format=2]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
resource_name = "LevelSelectButtonGroup"
|
||||||
@ -1,65 +1,77 @@
|
|||||||
[gd_scene load_steps=6 format=2]
|
[gd_scene load_steps=8 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/UserInterface/Buttons/QuitButton.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://src/UserInterface/Buttons/QuitButton.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://src/UserInterface/Buttons/Titel.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://src/UserInterface/Buttons/Titel.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://src/UserInterface/Buttons/ChangeSceneButton.tscn" type="PackedScene" id=3]
|
[ext_resource path="res://src/UserInterface/Buttons/ChangeSceneButton.tscn" type="PackedScene" id=3]
|
||||||
[ext_resource path="res://assets/environment/background/background.png" type="Texture" id=4]
|
[ext_resource path="res://assets/environment/background/background.png" type="Texture" id=4]
|
||||||
[ext_resource path="res://assets/meta/ui_theme.tres" type="Theme" id=5]
|
[ext_resource path="res://assets/meta/ui_theme.tres" type="Theme" id=5]
|
||||||
|
[ext_resource path="res://src/UserInterface/Screens/LevelList.gd" type="Script" id=6]
|
||||||
|
[ext_resource path="res://src/UserInterface/Screens/LevelSelectButtonGroup.tres" type="ButtonGroup" id=7]
|
||||||
|
|
||||||
[node name="MainScreen" type="Control"]
|
[node name="MainScreen" type="Control"]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
margin_right = -1493.33
|
size_flags_horizontal = 0
|
||||||
margin_bottom = -840.0
|
size_flags_vertical = 0
|
||||||
theme = ExtResource( 5 )
|
theme = ExtResource( 5 )
|
||||||
|
|
||||||
[node name="ViewportContainer" type="ViewportContainer" parent="."]
|
[node name="background" type="TextureRect" parent="."]
|
||||||
margin_right = 426.667
|
|
||||||
margin_bottom = 240.0
|
|
||||||
stretch = true
|
|
||||||
|
|
||||||
[node name="background" type="TextureRect" parent="ViewportContainer"]
|
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
texture = ExtResource( 4 )
|
texture = ExtResource( 4 )
|
||||||
expand = true
|
expand = true
|
||||||
stretch_mode = 2
|
stretch_mode = 1
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Titel" parent="ViewportContainer" instance=ExtResource( 2 )]
|
[node name="Titel" parent="." instance=ExtResource( 2 )]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
margin_left = -83.3335
|
margin_left = -162.5
|
||||||
margin_right = 91.6665
|
margin_right = 162.5
|
||||||
margin_bottom = 85.0
|
margin_bottom = 85.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
size_flags_horizontal = 2
|
size_flags_horizontal = 2
|
||||||
size_flags_vertical = 2
|
size_flags_vertical = 2
|
||||||
text = "Wumper"
|
text = "Wumper"
|
||||||
|
|
||||||
[node name="MenuContainer" type="VBoxContainer" parent="ViewportContainer"]
|
[node name="MenuContainer" type="HBoxContainer" parent="."]
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
margin_left = -43.3335
|
margin_left = -144.0
|
||||||
margin_right = 53.6665
|
margin_top = -12.0
|
||||||
margin_bottom = 81.0
|
margin_right = 156.0
|
||||||
__meta__ = {
|
margin_bottom = 88.0
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="PlayButton" parent="ViewportContainer/MenuContainer" instance=ExtResource( 3 )]
|
[node name="Buttons" type="VBoxContainer" parent="MenuContainer"]
|
||||||
margin_right = 97.0
|
margin_right = 296.0
|
||||||
margin_bottom = 38.0
|
margin_bottom = 100.0
|
||||||
next_scene_path = "res://src/Levels/WalkNJumpTesterLevel.tscn"
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="QuitButton" parent="ViewportContainer/MenuContainer" instance=ExtResource( 1 )]
|
[node name="PlayButton" parent="MenuContainer/Buttons" instance=ExtResource( 3 )]
|
||||||
|
margin_right = 296.0
|
||||||
|
margin_bottom = 48.0
|
||||||
|
next_scene_path = "res://src/Levels/24TileSizeLevel.tscn"
|
||||||
|
|
||||||
|
[node name="QuitButton" parent="MenuContainer/Buttons" instance=ExtResource( 1 )]
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_right = 0.0
|
anchor_right = 0.0
|
||||||
margin_left = 0.0
|
margin_left = 0.0
|
||||||
margin_top = 42.0
|
margin_top = 52.0
|
||||||
margin_right = 97.0
|
margin_right = 296.0
|
||||||
margin_bottom = 81.0
|
margin_bottom = 100.0
|
||||||
|
|
||||||
|
[node name="LevelList" type="ScrollContainer" parent="MenuContainer"]
|
||||||
|
margin_left = 300.0
|
||||||
|
margin_right = 300.0
|
||||||
|
margin_bottom = 100.0
|
||||||
|
scroll_horizontal_enabled = false
|
||||||
|
script = ExtResource( 6 )
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MenuContainer/LevelList"]
|
||||||
|
|
||||||
|
[node name="InvisibleCunt" type="CheckBox" parent="MenuContainer/LevelList/VBoxContainer"]
|
||||||
|
visible = false
|
||||||
|
margin_right = 24.0
|
||||||
|
margin_bottom = 24.0
|
||||||
|
group = ExtResource( 7 )
|
||||||
|
|||||||