Skip to content

Commit ec229fa

Browse files
committed
New Backgrounds tests + Character Animation tests
1 parent 36f7e7e commit ec229fa

23 files changed

+230
-1
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This pack was made by solarProtagonist on itch.io under the cc-by-4.0 license was released for free. https://solarprotagonist.itch.io/beach-vacay-pack
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extends DialogicBackground
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://cco6lnrnldlut
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
[gd_scene load_steps=7 format=3 uid="uid://2mtksep7bcwv"]
2+
3+
[ext_resource type="Script" uid="uid://cco6lnrnldlut" path="res://FakeUnitTests/Assets/Backgrounds/industrial-custom-background.gd" id="1_oxdje"]
4+
[ext_resource type="Texture2D" uid="uid://bmvx75brxjgyy" path="res://FakeUnitTests/Assets/Backgrounds/layered-factory/skill-desc_0003_bg.png" id="2_vo7md"]
5+
[ext_resource type="Texture2D" uid="uid://bsb3vqmhpxmw2" path="res://FakeUnitTests/Assets/Backgrounds/layered-factory/skill-desc_0002_far-buildings.png" id="3_48iuv"]
6+
[ext_resource type="Script" uid="uid://jacockvscs2e" path="res://FakeUnitTests/Assets/Backgrounds/paralax-effect.gd" id="3_vo7md"]
7+
[ext_resource type="Texture2D" uid="uid://cuh4yuvq2pswa" path="res://FakeUnitTests/Assets/Backgrounds/layered-factory/skill-desc_0001_buildings.png" id="4_sglik"]
8+
[ext_resource type="Texture2D" uid="uid://cl8jdo8fycthe" path="res://FakeUnitTests/Assets/Backgrounds/layered-factory/skill-desc_0000_foreground.png" id="5_m28qo"]
9+
10+
[node name="Control" type="Control"]
11+
layout_mode = 3
12+
anchors_preset = 15
13+
anchor_right = 1.0
14+
anchor_bottom = 1.0
15+
grow_horizontal = 2
16+
grow_vertical = 2
17+
script = ExtResource("1_oxdje")
18+
19+
[node name="TextureRect" type="TextureRect" parent="."]
20+
texture_filter = 1
21+
texture_repeat = 1
22+
layout_mode = 1
23+
anchors_preset = 15
24+
anchor_right = 1.0
25+
anchor_bottom = 1.0
26+
offset_left = -44.0
27+
offset_top = -44.0
28+
offset_right = 44.0
29+
offset_bottom = 44.0
30+
grow_horizontal = 2
31+
grow_vertical = 2
32+
texture = ExtResource("2_vo7md")
33+
expand_mode = 1
34+
script = ExtResource("3_vo7md")
35+
paralax_strength = 5
36+
37+
[node name="TextureRect2" type="TextureRect" parent="."]
38+
texture_filter = 1
39+
texture_repeat = 1
40+
layout_mode = 1
41+
anchors_preset = 15
42+
anchor_right = 1.0
43+
anchor_bottom = 1.0
44+
offset_left = -28.0
45+
offset_top = 113.0
46+
offset_right = 28.0
47+
offset_bottom = 18.0
48+
grow_horizontal = 2
49+
grow_vertical = 2
50+
texture = ExtResource("3_48iuv")
51+
expand_mode = 1
52+
script = ExtResource("3_vo7md")
53+
paralax_strength = 15
54+
55+
[node name="TextureRect3" type="TextureRect" parent="."]
56+
texture_filter = 1
57+
texture_repeat = 1
58+
layout_mode = 1
59+
anchors_preset = 15
60+
anchor_right = 1.0
61+
anchor_bottom = 1.0
62+
offset_left = -243.0
63+
offset_top = 250.0
64+
offset_right = -513.0
65+
offset_bottom = -248.0
66+
grow_horizontal = 2
67+
grow_vertical = 2
68+
scale = Vector2(1.80192, 2.54167)
69+
texture = ExtResource("4_sglik")
70+
expand_mode = 1
71+
stretch_mode = 1
72+
script = ExtResource("3_vo7md")
73+
paralax_strength = 30
74+
75+
[node name="TextureRect4" type="TextureRect" parent="."]
76+
texture_filter = 1
77+
texture_repeat = 1
78+
layout_mode = 1
79+
anchors_preset = 15
80+
anchor_right = 1.0
81+
anchor_bottom = 1.0
82+
offset_left = -401.0
83+
offset_top = 391.0
84+
offset_right = -457.0
85+
offset_bottom = -153.0
86+
grow_horizontal = 2
87+
grow_vertical = 2
88+
scale = Vector2(2.99154, 2.99154)
89+
texture = ExtResource("5_m28qo")
90+
stretch_mode = 1
91+
script = ExtResource("3_vo7md")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CC0 by ansimuz at https://opengameart.org/content/industrial-parallax-background
Loading
Loading
Loading
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
extends TextureRect
2+
3+
## Script that adds a paralax effect, depending on the mouse position
4+
5+
## The strength of the effect
6+
@export var paralax_strength := 50
7+
## If true, the movement is inverted
8+
@export var invert := false
9+
10+
## Makes it so original position is respected
11+
var original_position := Vector2()
12+
13+
14+
func _ready() -> void:
15+
original_position = position
16+
17+
18+
func _process(delta:float) -> void:
19+
## Calculate the mouse_offset from the center
20+
## ranging from (-1 | -1) to (1 | 1)
21+
var relative_mouse_offset: Vector2 = get_global_mouse_position() / Vector2(get_viewport().size) - Vector2.ONE
22+
if invert:
23+
relative_mouse_offset *= -1
24+
25+
## Lerp the position to avoid instant changes
26+
position = lerp(position, original_position + relative_mouse_offset * paralax_strength, delta*10)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://jacockvscs2e

