Merge pull request 'Book_Movement: Implement a character with a basic movement system and a double jump' (#5) from Book_Movement into dev
Reviewed-on: https://code.booklordofthe.dev///Booklordofthedings/GMTK-2024/pulls/5
This commit is contained in:
commit
7e9578e93a
12 changed files with 240 additions and 0 deletions
4
game_ideas.txt
Normal file
4
game_ideas.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Scaling the tower
|
||||||
|
you are scaled down inside of a pc (maybe a virus)
|
||||||
|
you must scale (climb) things (files, folders) to infect them
|
||||||
|
you have the ability to scale/manipulate things with the mouse cursor
|
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")
|
20
gmtk_2024/plaB470.tmp
Normal file
20
gmtk_2024/plaB470.tmp
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://cfnmiqovwwhry"]
|
||||||
|
|
||||||
|
[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 = 17.0
|
||||||
|
height = 42.0
|
||||||
|
|
||||||
|
[node name="Player" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
|
||||||
|
script = ExtResource("1_otvu6")
|
||||||
|
speed = 340
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
|
||||||
|
texture = ExtResource("2_d4ig1")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||||
|
shape = SubResource("CapsuleShape2D_jqi2f")
|
20
gmtk_2024/player.tscn
Normal file
20
gmtk_2024/player.tscn
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://cfnmiqovwwhry"]
|
||||||
|
|
||||||
|
[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 = 16.0
|
||||||
|
height = 32.0
|
||||||
|
|
||||||
|
[node name="Player" type="Node2D"]
|
||||||
|
|
||||||
|
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
|
||||||
|
script = ExtResource("1_otvu6")
|
||||||
|
speed = 340
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
|
||||||
|
texture = ExtResource("2_d4ig1")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
|
||||||
|
shape = SubResource("CapsuleShape2D_jqi2f")
|
|
@ -11,10 +11,37 @@ config_version=5
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="GMTK_2024"
|
config/name="GMTK_2024"
|
||||||
|
run/main_scene="res://levels/TestingRoom.tscn"
|
||||||
config/features=PackedStringArray("4.3", "GL Compatibility")
|
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||||
config/icon="res://icon.svg"
|
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={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
player_left={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
player_jump={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
renderer/rendering_method="gl_compatibility"
|
renderer/rendering_method="gl_compatibility"
|
||||||
renderer/rendering_method.mobile="gl_compatibility"
|
renderer/rendering_method.mobile="gl_compatibility"
|
||||||
|
2d/snap/snap_2d_transforms_to_pixel=true
|
||||||
|
|
37
gmtk_2024/scripts/player_movement.gd
Normal file
37
gmtk_2024/scripts/player_movement.gd
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
extends CharacterBody2D
|
||||||
|
|
||||||
|
@export var speed = 50
|
||||||
|
@export var gravity = 50
|
||||||
|
@export var jump = 700
|
||||||
|
|
||||||
|
var max_jumps = 2;
|
||||||
|
var jumpcount = 2;
|
||||||
|
|
||||||
|
var input_direction = 0
|
||||||
|
|
||||||
|
func get_input():
|
||||||
|
var left = Input.is_action_pressed("player_left")
|
||||||
|
var right = Input.is_action_pressed("player_right")
|
||||||
|
if left and right:
|
||||||
|
input_direction = input_direction
|
||||||
|
elif left:
|
||||||
|
input_direction = -1
|
||||||
|
elif right:
|
||||||
|
input_direction = 1
|
||||||
|
else :
|
||||||
|
input_direction = 0
|
||||||
|
|
||||||
|
|
||||||
|
velocity.x = input_direction * speed
|
||||||
|
if Input.is_action_just_pressed("player_jump") and jumpcount > 0:
|
||||||
|
velocity.y = -1 *jump
|
||||||
|
jumpcount = jumpcount-1
|
||||||
|
elif Input.is_action_pressed("player_jump"):
|
||||||
|
velocity.y += -1 * 20
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
if is_on_floor():
|
||||||
|
jumpcount = max_jumps
|
||||||
|
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