-
Notifications
You must be signed in to change notification settings - Fork 0
/
makegames.html
449 lines (420 loc) · 22.1 KB
/
makegames.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mode to Code | Make Games</title>
<script src="https://unpkg.com/split-type"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
<link rel="stylesheet" href="/src/input.css" />
<link href="./src/output.css" rel="stylesheet" />
<link rel="icon" href="../img/modetocodelogo.png" />
<link rel="stylesheet" href="src/styles.css" />
<script src="./src/homejs.js"></script>
<link rel="stylesheet" href="./src/makeavideogamestyle.css" />
</head>
<style>
html,
body {
overflow-x: clip;
overscroll-behavior-x: none;
/* Prevent horizontal scrolling */
/* overflow-y: auto; */
/* Ensure vertical scrolling when necessary */
height: auto;
width: 100%;
}
</style>
<body class="bg-primary font-customFont text-white no-scrollbar m-0 p-0 w-full">
<div class="background-picture z-50">
<header class="text-center top-0 z-50" >
<nav class="flex items-center w-full justify-evenly">
<div class="nav-links md:static absolute top-0 pt-10 pb-10 md:w-auto w-full flex items-center mx-auto">
<ul id="learnStuff"
class="hidden md:flex flex-row text-3xl justify-evenly text-center items-center gap-x-[6vw]">
<li>
<a href="https://modetocode.com"
class="hidden md:flex lg:text-5xl text-3xl relative giveUnderline text-center text-white"
style="
text-shadow: 1px 1px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Mode to Code
</a>
</li>
<li>
<a class="lg:text-3xl text-xl relative giveUnderline" href="/learnai" style="
text-shadow: 1px 1px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">Learn AI</a>
</li>
<li>
<p class="lg:text-3xl text-xl relative text-gray-500 hover:cursor-default" style="
text-shadow: 1px 1px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Make Games
</p>
</li>
<li>
<a class="lg:text-3xl text-xl relative giveUnderline" href="https://modetocode.com/buildwebsites" style="
text-shadow: 1px 1px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">Build Websites</a>
</li>
</ul>
</div>
<div class="flex justify-between items-center w-full md:w-auto pt-5 pb-5">
<a href="https://modetocode.com" class="text-3xl mx-12 md:hidden">Mode to Code</a>
<button id="hamburger" class="text-6xl cursor-pointer mr-12 md:hidden">
☰
</button>
</div>
</nav>
<!-- Mobile Menu -->
<section id="mobile-menu"
class="absolute animate-open-menu bg-gradient-to-br from-primary from-50% to-blue-500 w-full text-5xl flex-col top-0 justify-start origin-top hidden">
<button class="text-6xl self-end px-6 pt-5 mr-12">
×
</button>
<nav class="text-[40px] flex flex-col min-h-screen text-left py-8 px-16" aria-label="mobile">
<a href="https://modetocode.com" class="w-full py-6 hover:text-accent border-t-2 border-white">Home</a>
<a href="https://modetocode.com/learnai" class="w-full py-6 hover:text-accent border-t-2 border-white">Learn AI</a>
<a href="https://modetocode.com/makegames" class="w-full py-6 hover:text-accent border-t-2 border-white">Make Games</a>
<a href="https://modetocode.com/buildwebsites" class="w-full py-6 hover:text-accent border-y-2 border-white hover:cursor-pointer">Build Websites</a>
</nav>
</section>
</header>
<div class="flex items-center justify-center h-[75vh] relative hidden-on-mobile" >
<div
class="flex flex-center md:pt-[25vh] pt-[20vh] lg:text-center text-left flex-col mb-[60vh] items-center ml-12 absolute top-1">
<h1 class="md:text-6xl text-5xl tracking-tighter mr-4 md:text-center text-left">
Start learning to<span id="typewriter" style="
background: linear-gradient(
120deg,
rgb(233, 169, 86),
rgb(107, 107, 236)
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: none;
"></span><span class="blink-cursor" style="
background: linear-gradient(
-180deg,
rgb(233, 169, 86),
rgb(107, 107, 236)
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: none;
">|</span>
</h1>
<p class="lg:text-3xl text-2xl pt-[50px] left-0">
Learn to make your own video games using Python!
</p>
</div>
</div>
</div>
<main class="w-full bg-gradient-to-br from-primary from-20% to-primary via-blue-900">
<div class="md:flex-none stepContainer z-0 w-full relative overflow-hidden">
<!-- SVG Background -->
<svg class="lg:inline-block overflow-hidden hidden absolute z-1 top-0 left-0 h-auto w-full m-0 p-0"
viewBox="0 0 1356 1585" fill="none" preserveAspectRatio="xMidYMax meet">
<path
d="M5.5 5.5C741.1 73.1 1100.33 161.667 1188 197.5C1220.17 209.333 1313.22 245.366 1343 333.5C1380 443 1267.5 515 1188 533L282.5 727C234.833 744.167 140.6 801.4 145 893C149.4 984.6 238.5 1015.83 282.5 1020L1188 1157.5C1253 1168 1368 1177 1343 1348C1316.85 1526.85 416.333 1570.67 0.5 1579.5"
stroke="white" stroke-width="10" />
</svg>
<!-- Big Cards -->
<div class="hidden lg:block">
<!-- Card 1 -->
<div class="text-white card pt-[10rem] md:mr-[50%] md:w-[50%] w-[75%] my-12 mx-12 shadow-lg relative z-10"
style="
--background-image: url('../img/programmingwithcomputer.webp');
">
<div class="card-content p-[1.5em]">
<h2 class="lg:text-3xl text-2xl card-title relative max-w-[100%]" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Step 1: Learn the Basics
</h2>
<p class="lg:pr-[15%] pr-0 lg:text-xl text-lg py-4" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Python is a coding language that is easy to learn and is used by
many programmers. I highly recommend starting with Khan Academy,
a free, online learning platform.
</p>
<a href="https://www.khanacademy.org/computing/intro-to-python-fundamentals" target="_blank">
<button
class="text-white border-4 md:px-6 px-2 py-1 rounded-lg border-white transition-all ease-linear duration-200 hover:shadow-2xl bg-transparent hover:scale-[105%]">
Try it out!
</button>
</a>
</div>
</div>
<!-- Card 2 -->
<div class="text-white card pt-[10rem] md:w-[50%] w-[75%] my-12 md:mr-12 ml-auto shadow-lg relative z-10"
style="--background-image: url('../img/backgroundcoding.jpg')">
<div class="card-content p-[1.5em]">
<h2 class="lg:text-3xl text-2xl card-title relative max-w-[100%]" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Step 2: Bro Code Python Course
</h2>
<p class="pr-[15%] text-xl py-4" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
This is an excellent course that will teach you more of the
basics while also giving you great projects to work on!
</p>
<a href="https://youtube.com/playlist?list=PLZPZq0r_RZOOkUQbat8LyQii36cJf2SWT&si=SCJsO8HqhKSgQ2iL"
target="_blank">
<button
class="text-white border-4 md:px-6 px-2 py-1 rounded-lg border-white transition-all ease-linear duration-200 hover:shadow-2xl bg-transparent hover:scale-[105%]">
Watch Now!
</button>
</a>
</div>
</div>
<!-- Card 3 -->
<div class="text-white card pt-[10rem] md:mr-[50%] md:w-[50%] w-[75%] my-12 mx-12 shadow-lg relative z-10"
style="
--background-image: url('../img/anothercoolcomputerimage.webp');
">
<div class="card-content p-[1.5em]">
<h2 class="lg:text-3xl text-2xl card-title relative max-w-[100%]" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Step 3: Practice Problems
</h2>
<p class="lg:pr-[15%] pr-0 lg:text-xl text-lg py-4" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Once you feel like you've mastered the basics, try out these
free logic problems in python!
</p>
<a href="https://codingbat.com/python" target="_blank">
<button
class="text-white border-4 md:px-6 px-2 py-1 rounded-lg border-white transition-all ease-linear duration-200 hover:shadow-2xl bg-transparent hover:scale-[105%]">
Start practicing!
</button>
</a>
</div>
</div>
<!-- Card 4 -->
<div class="text-white card pt-[10rem] md:w-[50%] w-[75%] my-12 md:mr-12 ml-auto shadow-lg relative z-10"
style="
--background-image: url('../img/Screenshot 2024-09-04 at 1.20.50 PM.png');
background-position: bottom center;">
<div class="card-content p-[1.5em]">
<h2 class="lg:text-3xl text-2xl card-title relative max-w-[100%]" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;">
Step 4: Free Code Camp Pygame
</h2>
<p class="pr-[15%] text-xl py-4" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;">
At this point, you should have the basics down and are ready to
make your own games. This excellent tutorial will help you make
your own platformer in python!
</p>
<a href="https://www.youtube.com/watch?v=6gLeplbqtqg" target="_blank">
<button
class="text-white border-4 md:px-6 px-2 py-1 rounded-lg border-white transition-all ease-linear duration-200 hover:shadow-2xl bg-transparent hover:scale-[105%]">
Watch Now!
</button>
</a>
</div>
</div>
</div>
<!-- Little Cards -->
<div class="lg:hidden flex flex-col items-center w-full">
<!-- Card 1 -->
<div class="text-white card pt-[10rem] w-[90%] my-12 mx-12 shadow-lg relative z-10" style="
--background-image: url('../img/programmingwithcomputer.webp');
">
<div class="card-content p-[1.5em]">
<h2 class="lg:text-3xl text-2xl card-title relative max-w-[100%]" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Step 1: Learn the Basics
</h2>
<p class="lg:pr-[15%] pr-0 lg:text-xl text-lg py-4" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Python is a coding language that is easy to learn and is used by
many programmers. I highly recommend starting with Khan Academy,
a free, online learning platform.
</p>
<a href="https://www.khanacademy.org/computing/intro-to-python-fundamentals" target="_blank">
<button
class="text-white border-4 md:px-6 px-2 py-1 rounded-lg border-white transition-all ease-linear duration-200 hover:shadow-2xl bg-transparent hover:scale-[105%]">
Try it out!
</button>
</a>
</div>
</div>
<!-- Card 2 -->
<div class="text-white card pt-[10rem] w-[90%] my-12 mx-12 shadow-lg relative z-10"
style="--background-image: url('../img/backgroundcoding.jpg')">
<div class="card-content p-[1.5em]">
<h2 class="lg:text-3xl text-2xl card-title relative max-w-[100%]" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Step 2: Bro Code Python Course
</h2>
<p class="pr-[15%] py-4 text-xl" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
This is an excellent course that will teach you more of the
basics while also giving you great projects to work on!
</p>
<a href="https://youtube.com/playlist?list=PLZPZq0r_RZOOkUQbat8LyQii36cJf2SWT&si=SCJsO8HqhKSgQ2iL"
target="_blank">
<button
class="text-white border-4 md:px-6 px-2 py-1 rounded-lg border-white transition-all ease-linear duration-200 hover:shadow-2xl bg-transparent hover:scale-[105%]">
Watch Now!
</button>
</a>
</div>
</div>
<!-- Card 3 -->
<div class="text-white card pt-[10rem] w-[90%] my-12 mx-12 shadow-lg relative z-10" style="
--background-image: url('../img/anothercoolcomputerimage.webp');
">
<div class="card-content p-[1.5em]">
<h2 class="lg:text-3xl text-2xl card-title relative max-w-[100%]" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Step 3: Practice Problems
</h2>
<p class="pr-[15%] py-4 text-xl" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Once you feel like you've mastered the basics, try out these
free logic problems in python!
</p>
<a href="https://codingbat.com/python" target="_blank">
<button
class="text-white border-4 md:px-6 px-2 py-1 rounded-lg border-white transition-all ease-linear duration-200 hover:shadow-2xl bg-transparent hover:scale-[105%]">
Start practicing!
</button>
</a>
</div>
</div>
<!-- Card 4 -->
<div class="text-white card pt-[10rem] w-[90%] my-12 mx-12 shadow-lg relative z-10" style="
--background-image: url('../img/Screenshot 2024-09-04 at 1.20.50 PM.png');
background-position: bottom center;
">
<div class="card-content p-[1.5em]">
<h2 class="lg:text-3xl text-2xl card-title relative max-w-[100%]" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
Step 4: Free Code Camp Pygame
</h2>
<p class="pr-[15%] text-xl py-4" style="
text-shadow: 2px 2px 0 black, -1px -1px 0 black,
1px -1px 0 black, -1px 1px black;
">
At this point, you should have the basics down and are ready to
make your own games. This excellent tutorial will help you make
your own platformer in python!
</p>
<a href="https://www.youtube.com/watch?v=6gLeplbqtqg" target="_blank">
<button
class="text-white border-4 md:px-6 px-2 py-1 rounded-lg border-white transition-all ease-linear duration-200 hover:shadow-2xl bg-transparent hover:scale-[105%]">
Watch Now!
</button>
</a>
</div>
</div>
</div>
</div>
</main>
<hr class="hrBlack" />
<footer class="">
<div
class="text-white flex flex-col md:flex-row justify-center items-center mb-10 mt-3 gap-x-16 gap-y-4 sm:flex-col">
<a href="https://modetocode.com">
<h1 class="hover:text-gray-500 hover:cursor-pointer">Home</h1>
</a>
<a href="https://modetocode.com#aboutMode">
<h1 class="hover:text-gray-500 hover:cursor-pointer">About Us</h1>
</a>
<a href="https://modetocode.com#contactUs">
<h1 class="hover:text-gray-500 hover:cursor-pointer">
Contact Us
</h1>
</a>
<h1 class="dateCopyright"></h1>
</div>
</footer>
<script src="./src/index.js"></script>
<script>
// Typewriter effect
let sleepTime = 100;
const el = document.getElementById("typewriter");
const phrase = " make video games";
const sleep = (ms) => {
return new Promise((resolve) => setTimeout(resolve, ms));
};
const writeLoop = async () => {
await sleep(1000);
for (let i = 0; i < phrase.length; i++) {
el.innerText = phrase.substring(0, i + 1);
await sleep(sleepTime);
}
};
writeLoop();
let path = document.querySelector("path");
let pathLength = path.getTotalLength();
path.style.strokeDasharray = pathLength + " " + pathLength;
path.style.strokeDashoffset = pathLength;
window.addEventListener("scroll", () => {
let scrollPercentage =
(document.documentElement.scrollTop + document.body.scrollTop) /
(document.documentElement.scrollHeight -
document.documentElement.clientHeight);
let drawLength = pathLength * scrollPercentage;
path.style.strokeDashoffset = pathLength - drawLength;
});
document.addEventListener("DOMContentLoaded", function () {
const navbar = document.getElementById("homeNavBar");
const body = document.body;
window.addEventListener("scroll", function () {
if (window.scrollY > 50) {
navbar.classList.add(
"bg-primary",
"transition",
"duration-500",
"ease-in-out"
);
// body.classList.add('bg-blue-900');
} else {
navbar.classList.remove(
"bg-primary",
"transition",
"duration-500",
"ease-in-out"
);
}
});
});
</script>
</body>
</html>