FakeUnitTests/t2_characters.dtl

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
This timeline tests character events (join, update, leave) and various portrait setups/actions.
22
It will describe the desired effect, then do it.
33

4+
label Positions
45
[i]Join a character with it's default portrait at position "left"
56
join TC3_BasicPortraits left
67

@@ -41,4 +42,80 @@ leave TC3_BasicPortraits
4142
[i]Leave all characters (bounce out).
4243
leave --All-- [animation="Bounce Out" wait="true"]
4344

45+
label In/Out Animations
46+
[i]Testing all the built-in animations.
47+
- Start
48+
- Skip
49+
jump after_animations
50+
51+
Fade In [aa=0]
52+
join TC3_BasicPortraits center [animation="Fade In" wait="true"]
53+
Fade Out [aa=0]
54+
leave TC3_BasicPortraits [animation="Fade In" wait="true"]
55+
56+
Fade In Up [aa=0]
57+
join TC3_BasicPortraits center [animation="Fade In Up" wait="true"]
58+
Fade Out Down [aa=0]
59+
leave TC3_BasicPortraits [animation="Fade Out Down" wait="true"]
60+
61+
Fade In Down [aa=0]
62+
join TC3_BasicPortraits center [animation="Fade In Down" wait="true"]
63+
Fade Out Up [aa=0]
64+
leave TC3_BasicPortraits [animation="Fade Out Up" wait="true"]
65+
66+
Instant In [aa=0]
67+
join TC3_BasicPortraits center [animation="Instant In" wait="true"]
68+
[wait time="0.5" hide_text="false"]
69+
Instant Out [aa=0]
70+
leave TC3_BasicPortraits [animation="Instant Out" wait="true"]
71+
72+
Slide In Up [aa=0]
73+
join TC3_BasicPortraits center [animation="Slide In Up" wait="true"]
74+
Slide Out Down [aa=0]
75+
leave TC3_BasicPortraits [animation="Slide Out Down" wait="true"]
76+
77+
Slide In Down [aa=0]
78+
join TC3_BasicPortraits center [animation="Slide In Down" wait="true"]
79+
Slide Out Up [aa=0]
80+
leave TC3_BasicPortraits [animation="Slide Out Up" wait="true"]
81+
82+
Slide From Left [aa=0]
83+
join TC3_BasicPortraits center [animation="Slide From Left" wait="true"]
84+
Slide To Left [aa=0]
85+
leave TC3_BasicPortraits [animation="Slide To Left" wait="true"]
86+
87+
Slide From Right [aa=0]
88+
join TC3_BasicPortraits center [animation="Slide From Right" wait="true"]
89+
Slide To Right [aa=0]
90+
leave TC3_BasicPortraits [animation="Slide To Right" wait="true"]
91+
92+
Zoom In [aa=0]
93+
join TC3_BasicPortraits center [animation="Zoom In" wait="true"]
94+
Zoom Out [aa=0]
95+
leave TC3_BasicPortraits [animation="Zoom Out" wait="true"]
96+
97+
Zoom Center In [aa=0]
98+
join TC3_BasicPortraits center [animation="Zoom Center In" wait="true"]
99+
Zoom Center Out [aa=0]
100+
leave TC3_BasicPortraits [animation="Zoom Center Out" wait="true"]
101+
102+
Bounce In [aa=0]
103+
join TC3_BasicPortraits center [animation="Bounce In" wait="true"]
104+
Bounce Out [aa=0]
105+
leave TC3_BasicPortraits [animation="Bounce Out" wait="true"]
106+
107+
join TC3_BasicPortraits center [animation="Instant" wait="true"]
108+
Tada [aa=0]
109+
update TC3_BasicPortraits [animation="Tada" wait="true"]
110+
Bounce [aa=0]
111+
update TC3_BasicPortraits [animation="Bounce" wait="true"]
112+
Heartbeat [aa=0]
113+
update TC3_BasicPortraits [animation="Heartbeat" wait="true"]
114+
ShakeX [aa=0]
115+
update TC3_BasicPortraits [animation="Shake X" wait="true"]
116+
ShakeY [aa=0]
117+
update TC3_BasicPortraits [animation="Shake Y" wait="true"]
118+
leave TC3_BasicPortraits [animation="Instant Out" wait="true"]
119+
120+
label after_animations
44121
jump t0_overview/

