Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions GUI/TimesSavedMayuri.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[gd_scene format=3 uid="uid://boom77xx6tgwd"]

[node name="TimesSavedMayuri" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2

[node name="Label" type="Label" parent="."]
layout_mode = 0
offset_right = 1153.0
offset_bottom = 92.0
theme_override_font_sizes/font_size = 70
text = "Times saved Mayuri:"
17 changes: 17 additions & 0 deletions GUI/times_saved_mayuri.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends Control

@export var timesSavedMayuri: int = 0

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
$Label.text = "Times Saved Mayuri: "+str(timesSavedMayuri)
pass


func _on_mayuri_saved_mayuri() -> void:
timesSavedMayuri += 1
pass # Replace with function body.
1 change: 1 addition & 0 deletions GUI/times_saved_mayuri.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://dnlqmlsbdf81q
6 changes: 6 additions & 0 deletions Images/icon.svg.import
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ dest_files=["res://.godot/imported/icon.svg-b7ee14c4fc7622c16acfaa49648fa144.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
Expand Down
Binary file added Images/mad scientist.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions Images/mad scientist.jpg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://c603velf6orgn"
path="res://.godot/imported/mad scientist.jpg-def1cac3029160b1f2c5c21b4aebf101.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Images/mad scientist.jpg"
dest_files=["res://.godot/imported/mad scientist.jpg-def1cac3029160b1f2c5c21b4aebf101.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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
Binary file added Images/mayuri.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions Images/mayuri.jpg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://eebiu55j62fl"
path="res://.godot/imported/mayuri.jpg-522442b33201b6312dd5fa1310f32990.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://Images/mayuri.jpg"
dest_files=["res://.godot/imported/mayuri.jpg-522442b33201b6312dd5fa1310f32990.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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
21 changes: 21 additions & 0 deletions Mayuri/Mayuri.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[gd_scene load_steps=4 format=3 uid="uid://cbx0yhwl5jmq7"]

[ext_resource type="Script" uid="uid://cj5ov5sg41e2j" path="res://Mayuri/mayuri.gd" id="1_mda05"]
[ext_resource type="Texture2D" uid="uid://eebiu55j62fl" path="res://Images/mayuri.jpg" id="1_nvte1"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_1xjg7"]
size = Vector2(58, 76)

[node name="Mayuri" type="Area2D"]
script = ExtResource("1_mda05")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-0.2499981, 0)
shape = SubResource("RectangleShape2D_1xjg7")

[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(0.37500012, -0.5000019)
scale = Vector2(0.30283505, 0.2961538)
texture = ExtResource("1_nvte1")

[connection signal="savedMayuri" from="." to="." method="_on_saved_mayuri"]
31 changes: 31 additions & 0 deletions Mayuri/mayuri.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
extends Area2D


@export var spawnArea: Rect2 = Rect2(Vector2(0, 0), Vector2(1100, 650))
@export var pickupScene: PackedScene
signal savedMayuri
@onready var gui = get_node("/root/World/TimesSavedMayuri")
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
connect("body_entered", Callable(self, "_on_body_entered"))

func spawn_pickup():
var pickup = pickupScene.instantiate()
var pos = Vector2(
randf_range(spawnArea.position.x, spawnArea.position.x + spawnArea.size.x),
randf_range(spawnArea.position.y, spawnArea.position.y + spawnArea.size.y)
)
pickup.connect("savedMayuri", Callable(gui, "_on_mayuri_saved_mayuri"))
pickup.pickupScene = pickupScene
pickup.position = pos
get_parent().call_deferred("add_child", pickup)



func _on_body_entered(body):
if body.name == "Player":
queue_free()
spawn_pickup()
emit_signal("savedMayuri")


1 change: 1 addition & 0 deletions Mayuri/mayuri.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://cj5ov5sg41e2j
16 changes: 10 additions & 6 deletions Player/Player.tscn
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
[gd_scene load_steps=4 format=3 uid="uid://bp5bv2g1ydavl"]

[ext_resource type="Script" path="res://Player/player.gd" id="1_yg0ns"]
[ext_resource type="Texture2D" uid="uid://vu0c2patvoh2" path="res://Images/Kurisu pfp.jpg" id="2_1ixda"]
[ext_resource type="Script" uid="uid://546ym7muel36" path="res://Player/player.gd" id="1_yg0ns"]
[ext_resource type="Texture2D" uid="uid://c603velf6orgn" path="res://Images/mad scientist.jpg" id="2_q3lat"]

[sub_resource type="CircleShape2D" id="CircleShape2D_y60p4"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_q3lat"]
size = Vector2(9.099999, 12.1)

[node name="Player" type="CharacterBody2D"]
script = ExtResource("1_yg0ns")

[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.5, 0.5)
texture = ExtResource("2_1ixda")
position = Vector2(17.625, 19.599998)
scale = Vector2(0.49054056, 0.44411764)
texture = ExtResource("2_q3lat")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
shape = SubResource("CircleShape2D_y60p4")
position = Vector2(17.5, 19.499998)
scale = Vector2(10, 10)
shape = SubResource("RectangleShape2D_q3lat")
13 changes: 12 additions & 1 deletion Player/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@ extends CharacterBody2D
#please look away pretty please; this is far later
#Also advance programmers: Hello!!!
#I'm only taking the most optimal answer: GLGL
# movement by bung1r. And also chatgpt. But mostly me.

@export var speed = 500
func get_input():
var input_direction = Input.get_vector("left", "right", "up", "down")
velocity = input_direction * speed
return velocity

func _physics_process(delta: float) -> void:
pass
var vel = get_input() * delta
var collision = move_and_collide(vel)
if collision:
print("Collided with: ", collision.get_collider())

#this is your only hint and also use docs ;)
24 changes: 23 additions & 1 deletion World/World.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
[gd_scene load_steps=2 format=3 uid="uid://bxass6jkvmten"]
[gd_scene load_steps=6 format=3 uid="uid://bxass6jkvmten"]

[ext_resource type="PackedScene" uid="uid://bp5bv2g1ydavl" path="res://Player/Player.tscn" id="1_c5kd8"]
[ext_resource type="PackedScene" uid="uid://cbx0yhwl5jmq7" path="res://Mayuri/Mayuri.tscn" id="2_y6flb"]
[ext_resource type="PackedScene" uid="uid://boom77xx6tgwd" path="res://GUI/TimesSavedMayuri.tscn" id="3_il6x7"]
[ext_resource type="Script" uid="uid://dnlqmlsbdf81q" path="res://GUI/times_saved_mayuri.gd" id="4_o14yy"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_y6flb"]
size = Vector2(1151, 651)

[node name="World" type="Node2D"]

[node name="Player" parent="." instance=ExtResource("1_c5kd8")]
position = Vector2(524, 265)

[node name="Mayuri" parent="." instance=ExtResource("2_y6flb")]
position = Vector2(395, 273)
pickupScene = ExtResource("2_y6flb")

[node name="Area2D" type="Area2D" parent="."]

[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
visible = false
position = Vector2(575.5, 325.5)
shape = SubResource("RectangleShape2D_y6flb")

[node name="TimesSavedMayuri" parent="." instance=ExtResource("3_il6x7")]
script = ExtResource("4_o14yy")

[connection signal="savedMayuri" from="Mayuri" to="TimesSavedMayuri" method="_on_mayuri_saved_mayuri"]
27 changes: 27 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,33 @@ folder_colors={
"res://World/": "green"
}

[input]

left={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, 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)
]
}
up={
"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":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
, 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":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
down={
"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":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
, 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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
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)
, 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":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}

[rendering]

renderer/rendering_method="gl_compatibility"
Expand Down