a NEW game mechanic??

This commit is contained in:
pennyrigate 2023-11-24 21:44:12 -05:00
parent c4da203de7
commit 7cc669e813
6 changed files with 334 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/stalactite.png-02a1deb0032f5cd17ce906194b047729.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/stalactite/stalactite.png"
dest_files=[ "res://.import/stalactite.png-02a1deb0032f5cd17ce906194b047729.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

116
maps/cave_scholar.tscn Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=30 format=2]
[gd_scene load_steps=32 format=2]
[ext_resource path="res://tilesets/t_death.tres" type="TileSet" id=1]
[ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2]
@ -17,11 +17,13 @@
[ext_resource path="res://audio/music/BBBBBBBB.ogg" type="AudioStream" id=15]
[ext_resource path="res://objects/respawn_point.tscn" type="PackedScene" id=16]
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=17]
[ext_resource path="res://objects/environment/stalactite/stalactite.tscn" type="PackedScene" id=18]
[ext_resource path="res://objects/environment/switches/button.tscn" type="PackedScene" id=19]
[ext_resource path="res://objects/enemy/tin.tscn" type="PackedScene" id=20]
[ext_resource path="res://graphics/enemy/sawblade.png" type="Texture" id=21]
[ext_resource path="res://objects/enemy/rolling_fiend.tscn" type="PackedScene" id=22]
[ext_resource path="res://objects/enemy/steam.tscn" type="PackedScene" id=23]
[ext_resource path="res://objects/environment/falling_block/falling_block_cave.tscn" type="PackedScene" id=24]
[ext_resource path="res://objects/enemy/cop.tscn" type="PackedScene" id=25]
[ext_resource path="res://objects/environment/turret/turret_bullet.tscn" type="PackedScene" id=26]
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=27]
@ -69,7 +71,7 @@ tile_set = ExtResource( 3 )
cell_size = Vector2( 8, 8 )
collision_layer = 9
format = 1
tile_data = PoolIntArray( 196630, 1, 0, 262166, 1, 0, 327702, 1, 0, 393238, 1, 0, 458774, 1, 0, 524310, 1, 0, 589846, 1, 0, 655382, 1, 0, 655388, 0, 196609, 983062, 0, 0, 983063, 0, 0, 983064, 0, 0, 983065, 0, 0, 983066, 0, 0, 983067, 0, 0, 983068, 0, 0, 983069, 0, 0, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 0, 1441808, 0, 0, 1441809, 0, 0, 1441810, 0, 0, 1441811, 0, 0, 1441812, 0, 0, 1441813, 0, 0, 1441814, 0, 0, 1441815, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1507328, 0, 1, 1507329, 0, 1, 1507330, 0, 1, 1507331, 0, 1, 1507332, 0, 1, 1507333, 0, 1, 1507334, 0, 1, 1507337, 0, 1, 1507338, 0, 1, 1507339, 0, 1, 1507340, 0, 1, 1507341, 0, 1, 1507342, 0, 1, 1507343, 0, 1, 1507344, 0, 1, 1507345, 0, 1, 1507346, 0, 1, 1507347, 0, 1, 1507348, 0, 1, 1507349, 0, 1, 1507350, 0, 1, 1507351, 0, 1, 1507354, 0, 1, 1507355, 0, 1, 1507356, 0, 1, 1507357, 0, 1, 1507358, 0, 1, 1507359, 0, 1 )
tile_data = PoolIntArray( 196630, 1, 0, 262166, 1, 0, 327702, 1, 0, 393238, 1, 0, 458774, 1, 0, 524310, 1, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 0, 0, 589845, 0, 0, 589846, 1, 0, 655382, 1, 0, 655388, 0, 196609, 983062, 0, 0, 983063, 0, 0, 983064, 0, 0, 983065, 0, 0, 983066, 0, 0, 983067, 0, 0, 983068, 0, 0, 983069, 0, 0, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 0, 1441808, 0, 0, 1441809, 0, 0, 1441810, 0, 0, 1441811, 0, 0, 1441812, 0, 0, 1441813, 0, 0, 1441814, 0, 0, 1441815, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1507328, 0, 1, 1507329, 0, 1, 1507330, 0, 1, 1507331, 0, 1, 1507332, 0, 1, 1507333, 0, 1, 1507334, 0, 1, 1507337, 0, 1, 1507338, 0, 1, 1507339, 0, 1, 1507340, 0, 1, 1507341, 0, 1, 1507342, 0, 1, 1507343, 0, 1, 1507344, 0, 1, 1507345, 0, 1, 1507346, 0, 1, 1507347, 0, 1, 1507348, 0, 1, 1507349, 0, 1, 1507350, 0, 1, 1507351, 0, 1, 1507354, 0, 1, 1507355, 0, 1, 1507356, 0, 1, 1507357, 0, 1, 1507358, 0, 1, 1507359, 0, 1 )
[node name="Slime" parent="." instance=ExtResource( 10 )]
position = Vector2( 264, 168 )
@ -131,6 +133,7 @@ material = SubResource( 4 )
position = Vector2( 4, 4 )
z_index = -3
frames = SubResource( 5 )
frame = 1
playing = true
[node name="Steam" parent="." instance=ExtResource( 23 )]
@ -150,7 +153,7 @@ turn_time = inf
position = Vector2( 152, 72 )
[node name="Player2" parent="." instance=ExtResource( 27 )]
position = Vector2( 168, 168 )
position = Vector2( 128, 72 )
[node name="MovingPlatform" parent="." instance=ExtResource( 6 )]
position = Vector2( 96, 144 )
@ -200,4 +203,10 @@ right_boundary = 3.0
bottom_jumps = [ -2.0 ]
top_jumps = [ 3.0 ]
[node name="Stalactite" parent="." instance=ExtResource( 18 )]
position = Vector2( 144, 24 )
[node name="FallingBlock" parent="." instance=ExtResource( 24 )]
position = Vector2( 124, 96 )
[editable path="RollingFiend"]

