Skip to content

Commit 1e90bdd

Browse files
committed
global balancing
1 parent 488c36b commit 1e90bdd

File tree

4 files changed

+30
-25
lines changed

4 files changed

+30
-25
lines changed

content/setting/animation.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Nodes:
1212
sprite: idle2.png
1313
sizeFactor: 2
1414
tileCount: 14
15-
framerate: 8
15+
framerate: 7
1616
loop: true
1717
AnimationNode:
1818
name: sleep
1919
sprite: sleep.png
2020
sizeFactor: 2
2121
tileCount: 6
22-
framerate: 6
22+
framerate: 4
2323
loop: true
2424
GrabNode:
2525
name: grab
@@ -75,9 +75,9 @@ Transitions:
7575
to: grab
7676
RandomDelayTransition:
7777
from: idle1
78-
to: [walk, jump, sleep, fly]
79-
duration: 3000
80-
interval: 1000
78+
to: [walk, walk, jump, sleep]
79+
duration: 4000
80+
interval: 2000
8181
IsNotGroundedTransition:
8282
from: idle1
8383
to: air
@@ -86,8 +86,8 @@ Transitions:
8686
to: grab
8787
RandomDelayTransition:
8888
from: idle2
89-
to: [walk, jump, sleep, fly]
90-
duration: 3000
89+
to: [walk, jump, jump, fly]
90+
duration: 2000
9191
interval: 1000
9292
IsNotGroundedTransition:
9393
from: idle2
@@ -101,8 +101,8 @@ Transitions:
101101
RandomDelayTransition:
102102
from: walk
103103
to: [idle1, idle2]
104-
duration: 3000
105-
interval: 500
104+
duration: 2000
105+
interval: 1000
106106
TouchScreenEdgeTransition:
107107
from: fly
108108
to: [idle1, idle2]
@@ -112,8 +112,8 @@ Transitions:
112112
RandomDelayTransition:
113113
from: fly
114114
to: [idle1, idle2]
115-
duration: 5000
116-
interval: 1000
115+
duration: 6000
116+
interval: 2000
117117
StartLeftClicTransition:
118118
from: jump
119119
to: grab
@@ -135,5 +135,5 @@ Transitions:
135135
RandomDelayTransition:
136136
from: sleep
137137
to: [idle1, idle2]
138-
duration: 9000
139-
interval: 1000
138+
duration: 30000
139+
interval: 15000

content/setting/setting.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ Physic:
77
Friction: 0.85 # [0, 1] : 0 no friction, 1 max friction
88
GravityX: 0
99
GravityY: 9.81
10-
Bounciness: 0.7 # [0, 1] : 0 no bounciness, 1 full energie restitution
10+
Bounciness: 0.6 # [0, 1] : 0 no bounciness, 1 full energie restitution
1111
ContinuousCollisionMaxVelocity: 40 # min 0
12-
FootBasementWidth: 4 # min 2
12+
FootBasementWidth: 6 # min 2
1313
FootBasementHeight: 2 # min 2
1414
CollisionPixelRatioStopMovement: 0.3 # min 0, max 1. Ratio of pixel with collision to detect a real collision
1515
IsGroundedDetection: 1.0 # min 0
16-
InputReleaseImpulse: 3.0 # min 0
16+
InputReleaseImpulse: 1.0 # min 0. Velocity factor after release the pet
1717
GamePlay:
18-
CoyoteTimeCursorMovement: 0.1 # min 0
18+
CoyoteTimeCursorMovement: 0.05 # min 0. Record duration of the velocity before released the pet to preserve velocity with the mouse movement
1919
Window:
2020
ShowFrameBufferBackground: false
21-
UseForwardWindow: true
22-
ShowWindow: false
23-
UseMousePassThoughWindow: true
21+
UseForwardWindow: true # Define if the application should be displayed in forground
22+
ShowWindow: false # Display the window edge or not
23+
UseMousePassThoughWindow: true # Define if user can selection pet only with selected pixel or with the entire windows
2424
Debug:
25-
ShowEdgeDetection: false
25+
ShowEdgeDetection: false # Debug mode to display the result of the collision alogyrthm on the entire window

include/Engine/TimeManager.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ class TimeManager
5858
m_timerQueue.emplace(functionToExecute, delay, delay + datas.timeAcc, isLooping);
5959
}
6060

61+
void setFrameRate(int FPS)
62+
{
63+
m_fixedDeltaTime = 1. / FPS;
64+
}
65+
6166
void update(std::function<void(double deltaTime)> unlimitedUpdateFunction,
6267
std::function<void(double deltaTime)> limitedUpdateFunction)
6368
{

include/Game/Pet.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class NeedUpdator
117117
NeedUpdator(GameData& datas, DialoguePopUp& dialoguePopup, UtilitySystem& utilitySystem)
118118
: m_datas{datas}, m_dialoguePopup{dialoguePopup}, m_utilitySystem{utilitySystem}
119119
{
120-
nexTimeDisplayPopup = randNum(5000, 10000) / 1000.f;
120+
nexTimeDisplayPopup = randNum(10000, 30000) / 1000.f;
121121
}
122122

123123
void update(float deltaTime)
@@ -131,7 +131,7 @@ class NeedUpdator
131131
m_dialoguePopup.display(1.f, EPopupType::Dialogue, ENeed::Angry);
132132
displayPopupCurrentTimer = 0;
133133
lastNeed = currentNeedIndex;
134-
nexTimeDisplayPopup = randNum(5000, 10000) / 1000.f;
134+
nexTimeDisplayPopup = randNum(10000, 30000) / 1000.f;
135135
}
136136
else
137137
{
@@ -140,7 +140,7 @@ class NeedUpdator
140140
if (displayPopupCurrentTimer > nexTimeDisplayPopup)
141141
{
142142
displayPopupCurrentTimer -= nexTimeDisplayPopup;
143-
nexTimeDisplayPopup = randNum(5000, 10000) / 1000.f;
143+
nexTimeDisplayPopup = randNum(10000, 30000) / 1000.f;
144144
m_dialoguePopup.display(2.f, EPopupType::Dialogue, ENeed::Angry);
145145
}
146146
}
@@ -152,7 +152,7 @@ class NeedUpdator
152152
if (displayPopupCurrentTimer > nexTimeDisplayPopup)
153153
{
154154
displayPopupCurrentTimer -= nexTimeDisplayPopup;
155-
nexTimeDisplayPopup = randNum(5000, 10000) / 1000.f;
155+
nexTimeDisplayPopup = randNum(10000, 30000) / 1000.f;
156156
m_dialoguePopup.display(2.f, EPopupType::Dialogue, ENeed::Love);
157157
}
158158
}

0 commit comments

Comments
 (0)