FakeUnitTests/t7_backgrounds.dtl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
This timeline tests backgrounds within timelines.
2+
3+
[i]Test using a color
4+
[background arg="pink" fade="0.0"]
5+
6+
[i]Test using a simple image
7+
[background arg="res://FakeUnitTests/Assets/Backgrounds/Beach/BG Beach day.jpg" fade="0.75" transition="Simple Fade"]
8+
9+
[i]Test all transitions.
10+
[background arg="res://FakeUnitTests/Assets/Backgrounds/Beach/BG Beach eve.jpg" fade="0.75" transition="Push Right"]
11+
Push Right [aa=1]
12+
[background arg="res://FakeUnitTests/Assets/Backgrounds/Beach/BG Beach night.jpg" fade="0.75" transition="Push Left"]
13+
Push Left [aa=1]
14+
[background arg="res://FakeUnitTests/Assets/Backgrounds/Beach/BG Beach eve.jpg" fade="0.75" transition="Push Down"]
15+
Push Down [aa=1]
16+
[background arg="res://FakeUnitTests/Assets/Backgrounds/Beach/BG Beach night.jpg" fade="0.75" transition="Push Up"]
17+
Push Up [aa=1]
18+
[background arg="res://FakeUnitTests/Assets/Backgrounds/Beach/BG Beachhut day.jpg" fade="0.75" transition="Swipe Left To Right"]
19+
Swipe Left to Right [aa=1]
20+
[background arg="res://FakeUnitTests/Assets/Backgrounds/Beach/BG Beachhut night on.jpg" fade="0.75" transition="Swipe Right to Left"]
21+
Push Left [aa=1]
22+
[background arg="res://FakeUnitTests/Assets/Backgrounds/Beach/BG Beachhut eve.jpg" fade="0.75" transition="Swipe Diagonal Up Left"]
23+
Push Left [aa=1]
24+
25+
[i] End of background tests.
26+
jump t0_overview/

FakeUnitTests/t7_backgrounds.dtl.uid

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
uid://djntqbevoviar

export_presets.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ custom_features=""
99
export_filter="all_resources"
1010
include_filter=""
1111
exclude_filter=""
12-
export_path="../dialogic-web-export-test/windows_pre16_test_export_A.exe"
12+
export_path="../Dialogic-Test-Project-Exports/windows_pre17_test_export_A.exe"
13+
patches=PackedStringArray()
1314
encryption_include_filters=""
1415
encryption_exclude_filters=""
16+
seed=0
1517
encrypt_pck=false
1618
encrypt_directory=false
1719
script_export_mode=1

project.godot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ directories/dtl_directory={
147147
"t4_styles": "res://FakeUnitTests/t4_styles.dtl",
148148
"t5_various_events": "res://FakeUnitTests/t5_various_events.dtl",
149149
"t6_audio": "res://FakeUnitTests/t6_audio.dtl",
150+
"t7_backgrounds": "res://FakeUnitTests/t7_backgrounds.dtl",
150151
"vn_beginning": "res://VisualNovel/Timelines/vn_beginning.dtl",
151152
"vn_chapter1": "res://VisualNovel/Timelines/vn_chapter1.dtl",
152153
"vn_ending": "res://VisualNovel/Timelines/vn_ending.dtl"

0 commit comments

Comments
 (0)