Skip to content

Commit 5bf8692

Browse files
authored
fix project and upgrade bolt sdk (#29)
1 parent ab5bf4f commit 5bf8692

12 files changed

Lines changed: 204 additions & 149 deletions

File tree

.nvmrc

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

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ When you are ready to implement Bolt into your gaming SDK make sure to follow al
3333

3434
This project includes a Tilt configuration for easy local development. You have two options to start the development environment:
3535

36+
**Setup:**
37+
```
38+
cp client/.env.local.sample client/.env.local
39+
cp client/.env.staging.sample client/.env.staging
40+
41+
cp server/.env.local.sample server/.env.local
42+
cp server/.env.staging.sample server/.env.staging
43+
```
44+
3645
**Using script (uses Tilt):**
3746

3847
```bash

client/package-lock.json

Lines changed: 19 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@boltpay/bolt-js": "^0.2.2",
13+
"@boltpay/bolt-js": "^0.2.3",
1414
"@tanstack/query-async-storage-persister": "^5.83.0",
1515
"@tanstack/react-query": "^5.83.0",
1616
"@tanstack/react-query-persist-client": "^5.83.0",

client/src/app.css

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
.app-header h1 {
1515
background: var(--gradient-accent);
1616
background-clip: text;
17-
font-size: 3rem;
1817
font-weight: 700;
1918
margin-bottom: 0.5rem;
2019
position: relative;
@@ -35,7 +34,7 @@
3534
display: grid;
3635
gap: 2rem;
3736
grid-template-columns: 1fr 1fr;
38-
margin-bottom: 3rem;
37+
margin-top: 3rem;
3938
}
4039

4140
.demo-card {
@@ -111,13 +110,11 @@
111110

112111
.demo-button:hover {
113112
color: inherit;
114-
transform: translateY(2px);
115113
box-shadow: 0 4px 0 var(--color-tan-dark),
116114
0 6px 8px var(--color-shadow-medium), 0 0 20px var(--color-glow-accent);
117115
}
118116

119117
.demo-button:active {
120-
transform: translateY(4px);
121118
box-shadow: 0 2px 0 var(--color-tan-dark),
122119
0 4px 6px var(--color-shadow-medium);
123120
}
@@ -176,15 +173,6 @@
176173
grid-template-columns: 1fr;
177174
}
178175

179-
.app-header h1 {
180-
font-size: clamp(1.8rem, 5vw, 2.5rem);
181-
}
182-
183-
.index-page .app-header {
184-
padding: 3rem 1.5rem;
185-
margin: 1rem 0 2rem 0;
186-
}
187-
188176
.footer-content {
189177
flex-direction: column;
190178
gap: 1rem;
@@ -215,7 +203,6 @@
215203
/* Demo top bar styles */
216204
.demo-top-bar {
217205
background: #fefef9ab;
218-
border-bottom: 2px solid #e9ecef;
219206
padding-inline: 1rem;
220207
}
221208

@@ -280,10 +267,6 @@
280267
width: 1px;
281268
}
282269

283-
.demo-top-bar {
284-
padding: 0.5rem 1rem;
285-
}
286-
287270
.demo-tab {
288271
padding: 0.5rem 0.9rem;
289272
font-size: 0.8rem;
@@ -319,6 +302,7 @@
319302
flex-direction: column;
320303
position: relative;
321304
justify-content: center;
305+
padding: 0 1rem;
322306
}
323307

324308
.index-page::before {
@@ -350,6 +334,7 @@
350334
width: 100%;
351335
max-width: 1200px;
352336
margin: 0 auto;
337+
padding: 1rem 0;
353338
}
354339

355340
.nav-logo {
@@ -423,7 +408,6 @@
423408

424409
.nav-signin-btn:hover {
425410
background: var(--color-nav-text);
426-
transform: translateY(-1px);
427411
box-shadow: 0 3px 0 var(--color-nav-bg), 0 6px 12px rgba(139, 115, 85, 0.4);
428412
}
429413

@@ -457,18 +441,21 @@
457441

458442
/* Home page hero section styling */
459443
.index-page .app-header {
444+
position: absolute;
445+
top: 0;
446+
left: 0;
447+
right: 0;
460448
background: linear-gradient(
461449
135deg,
462450
rgba(245, 235, 220, 0.95) 0%,
463451
rgba(218, 204, 182, 0.9) 100%
464452
);
465-
padding: 4rem 2rem;
466-
margin: 2rem 0 3rem 0;
453+
width: 100%;
467454
backdrop-filter: blur(12px);
468455
border-bottom: 4px solid rgba(218, 204, 182, 0.7);
469456
box-shadow: 0 4px 20px rgba(139, 128, 110, 0.3);
470-
width: 100%;
471-
max-width: none;
457+
max-width: 100vw;
458+
box-sizing: border-box;
472459
}
473460

474461
.index-page .app-header h1 {
@@ -478,14 +465,12 @@
478465
-webkit-text-fill-color: transparent;
479466
text-shadow: 0 2px 0 rgba(139, 128, 110, 0.4),
480467
0 4px 8px rgba(139, 128, 110, 0.3);
481-
font-size: clamp(2.5rem, 6vw, 4.5rem);
482468
margin-bottom: 1rem;
483469
}
484470

485471
.index-page .app-header p {
486472
color: var(--color-text);
487473
text-shadow: 0 1px 2px rgba(245, 235, 220, 0.8);
488-
font-size: clamp(1.1rem, 2.5vw, 1.6rem);
489474
margin: 0;
490475
}
491476

client/src/components/TopNav.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ export function TopNav() {
1919
<div className="nav-brand">
2020
<Link to="/" className="nav-brand-link">
2121
<img src={GameLogo} alt="Game Logo" className="nav-logo" />
22-
<span className="mobile-hidden">Knights of Valor</span>
22+
Knights of Valor
2323
</Link>
2424
</div>
2525
<div className="nav-links mobile-hidden">
2626
<Link
2727
to="/store"
2828
className="nav-link"
29-
activeProps={{ className: "active" }}>
29+
activeProps={{ className: "active" }}
30+
>
3031
Shop
3132
</Link>
3233
<Link
3334
to="/game"
3435
className="nav-link"
35-
activeProps={{ className: "active" }}>
36+
activeProps={{ className: "active" }}
37+
>
3638
Game
3739
</Link>
3840
</div>

client/src/index.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,12 @@ button {
195195
}
196196

197197
button:hover:not(:disabled) {
198-
transform: translateY(2px);
198+
opacity: 0.8;
199199
box-shadow: 0 4px 0 var(--color-stone-dark),
200200
0 6px 8px var(--color-shadow-medium), 0 0 20px var(--color-glow-accent);
201201
}
202202

203203
button:active:not(:disabled) {
204-
transform: translateY(4px);
205204
box-shadow: 0 2px 0 var(--color-stone-dark),
206205
0 4px 6px var(--color-shadow-medium);
207206
}

client/src/pages/Game.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232
.game-controls-info {
3333
margin-top: 20px;
34-
text-align: center;
34+
font-size: 1.2rem;
35+
text-align: left;
3536
color: #666;
3637
font-family: Arial, sans-serif;
3738
}

client/src/pages/Game.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,12 @@ export default function Game() {
100100
// Main cactus body
101101
ctx.fillRect(obstacle.x, obstacle.y, obstacle.width, obstacle.height);
102102
// Spikes
103-
ctx.fillRect(obstacle.x - 3, obstacle.y + 10, 6, 3);
104-
ctx.fillRect(obstacle.x + 12, obstacle.y + 15, 6, 3);
103+
ctx.fillRect(obstacle.x - 6, obstacle.y + 10, 6, 3);
104+
ctx.fillRect(obstacle.x + 12, obstacle.y + 15, 9, 3);
105+
// circular top of cactus
106+
ctx.beginPath();
107+
ctx.arc(obstacle.x + 7.5, obstacle.y, 7.5, 0, 2 * Math.PI);
108+
ctx.fill();
105109
}
106110

107111
function drawGround() {
@@ -126,7 +130,7 @@ export default function Game() {
126130
function createObstacle(x: number) {
127131
return {
128132
x: x,
129-
y: GROUND_Y - 40,
133+
y: GROUND_Y - 20,
130134
width: 15,
131135
height: 40,
132136
};
@@ -228,7 +232,7 @@ export default function Game() {
228232
}
229233

230234
// Spawn obstacles
231-
if (obstacles.length === 0 || Math.random() < 0.003) {
235+
if (obstacles.length === 0 || Math.random() < 0.1) {
232236
if (
233237
obstacles.length === 0 ||
234238
canvas.width - obstacles[obstacles.length - 1].x >

0 commit comments

Comments
 (0)