Skip to content

Commit

Permalink
feat: add neopeed to demos
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaysmito101 committed Feb 1, 2025
1 parent 9ae5743 commit d8ab1cd
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 0 deletions.
1 change: 1 addition & 0 deletions builds/neopeed/cglweb.js

Large diffs are not rendered by default.

Binary file added builds/neopeed/cglweb.wasm
Binary file not shown.
93 changes: 93 additions & 0 deletions builds/neopeed/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CGL-Web</title>
<style>
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
}
canvas {
border: 1px solid #000;
}
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}

canvas {
width: 100vmin;
height: 100vmin;
}

.window {
position: fixed;
top: 10px;
left: 10px;
width: 120px;
background: #1e1e1e;
padding: 15px;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
z-index: 9999;
text-align: center;
}
.window p {
font-size: 14px;
margin-bottom: 10px;
color: #bbb;
}
.options {
list-style: none;
padding: 0;
}
.options li {
background: #333;
padding: 10px;
margin: 5px 0;
border-radius: 6px;
text-align: center;
cursor: pointer;
transition: background 0.2s, transform 0.1s;
font-size: 14px;
}
.options li:hover {
background: #444;
transform: scale(1.05);
}
</style>
</head>
<body>
<canvas id="cglCanvas" width="800" height="600"></canvas>
<div class="window">
<p>Left/Right Arrow to move</p>
<p>Up/Down Arrow to change camera angle</p>
<p>R to restart after Game Over</p>
<p>Avoid the Red, Collect the Blue</p>
<p>NOTE: The Web version does not suppoer postprocessing(bloom & toon shading) so looks much shabbier than the native version</p>
</div>
<script>
var Module = {
onRuntimeInitialized: function () {
console.log("WASM Module Loaded");
},
canvas: document.getElementById("cglCanvas"),
};
</script>
<script src="./cglweb.js"></script>
</body>
</html>
Binary file added builds/neopeed/thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions db.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,18 @@
"published_date": "2024-02-01",
"author": "Jaysmito101",
"difficulty": 2
},
{
"name": "Neopeed",
"path": "builds/neopeed",
"source_code": "https://github.com/Jaysmito101/cgl/blob/main/examples/c/neopeed.c",
"tags": ["cgl", "game", "creative", "tutorial"],
"views": 121,
"description": "A full fledged infinite runner game made from scratch using CGL.",
"image": "builds/neopeed/thumb.png",
"published_date": "2024-02-02",
"author": "Jaysmito101",
"difficulty": 5
}

]

0 comments on commit d8ab1cd

Please sign in to comment.