added falling
This commit is contained in:
parent
5510d89edc
commit
bd91fb7117
10 changed files with 147 additions and 5 deletions
30
gmtk_2024/levels/TestingRoom.tscn
Normal file
30
gmtk_2024/levels/TestingRoom.tscn
Normal file
|
@ -0,0 +1,30 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://o8wdfgnlp0ud"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cfnmiqovwwhry" path="res://player.tscn" id="1_nvifn"]
|
||||
[ext_resource type="Texture2D" uid="uid://cyealb63c8uqg" path="res://temp_assets/background_commision.png" id="2_qherw"]
|
||||
[ext_resource type="Texture2D" uid="uid://bsu1bvlb0s8dp" path="res://temp_assets/Screenshot (1).png" id="3_es5ys"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_dqhmf"]
|
||||
size = Vector2(1928.3, 529.623)
|
||||
|
||||
[node name="TestingRoom" type="Node2D"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_nvifn")]
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
z_index = -1
|
||||
texture = ExtResource("2_qherw")
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
scale = Vector2(1e-05, 1e-05)
|
||||
|
||||
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
||||
position = Vector2(38, 807)
|
||||
scale = Vector2(1.06, 1.06)
|
||||
texture = ExtResource("3_es5ys")
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="Sprite2D2"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite2D2/StaticBody2D"]
|
||||
position = Vector2(1.88681, -274.811)
|
||||
shape = SubResource("RectangleShape2D_dqhmf")
|
|
@ -1,11 +1,11 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cfnmiqovwwhry"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://3t2am0l5qvpq" path="res://icon.svg" id="1_ffv6o"]
|
||||
[ext_resource type="Script" path="res://scripts/player_movement.gd" id="1_otvu6"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6gxkpy33b88g" path="res://temp_assets/player.png" id="2_d4ig1"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_jqi2f"]
|
||||
radius = 56.0
|
||||
height = 128.0
|
||||
radius = 17.0
|
||||
height = 42.0
|
||||
|
||||
[node name="Player" type="Node2D"]
|
||||
|
||||
|
@ -14,7 +14,7 @@ script = ExtResource("1_otvu6")
|
|||
speed = 340
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
|
||||
texture = ExtResource("1_ffv6o")
|
||||
texture = ExtResource("2_d4ig1")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||
shape = SubResource("CapsuleShape2D_jqi2f")
|
||||
|
|
|
@ -11,10 +11,17 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="GMTK_2024"
|
||||
run/main_scene="res://player.tscn"
|
||||
run/main_scene="res://levels/TestingRoom.tscn"
|
||||
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1280
|
||||
window/size/viewport_height=720
|
||||
window/size/mode=2
|
||||
window/stretch/mode="viewport"
|
||||
|
||||
[input]
|
||||
|
||||
player_right={
|
||||
|
@ -32,3 +39,4 @@ player_left={
|
|||
|
||||
renderer/rendering_method="gl_compatibility"
|
||||
renderer/rendering_method.mobile="gl_compatibility"
|
||||
2d/snap/snap_2d_transforms_to_pixel=true
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
extends CharacterBody2D
|
||||
|
||||
@export var speed = 50
|
||||
@export var gravity = 50
|
||||
|
||||
func get_input():
|
||||
var input_direction = Input.get_axis("player_left", "player_right")
|
||||
|
@ -8,4 +9,5 @@ func get_input():
|
|||
|
||||
func _physics_process(delta):
|
||||
get_input()
|
||||
velocity.y += gravity
|
||||
move_and_slide()
|
||||
|
|
BIN
gmtk_2024/temp_assets/Screenshot (1).png
Normal file
BIN
gmtk_2024/temp_assets/Screenshot (1).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
34
gmtk_2024/temp_assets/Screenshot (1).png.import
Normal file
34
gmtk_2024/temp_assets/Screenshot (1).png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bsu1bvlb0s8dp"
|
||||
path="res://.godot/imported/Screenshot (1).png-26ba2769ce1c9804975484893473fb3a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://temp_assets/Screenshot (1).png"
|
||||
dest_files=["res://.godot/imported/Screenshot (1).png-26ba2769ce1c9804975484893473fb3a.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
BIN
gmtk_2024/temp_assets/background_commision.png
Normal file
BIN
gmtk_2024/temp_assets/background_commision.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
34
gmtk_2024/temp_assets/background_commision.png.import
Normal file
34
gmtk_2024/temp_assets/background_commision.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cyealb63c8uqg"
|
||||
path="res://.godot/imported/background_commision.png-3f6004e5239a2c4eb926ce75331cca04.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://temp_assets/background_commision.png"
|
||||
dest_files=["res://.godot/imported/background_commision.png-3f6004e5239a2c4eb926ce75331cca04.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
BIN
gmtk_2024/temp_assets/player.png
Normal file
BIN
gmtk_2024/temp_assets/player.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
34
gmtk_2024/temp_assets/player.png.import
Normal file
34
gmtk_2024/temp_assets/player.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b6gxkpy33b88g"
|
||||
path="res://.godot/imported/player.png-f011f11e1b5afaa2c3b0bec051759309.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://temp_assets/player.png"
|
||||
dest_files=["res://.godot/imported/player.png-f011f11e1b5afaa2c3b0bec051759309.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
Loading…
Add table
Reference in a new issue