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
Binary file added microjogos/2023S1/projeto-repasch/capa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions microjogos/2023S1/projeto-repasch/capa.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://caa1q03dyidpb"
path="res://.godot/imported/capa.png-f309beae62e08481a67b1d89a00eb762.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://microjogos/2023S1/projeto-repasch/capa.png"
dest_files=["res://.godot/imported/capa.png-f309beae62e08481a67b1d89a00eb762.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
1 change: 1 addition & 0 deletions microjogos/2023S1/projeto-repasch/cenas/cenas.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Coloque suas cenas aqui! A cena que vai rodar no jogo deve necessariamente ser a Main.tscn
65 changes: 65 additions & 0 deletions microjogos/2023S1/projeto-repasch/cenas/character.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[gd_scene load_steps=7 format=3 uid="uid://bvfmhfa5w11ii"]

[ext_resource type="Script" uid="uid://bmr76yqoy6naf" path="res://microjogos/2023S1/projeto-repasch/cenas/scripts/CharacterBody2D.gd" id="1_wsy62"]
[ext_resource type="Texture2D" uid="uid://7wx81h4e83ke" path="res://microjogos/2023S1/projeto-repasch/recursos/BearSprites.png" id="2_rxoup"]
[ext_resource type="Texture2D" uid="uid://wkgyjleyqief" path="res://microjogos/2023S1/projeto-repasch/recursos/01_dish.png" id="4_rxoup"]
[ext_resource type="AudioStream" uid="uid://ceudmjispmm4y" path="res://microjogos/2023S1/projeto-repasch/recursos/audio/nahtt-eat-323883.wav" id="5_bfs8s"]

[sub_resource type="CircleShape2D" id="CircleShape2D_4gnyf"]
radius = 83.7593

[sub_resource type="CircleShape2D" id="CircleShape2D_wsy62"]
radius = 117.507

[node name="CharacterBody2D" type="CharacterBody2D"]
collision_layer = 0
collision_mask = 0
script = ExtResource("1_wsy62")

[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 3
position = Vector2(6, 15)
scale = Vector2(8.038, 8.038)
texture = ExtResource("2_rxoup")
hframes = 2
vframes = 5

[node name="CollisionShape2D2" type="CollisionShape2D" parent="."]
scale = Vector2(0.8, 0.8)
shape = SubResource("CircleShape2D_4gnyf")
debug_color = Color(0.176471, 0.211765, 0.529412, 0.419608)

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

[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
scale = Vector2(0.8, 0.8)
shape = SubResource("CircleShape2D_wsy62")
debug_color = Color(0.176471, 0.211765, 0.529412, 0.419608)

[node name="Dishes" type="Node2D" parent="."]

[node name="Dish1" type="Sprite2D" parent="Dishes"]
visible = false
texture_filter = 3
position = Vector2(-1, 43)
scale = Vector2(3.7, 3.7)
texture = ExtResource("4_rxoup")

[node name="Dish2" type="Sprite2D" parent="Dishes"]
visible = false
texture_filter = 3
position = Vector2(0, 35)
scale = Vector2(3.65, 3.65)
texture = ExtResource("4_rxoup")

[node name="Dish3" type="Sprite2D" parent="Dishes"]
visible = false
texture_filter = 3
position = Vector2(-1, 27)
scale = Vector2(3.6, 3.6)
texture = ExtResource("4_rxoup")

[node name="Eat" type="AudioStreamPlayer" parent="."]
stream = ExtResource("5_bfs8s")

[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
17 changes: 17 additions & 0 deletions microjogos/2023S1/projeto-repasch/cenas/comida.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://bhipd001ykoxs"]

[ext_resource type="Script" uid="uid://bn0nt0b1ra8od" path="res://microjogos/2023S1/projeto-repasch/cenas/scripts/comida.gd" id="1_i4rde"]

[sub_resource type="CircleShape2D" id="CircleShape2D_xxofg"]
radius = 64.0002

[node name="Food" type="CharacterBody2D" groups=["food"]]
collision_mask = 0
script = ExtResource("1_i4rde")

[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 3
scale = Vector2(4, 4)

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_xxofg")
47 changes: 47 additions & 0 deletions microjogos/2023S1/projeto-repasch/cenas/main.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[gd_scene load_steps=7 format=3 uid="uid://bnvrhxe5qgcom"]

[ext_resource type="Script" uid="uid://bprec2y7wsddd" path="res://microjogos/2023S1/projeto-repasch/cenas/scripts/main.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://cy1witbvivusi" path="res://microjogos/2023S1/projeto-repasch/recursos/ShopBG_1920x1080px.png" id="2_y44f2"]
[ext_resource type="PackedScene" uid="uid://bvfmhfa5w11ii" path="res://microjogos/2023S1/projeto-repasch/cenas/character.tscn" id="3_y44f2"]
[ext_resource type="AudioStream" uid="uid://biqpr1y5bdjhc" path="res://microjogos/2023S1/projeto-repasch/recursos/audio/lofi_music_library-coffee-lofi-chill-lofi-ambient-458901.wav" id="5_s1mlw"]
[ext_resource type="Script" uid="uid://1rv5uobtiapg" path="res://microjogos/2023S1/projeto-repasch/cenas/scripts/spawn.gd" id="7_8y1mx"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_p2lsa"]
size = Vector2(20, 1080)

[node name="Main" type="Node2D"]
rotation = 0.00103196
script = ExtResource("1")

[node name="Background" type="Sprite2D" parent="."]
show_behind_parent = true
z_index = -5
position = Vector2(960, 540)
texture = ExtResource("2_y44f2")

[node name="CharacterBody2D" parent="." instance=ExtResource("3_y44f2")]
position = Vector2(190.911, 882.803)

[node name="LeftWall" type="StaticBody2D" parent="."]
position = Vector2(0, 540)

[node name="CollisionShape2D" type="CollisionShape2D" parent="LeftWall"]
shape = SubResource("RectangleShape2D_p2lsa")

[node name="RightWall" type="StaticBody2D" parent="."]
position = Vector2(1920, 540)

[node name="CollisionShape2D" type="CollisionShape2D" parent="RightWall"]
shape = SubResource("RectangleShape2D_p2lsa")

[node name="Spawner" type="Node2D" parent="."]
script = ExtResource("7_8y1mx")

[node name="Timer" type="Timer" parent="Spawner"]
autostart = true

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource("5_s1mlw")
autoplay = true

[connection signal="timeout" from="Spawner/Timer" to="Spawner" method="_on_timer_timeout"]
27 changes: 27 additions & 0 deletions microjogos/2023S1/projeto-repasch/cenas/scripts/CharacterBody2D.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
extends CharacterBody2D

var comi = 0
const SPEED = 500.0
func _ready() -> void:
$Sprite2D.frame = randi_range(0, 9)

func _physics_process(delta):
var dir = Vector2(Input.get_action_strength("direita") - Input.get_action_strength("esquerda"), 0)
$Sprite2D.flip_h = dir.x >= 0.0
velocity = dir * SPEED
move_and_slide()

func soma_comida():
comi += 1
match comi:
1: $Dishes/Dish1.visible = true
2: $Dishes/Dish2.visible = true
3:
$Dishes/Dish3.visible = true
get_parent().register_win()

func _on_area_2d_body_entered(body: Node2D) -> void:
if body.is_in_group("food"):
soma_comida()
body.queue_free()
$Eat.play()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://bmr76yqoy6naf
11 changes: 11 additions & 0 deletions microjogos/2023S1/projeto-repasch/cenas/scripts/comida.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends CharacterBody2D

@export var speed = 400;

func _ready() -> void:
velocity = Vector2.DOWN * speed

func _physics_process(delta):
move_and_slide()
if position.y >= 1100:
queue_free()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://bn0nt0b1ra8od
31 changes: 31 additions & 0 deletions microjogos/2023S1/projeto-repasch/cenas/scripts/main.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
extends Node2D

# Declaração dos sinais win e lose
signal win
signal lose

# Estas constantes são usadas para determinar o tamanho da tela do seu jogo. Por padrão, definem uma
# tela 1920x1080, que é padrão para monitores full HD. Caso você queira uma resolução menor para
# atingir uma estética mais pixelada, você pode mudar estes números para qualquer outra resolução
# 16:9
const WIDTH = 1920
const HEIGHT = 1080

# --------------------------------------------------------------------------------------------------
# CONDIÇÕES DE VITÓRIA
# --------------------------------------------------------------------------------------------------
# Quando o jogo começa, ela assume que o jogador não conseguiu vencer o jogo ainda, ou seja, se não
# acontecer nada, o jogador vai perder o jogo. A verificação se o jogador venceu o minigame é feita
# com base na emissão dos sinais "win" e "lose". Se "win" foi o último sinal emitido, o jogador
# vencerá o jogo, e se "lose" foi o último sinal emitido ou nenhum sinal foi emitido, o jogador
# perderá o jogo


# Chame esta função para registrar que o jogador venceu o jogo
func register_win():
emit_signal("win")


# Chame esta função para registrar que o jogador perdeu o jogo
func register_lose():
emit_signal("lose")
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://bprec2y7wsddd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Coloque seus scripts aqui!
43 changes: 43 additions & 0 deletions microjogos/2023S1/projeto-repasch/cenas/scripts/spawn.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
extends Node2D
@onready var food_scene = load("res://microjogos/2023S1/projeto-repasch/cenas/comida.tscn")
@onready var food_assets = [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace this by a sprite sheet load of all sprites

preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/10_baguette_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/16_burger_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/19_burrito_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/29_cookies_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/35_donut_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/39_friedegg_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/45_frenchfries_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/47_fruitcake_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/56_hotdog_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/66_loafbread_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/70_meatball_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/72_nacho_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/74_omlet_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/76_pudding_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/80_pancakes_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/82_pizza_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/86_roastedchicken_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/89_salmon_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/91_strawberrycake_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/93_sandwich_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/94_spaghetti.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/96_steak_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/98_sushi_dish.png"),
preload("res://microjogos/2023S1/projeto-repasch/recursos/foods/100_taco_dish.png"),
]
@onready var random = RandomNumberGenerator.new()
var last_spawn = 960
func _on_timer_timeout():
spawn()

func spawn():
var spawn_position = random.randf_range(40.0, 1800.0)
while abs(spawn_position - last_spawn) > 900 or abs(spawn_position - last_spawn) < 300:
spawn_position = random.randf_range(40.0, 1800.0)
last_spawn = spawn_position
var img_index = randi_range(0, len(food_assets)-1)
var food_instance : CharacterBody2D = food_scene.instantiate()
food_instance.position = Vector2(spawn_position, position.y)
food_instance.get_child(0).texture = food_assets[img_index]
add_child(food_instance)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://1rv5uobtiapg
33 changes: 33 additions & 0 deletions microjogos/2023S1/projeto-repasch/microgame.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[gd_resource type="Resource" script_class="MicrogameAsset" load_steps=4 format=3 uid="uid://ffpy4gbqfpx8"]

[ext_resource type="Script" uid="uid://bus1nknp6xsc0" path="res://principal/microgame_asset.gd" id="1_0u7mi"]
[ext_resource type="Texture2D" uid="uid://caa1q03dyidpb" path="res://microjogos/2023S1/projeto-repasch/capa.png" id="1_l15un"]
[ext_resource type="PackedScene" uid="uid://bnvrhxe5qgcom" path="res://microjogos/2023S1/projeto-repasch/cenas/main.tscn" id="2_l15un"]

[resource]
script = ExtResource("1_0u7mi")
cover = ExtResource("1_l15un")
title_pt = &"Bora Bandejar?"
title_en = &"Lets Bandejar?"
credits_pt = "Criado por: [Repasch Giao Colosimo]

- Artes:
https://florassence.itch.io/tiny-pixel-shop
https://ghostpixxells.itch.io/pixelfood

- Sons:
https://pixabay.com/music/lofi-coffee-lofi-chill-lofi-ambient-458901/
https://pixabay.com/sound-effects/people-eat-323883/"
credits_en = "Made by: [Repasch Giao Colosimo]

- Arts:
https://florassence.itch.io/tiny-pixel-shop
https://ghostpixxells.itch.io/pixelfood

- Sounds:
https://pixabay.com/music/lofi-coffee-lofi-chill-lofi-ambient-458901/
https://pixabay.com/sound-effects/people-eat-323883/"
start_message_pt = &"SE ALIMENTE!"
start_message_en = &"FEED YOURSELF!"
main_scene = ExtResource("2_l15un")
difficulty = 0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions microjogos/2023S1/projeto-repasch/recursos/01_dish.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://wkgyjleyqief"
path="res://.godot/imported/01_dish.png-76667aa7c7449351288812ceb5bf4c2d.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://microjogos/2023S1/projeto-repasch/recursos/01_dish.png"
dest_files=["res://.godot/imported/01_dish.png-76667aa7c7449351288812ceb5bf4c2d.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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions microjogos/2023S1/projeto-repasch/recursos/03_dish_pile.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dsjhn0pkltwtk"
path="res://.godot/imported/03_dish_pile.png-7e45bf2799320d7866d21cf90564ed39.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://microjogos/2023S1/projeto-repasch/recursos/03_dish_pile.png"
dest_files=["res://.godot/imported/03_dish_pile.png-7e45bf2799320d7866d21cf90564ed39.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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading