Skip to content

Commit

Permalink
Merge pull request #129 from GameLab-UNIL-EPFL/brewgame
Browse files Browse the repository at this point in the history
First draft of the Brewing minigame
  • Loading branch information
dobios authored Apr 7, 2022
2 parents f5e91b3 + f4c058a commit 7e8c760
Show file tree
Hide file tree
Showing 13 changed files with 665 additions and 23 deletions.
Binary file added assets/06_UI_menus/Arrows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions db/dialogues/xml/Dialogues.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@
<text>mais vous pouvez aller regarder dans mes documents à l'étage.</text>
<text>Peut-être que vous trouverez ce que vous chercher.</text>
</dialogue>
<dialogue id="demandAngeliqueBad" ntargets="1" type="onDemand">
<text>Je n'ai pas envis de vous parler...</text>
<text>Vous avez raté ma bière et brûlé ma cuve.</text>
<text>Ça va me coûter cher en temps et en argent.</text>
<text>Allez embêter quelqu'un d'autre.</text>
</dialogue>
<dialogue id="demandAngeliqueGood" ntargets="1" type="onDemand">
<text>Merci beaucoup pour votre aide !</text>
<text>Ah mais je n'ai pas pris le temps de me présenter !</text>
<text>Je m'appelle Angélique Trüschel.</text>
<text>Avec mon mari, Conrad, nous sommes propriétaire de la brasserie.</text>
</dialogue>
<dialogue id="demandFille" ntargets="1" type="onDemand">
<text>Moi aussi j'aimerais aller en ville!</text>
</dialogue>
Expand Down
22 changes: 10 additions & 12 deletions scenes/Brasserie/Brasserie.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ polygon = PoolVector2Array( -226, 152, -208.061, 150.924, -208.061, 60.8586, -38
[node name="YSort" type="YSort" parent="."]

[node name="Player" parent="YSort" instance=ExtResource( 2 )]
position = Vector2( 269, 287 )
position = Vector2( 262, 284 )

[node name="Props" type="YSort" parent="YSort"]

Expand Down Expand Up @@ -1221,8 +1221,6 @@ shape = SubResource( 63 )

[node name="Adrienne" parent="YSort/NPC" instance=ExtResource( 8 )]
position = Vector2( 234, 144 )
collision_layer = 3
collision_mask = 3
ProbRight = 3
ProbLeft = 3
CanWander = true
Expand All @@ -1245,6 +1243,7 @@ parameters/playback = SubResource( 64 )
position = Vector2( 277, 241 )
DemandDialogueID = "demandAngelique"
HasAutoDialogue = false
isTrueschel = true

[node name="TextBox" parent="YSort/NPC/Angelique" index="0"]
NPCName = " Mme Trüschel "
Expand All @@ -1267,8 +1266,6 @@ parameters/playback = SubResource( 53 )

[node name="Jenny" parent="YSort/NPC" instance=ExtResource( 8 )]
position = Vector2( 137, 153 )
collision_layer = 3
collision_mask = 3
ProbRight = 3
ProbLeft = 3
CanWander = true
Expand Down Expand Up @@ -1324,7 +1321,7 @@ anims/WalkUp = SubResource( 18 )
[node name="AnimationTree" parent="YSort/NPC/Conrad" index="6"]
parameters/playback = SubResource( 55 )

[node name="Tonnelier" parent="YSort/NPC" instance=ExtResource( 8 )]
[node name="Brewer" parent="YSort/NPC" instance=ExtResource( 8 )]
position = Vector2( 530, 250 )
InitDir = 1
ProbRight = 0
Expand All @@ -1334,14 +1331,15 @@ WanderingCooldown = 10.0
WalkSpeed = 20
DemandDialogueID = "demandTonneliers"
HasAutoDialogue = false
isBrewer = true

[node name="TextBox" parent="YSort/NPC/Tonnelier" index="0"]
[node name="TextBox" parent="YSort/NPC/Brewer" index="0"]
NPCName = " M. Firstein "

[node name="FullyAnimated" parent="YSort/NPC/Tonnelier" index="2"]
[node name="FullyAnimated" parent="YSort/NPC/Brewer" index="2"]
texture = ExtResource( 12 )

[node name="AnimationPlayer" parent="YSort/NPC/Tonnelier" index="5"]
[node name="AnimationPlayer" parent="YSort/NPC/Brewer" index="5"]
anims/Idle = SubResource( 19 )
anims/IdleLeft = SubResource( 20 )
anims/IdleRight = SubResource( 21 )
Expand All @@ -1351,7 +1349,7 @@ anims/WalkLeft = SubResource( 24 )
anims/WalkRight = SubResource( 25 )
anims/WalkUp = SubResource( 26 )

[node name="AnimationTree" parent="YSort/NPC/Tonnelier" index="6"]
[node name="AnimationTree" parent="YSort/NPC/Brewer" index="6"]
parameters/playback = SubResource( 56 )

[node name="Brasseur" parent="YSort/NPC" instance=ExtResource( 8 )]
Expand Down Expand Up @@ -1576,8 +1574,8 @@ texture = ExtResource( 29 )
[editable path="YSort/NPC/Jenny/ListenBox"]
[editable path="YSort/NPC/Conrad"]
[editable path="YSort/NPC/Conrad/ListenBox"]
[editable path="YSort/NPC/Tonnelier"]
[editable path="YSort/NPC/Tonnelier/ListenBox"]
[editable path="YSort/NPC/Brewer"]
[editable path="YSort/NPC/Brewer/ListenBox"]
[editable path="YSort/NPC/Brasseur"]
[editable path="YSort/NPC/Brasseur/ListenBox"]
[editable path="YSort/NPC/Brasseur2"]
Expand Down
201 changes: 201 additions & 0 deletions scenes/Brasserie/BrewGame.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
[gd_scene load_steps=19 format=2]

[ext_resource path="res://assets/02_architecture/03_brewery/backGround.png" type="Texture" id=1]
[ext_resource path="res://assets/02_architecture/03_brewery/cuve.png" type="Texture" id=2]
[ext_resource path="res://src/BrewGame.cs" type="Script" id=3]
[ext_resource path="res://assets/02_architecture/03_brewery/wall.png" type="Texture" id=4]
[ext_resource path="res://assets/06_UI_menus/Arrows.png" type="Texture" id=5]
[ext_resource path="res://src/shaders/BrewGame.gdshader" type="Shader" id=7]

[sub_resource type="ShaderMaterial" id=7]
shader = ExtResource( 7 )
shader_param/burntColor = Plane( 0.3398, 0.23047, 0.10156, 0 )

[sub_resource type="AtlasTexture" id=13]
atlas = ExtResource( 5 )
region = Rect2( 1, 1, 13, 13 )

[sub_resource type="AtlasTexture" id=14]
atlas = ExtResource( 5 )
region = Rect2( 13.5, 1, 12, 13 )

[sub_resource type="AnimatedTexture" id=15]
frames = 2
fps = 2.0
frame_0/texture = SubResource( 13 )
frame_1/texture = SubResource( 14 )
frame_1/delay_sec = 0.0

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 9.5, 29.25 )

[sub_resource type="AtlasTexture" id=10]
atlas = ExtResource( 5 )
region = Rect2( 25.5, 1, 12, 13 )

[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 31.5, 9.5 )

[sub_resource type="AtlasTexture" id=11]
atlas = ExtResource( 5 )
region = Rect2( 73.5, 1, 12, 13 )

[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 31.5, 10.25 )

[sub_resource type="CircleShape2D" id=8]
radius = 2.37171

[sub_resource type="AtlasTexture" id=12]
atlas = ExtResource( 5 )
region = Rect2( 49.5, 1, 12, 13 )

[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 11.5, 28 )

[node name="BrewGame" type="Node2D"]
script = ExtResource( 3 )
MaxRotateSpeed = 7.0
MinRotateSpeed = 0.5
BoostErrorDecrement = 1.5
BurnThreshold = 2.0

[node name="BG" type="Sprite" parent="."]
position = Vector2( -25, -26 )
scale = Vector2( 3, 3 )
texture = ExtResource( 1 )

[node name="Beer" type="Sprite" parent="."]
position = Vector2( 320, 147 )
scale = Vector2( 4, 4 )
texture = ExtResource( 2 )
offset = Vector2( 0, 9 )

[node name="BeerBurnt" type="Sprite" parent="."]
modulate = Color( 1, 1, 1, 0 )
material = SubResource( 7 )
position = Vector2( 320, 147 )
scale = Vector2( 4, 4 )
texture = ExtResource( 2 )
offset = Vector2( 0, 9 )

[node name="arrowTop" type="Sprite" parent="."]
position = Vector2( 319, 46 )
scale = Vector2( 2, 2 )
texture = SubResource( 15 )

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

[node name="CollisionShape2D" type="CollisionShape2D" parent="arrowTop/Area2D"]
position = Vector2( -1.5, 19.25 )
shape = SubResource( 2 )

[node name="arrowLeft" type="Sprite" parent="."]
position = Vector2( 164, 150 )
scale = Vector2( 2, 2 )
texture = SubResource( 10 )

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

[node name="CollisionShape2D" type="CollisionShape2D" parent="arrowLeft/Area2D"]
position = Vector2( 21.5, 1 )
shape = SubResource( 3 )

[node name="arrowRight" type="Sprite" parent="."]
position = Vector2( 473, 149 )
scale = Vector2( 2, 2 )
texture = SubResource( 11 )

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

[node name="CollisionShape2D" type="CollisionShape2D" parent="arrowRight/Area2D"]
position = Vector2( -23.5, 1.75 )
shape = SubResource( 4 )

[node name="Stick" type="Sprite" parent="."]
position = Vector2( 317, 194 )
scale = Vector2( 4, 4 )
texture = ExtResource( 4 )
offset = Vector2( 0, -11 )

[node name="hideStick" type="ColorRect" parent="Stick"]
margin_left = -2.0
margin_right = 2.0
margin_bottom = 11.0
color = Color( 0.823529, 0.556863, 0.25098, 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="hideStickBurnt" type="ColorRect" parent="Stick"]
modulate = Color( 1, 1, 1, 0 )
margin_left = -2.0
margin_right = 2.0
margin_bottom = 11.0
color = Color( 0.482353, 0.32549, 0.14902, 1 )
__meta__ = {
"_edit_use_anchors_": false
}

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

[node name="CollisionShape2D" type="CollisionShape2D" parent="Stick/Area2D"]
shape = SubResource( 8 )

[node name="arrowBottom" type="Sprite" parent="."]
position = Vector2( 319, 246 )
scale = Vector2( 2, 2 )
texture = SubResource( 12 )

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

[node name="CollisionShape2D" type="CollisionShape2D" parent="arrowBottom/Area2D"]
position = Vector2( -1, -18 )
shape = SubResource( 5 )

[node name="Scoreboard" type="ColorRect" parent="."]
margin_left = 505.0
margin_top = 6.0
margin_right = 631.0
margin_bottom = 67.0
color = Color( 0.0431373, 0, 0, 1 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="ScoreText" type="Label" parent="Scoreboard"]
margin_left = 4.0
margin_top = 12.0
margin_right = 44.0
margin_bottom = 26.0
text = "Qualité:"

[node name="Score" type="Label" parent="Scoreboard"]
margin_left = 60.0
margin_top = 12.0
margin_right = 100.0
margin_bottom = 26.0
text = "100%"
__meta__ = {
"_edit_use_anchors_": false
}

[node name="TimeText" type="Label" parent="Scoreboard"]
margin_left = 4.0
margin_top = 33.0
margin_right = 44.0
margin_bottom = 47.0
text = "Temps: "
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Time" type="Label" parent="Scoreboard"]
margin_left = 60.0
margin_top = 33.0
margin_right = 100.0
margin_bottom = 47.0
text = "30s"
__meta__ = {
"_edit_use_anchors_": false
}
4 changes: 2 additions & 2 deletions scenes/Interaction/Menu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ __meta__ = {

[node name="Button" type="TextureButton" parent="."]
margin_left = 256.0
margin_top = 152.0
margin_top = 160.0
margin_right = 386.0
margin_bottom = 222.0
margin_bottom = 230.0
focus_mode = 0
enabled_focus_mode = 0
texture_normal = SubResource( 1 )
Expand Down
Loading

0 comments on commit 7e8c760

Please sign in to comment.