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-gabriel-thiago/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-gabriel-thiago/capa.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

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

[deps]

source_file="res://microjogos/2023S1/projeto-gabriel-thiago/capa.png"
dest_files=["res://.godot/imported/capa.png-303a31206fbe376beede96120760e450.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
Binary file not shown.
1 change: 1 addition & 0 deletions microjogos/2023S1/projeto-gabriel-thiago/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
168 changes: 168 additions & 0 deletions microjogos/2023S1/projeto-gabriel-thiago/cenas/main.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
[gd_scene load_steps=18 format=3 uid="uid://bgmkhysifpd0v"]

[ext_resource type="Script" uid="uid://b7fd0jij0dlo0" path="res://microjogos/2023S1/projeto-gabriel-thiago/cenas/scripts/main.gd" id="1_t115o"]
[ext_resource type="Texture2D" uid="uid://b0iihu1ksrv0h" path="res://microjogos/2023S1/projeto-gabriel-thiago/recursos/bg.png" id="2_5oi6b"]
[ext_resource type="Texture2D" uid="uid://dpurvvi16n3he" path="res://microjogos/2023S1/projeto-gabriel-thiago/recursos/gol.png" id="3_eas3m"]
[ext_resource type="Script" uid="uid://bai8vh01fkw2q" path="res://microjogos/2023S1/projeto-gabriel-thiago/cenas/scripts/mira.gd" id="4_gwpxb"]
[ext_resource type="Texture2D" uid="uid://7ww15f6fooqn" path="res://microjogos/2023S1/projeto-gabriel-thiago/recursos/mira.png" id="4_r2nd0"]
[ext_resource type="Texture2D" uid="uid://dhwk81b4kqh4s" path="res://microjogos/2023S1/projeto-gabriel-thiago/recursos/Alvo.png" id="5_tcs7e"]
[ext_resource type="Texture2D" uid="uid://od3rn7ismgg6" path="res://microjogos/2023S1/projeto-gabriel-thiago/recursos/bola.png" id="6_kwu5m"]
[ext_resource type="Script" uid="uid://be7c1btc4sn5b" path="res://microjogos/2023S1/projeto-gabriel-thiago/cenas/scripts/alvo.gd" id="7_0mdnu"]
[ext_resource type="Script" uid="uid://b23f0bkttjiwg" path="res://microjogos/2023S1/projeto-gabriel-thiago/cenas/scripts/bola.gd" id="7_keca1"]
[ext_resource type="PackedScene" uid="uid://4a8sqqgp1gx6" path="res://principal/cenas/autoloads/NotificationCenter.tscn" id="10_l6u6n"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_b6aj7"]
size = Vector2(758, 256)

[sub_resource type="CircleShape2D" id="CircleShape2D_u10hv"]
radius = 31.6372

[sub_resource type="CircleShape2D" id="CircleShape2D_xmxhb"]
radius = 70.0

[sub_resource type="Animation" id="Animation_svgvd"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Spritebola:scale:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(6.10771, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Spritebola:scale:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(5.64, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:scale")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(1, 1)]
}

[sub_resource type="Animation" id="Animation_yqhhf"]
resource_name = "chutei"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:scale")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.0333333, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(1, 1), Vector2(0.5, 0.5)]
}

[sub_resource type="Animation" id="Animation_mf3j8"]
resource_name = "idle"
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Spritebola:scale:x")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(6.10771, -0.25, 0, 0.25, 0, 6.10771, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 1)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Spritebola:scale:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(5.64, -0.25, 0, 0.25, 0, 5.64, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 1)
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_gmjl0"]
_data = {
&"RESET": SubResource("Animation_svgvd"),
&"chutei": SubResource("Animation_yqhhf"),
&"idle": SubResource("Animation_mf3j8")
}

[node name="Main" type="Node2D"]
script = ExtResource("1_t115o")
metadata/_edit_vertical_guides_ = [0.0, -270.0]
metadata/_edit_horizontal_guides_ = [682.0]

[node name="Fundo" type="Sprite2D" parent="."]
texture_filter = 3
position = Vector2(960, 540)
scale = Vector2(15, 8.4375)
texture = ExtResource("2_5oi6b")

[node name="gol" type="Area2D" parent="."]
position = Vector2(960, 600)

[node name="SpriteGol" type="Sprite2D" parent="gol"]
texture_filter = 3
scale = Vector2(0.645847, 0.43345)
texture = ExtResource("3_eas3m")

[node name="CollisionShape2D" type="CollisionShape2D" parent="gol"]
shape = SubResource("RectangleShape2D_b6aj7")

[node name="mira" type="Sprite2D" parent="."]
z_index = 1
position = Vector2(960, 600)
scale = Vector2(0.15, 0.15)
texture = ExtResource("4_r2nd0")
script = ExtResource("4_gwpxb")

[node name="alvo" type="Area2D" parent="."]
script = ExtResource("7_0mdnu")

[node name="Spritealvo" type="Sprite2D" parent="alvo"]
scale = Vector2(0.13991, 0.135303)
texture = ExtResource("5_tcs7e")

[node name="CollisionAlvo" type="CollisionShape2D" parent="alvo"]
shape = SubResource("CircleShape2D_u10hv")

[node name="bola" type="CharacterBody2D" parent="."]
texture_filter = 3
position = Vector2(983.45, 931.76)
script = ExtResource("7_keca1")

[node name="Spritebola" type="Sprite2D" parent="bola"]
position = Vector2(4, 0)
scale = Vector2(6.10771, 5.64)
texture = ExtResource("6_kwu5m")

[node name="CollisionShape2D" type="CollisionShape2D" parent="bola"]
shape = SubResource("CircleShape2D_xmxhb")

[node name="AnimationPlayer" type="AnimationPlayer" parent="bola"]
libraries = {
&"": SubResource("AnimationLibrary_gmjl0")
}

[node name="NotificationCenter" parent="." instance=ExtResource("10_l6u6n")]

[connection signal="body_entered" from="alvo" to="bola" method="_atingiu_alvo"]
[connection signal="animation_finished" from="bola/AnimationPlayer" to="bola" method="_chute_finalizado"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends Area2D

var rng = RandomNumberGenerator.new()
# Called when the node enters the scene tree for the first time.
func _ready():
var numX = rng.randf_range(630,1290)
var numY = rng.randf_range(520,680)
position.x = numX
position.y = numY
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://be7c1btc4sn5b
31 changes: 31 additions & 0 deletions microjogos/2023S1/projeto-gabriel-thiago/cenas/scripts/bola.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
extends CharacterBody2D

@onready var mira = $"../mira"
var chegouMira = false;
var comecouMov = false;
var atingiu_alvo = false;

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if Input.is_action_pressed("acao"):
comecouMov = true
$AnimationPlayer.play("chutei")

if comecouMov == true:
position = lerp(position, mira.position, 0.3)


func _atingiu_alvo(body: Node2D) -> void:
atingiu_alvo = true

func _chute_finalizado(anim_name: StringName) -> void:
if atingiu_alvo:
$"../NotificationCenter".notify("GOLLLLLLLLLLLLLLLL!")
get_parent().register_win()
else:
match Global.language:
Global.LANGUAGE.EN:
$"../NotificationCenter".notify("MISS!")
Global.LANGUAGE.PT:
$"../NotificationCenter".notify("ERRROU!")
get_parent().register_lose()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://b23f0bkttjiwg
30 changes: 30 additions & 0 deletions microjogos/2023S1/projeto-gabriel-thiago/cenas/scripts/main.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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://b7fd0jij0dlo0
17 changes: 17 additions & 0 deletions microjogos/2023S1/projeto-gabriel-thiago/cenas/scripts/mira.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends Sprite2D

@export var speed = 500;
var lock_in = false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if not lock_in:
if Input.is_action_pressed("direita"):
position.x += 1*speed*delta
if Input.is_action_pressed("esquerda"):
position.x += -1*speed*delta
if Input.is_action_pressed("cima"):
position.y += -1*speed*delta
if Input.is_action_pressed("baixo"):
position.y += 1*speed*delta
if Input.is_action_pressed("acao"):
lock_in = true
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://bai8vh01fkw2q
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends RichTextLabel
@onready var animation_player = $AnimationPlayer


func notify(text):
text = "[center][shake rate=15 level=30]" + text
animation_player.play("zoom")
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://gtlpru2aiflc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Coloque seus scripts aqui!
23 changes: 23 additions & 0 deletions microjogos/2023S1/projeto-gabriel-thiago/creditos.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
extends Resource


# Este arquivo vai ser usado diretamente nos créditos do jogo! Dê crédito a todas as pessoaas que
# participaram da criação do jogo e a todos os recursos externos utilizados. Lembre que a fonte que
# será utilizada não suporte caracteres latinos como ~ ou ´


# Título do seu jogo
var title_pt = "Supa Fut"
var title_en = "Supa Fut"

# Detalhes dos créditos do seu jogo
var credits_pt = """
Criado por: [Gabriel & Thiago]

Você pode preencher o resto deste campo com creditos de assets utilizados, links para sua redes sociais ou qualquer outro detalhe que ache relevante
"""
var credits_en = """
Made by: [Gabriel & Thiago]

Fill this space with credits to used assets, links to your social medias and whatever other details you think are important
"""
1 change: 1 addition & 0 deletions microjogos/2023S1/projeto-gabriel-thiago/creditos.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://ismanerv3rp5
17 changes: 17 additions & 0 deletions microjogos/2023S1/projeto-gabriel-thiago/microgame.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[gd_resource type="Resource" script_class="MicrogameAsset" load_steps=4 format=3 uid="uid://coy3wtdgjafg0"]

[ext_resource type="Script" uid="uid://bus1nknp6xsc0" path="res://principal/microgame_asset.gd" id="1_0xdho"]
[ext_resource type="Texture2D" uid="uid://cpgaa248l72wi" path="res://microjogos/2023S1/projeto-gabriel-thiago/capa.png" id="1_7rebr"]
[ext_resource type="PackedScene" uid="uid://bgmkhysifpd0v" path="res://microjogos/2023S1/projeto-gabriel-thiago/cenas/main.tscn" id="2_7rebr"]

[resource]
script = ExtResource("1_0xdho")
cover = ExtResource("1_7rebr")
title_pt = &"Supa Fut"
title_en = &"Supa Fut"
credits_pt = "Criado por: [Gabriel & Thiago]"
credits_en = "Made by: [Gabriel & Thiago]"
start_message_pt = &"FACA O GOL!"
start_message_en = &"MAKE THE GOAL!"
main_scene = ExtResource("2_7rebr")
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-gabriel-thiago/recursos/Alvo.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dhwk81b4kqh4s"
path="res://.godot/imported/Alvo.png-0b13d43899340a6dd2c79bcf161461b8.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://microjogos/2023S1/projeto-gabriel-thiago/recursos/Alvo.png"
dest_files=["res://.godot/imported/Alvo.png-0b13d43899340a6dd2c79bcf161461b8.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