View file

@ -0,0 +1,34 @@
extends Node2D
onready var cast = $RayCast2D
export var speed = 80
var fall = false
onready var refresh_timer = $RefreshTimer
onready var anims = $AnimationPlayer
onready var startpos = position
func _physics_process(delta):
if cast.is_colliding():
var collider = cast.get_collider()
if collider.is_in_group("player_hitbox") or collider.is_in_group("msx"):
if fall == false: refresh_timer.start()
fall = true
if fall == true:
position.y += speed * delta
if !refresh_timer.is_stopped() && refresh_timer.get_time_left() <= 0.6:
anims.play("disappear")
func _on_Hitbox_area_entered(area):
if area.is_in_group("player_hitbox"):
area.get_parent().die()
func _on_RefreshTimer_timeout():
call_deferred("set_position", startpos)
fall = false
anims.play("idle")
anims.play("disappear", -1, -1.0, true)

View file

@ -0,0 +1,137 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://graphics/stalactite/stalactite.png" type="Texture" id=1]
[ext_resource path="res://objects/environment/stalactite/stalactite.gd" type="Script" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 4, 5 )
[sub_resource type="Animation" id=4]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath("Hitbox/CollisionShape2D:disabled")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ true ]
}
[sub_resource type="Animation" id=2]
resource_name = "disappear"
length = 0.6
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0.00203761, 0.1, 0.2, 0.3, 0.4, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ true, false, true, false, true, false ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Hitbox/CollisionShape2D:disabled")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.6 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ false, true ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("RayCast2D:enabled")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.6 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ true, false ]
}
[sub_resource type="Animation" id=3]
resource_name = "idle"
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("RayCast2D:enabled")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Hitbox/CollisionShape2D:disabled")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}
[node name="Stalactite" type="Node2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 4, 0 )
texture = ExtResource( 1 )
[node name="RayCast2D" type="RayCast2D" parent="."]
position = Vector2( 3, 0 )
enabled = true
cast_to = Vector2( 0, 40 )
collision_mask = 10
collide_with_areas = true
[node name="Hitbox" type="Area2D" parent="."]
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2( 4, 0 )
shape = SubResource( 1 )
disabled = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "idle"
anims/RESET = SubResource( 4 )
anims/disappear = SubResource( 2 )
anims/idle = SubResource( 3 )
[node name="RefreshTimer" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
[connection signal="timeout" from="RefreshTimer" to="." method="_on_RefreshTimer_timeout"]