Skip to content

Commit d5aa48a

Browse files
robertvokacclaude
andcommitted
Add: Simple3D project page and update Projects index
New page src/Projects/Simple3D/index.md covering the Simple3D C++23/Lua 3D/2D game framework with infobox, architecture diagram, quick-start C++ and Lua examples, module status table, and build instructions. Projects/index.md updated with Simple3D entry (table row + subpage link). Websites: simple3d.openeggbert.com / libsimple3d.com Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 79312b6 commit d5aa48a

4 files changed

Lines changed: 488 additions & 1 deletion

File tree

Projects/Simple3D/index.html

Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Open Eggbert - Simple3D</title>
7+
<base href="../.." target="_self">
8+
<link rel="stylesheet" href="styles.css">
9+
<link rel="icon" href="favicon.ico" type="image/x-icon" sizes="32x32">
10+
<script type="text/javascript" src="script.js"></script>
11+
</head>
12+
<body>
13+
<script>
14+
PAGE_CONFIG = {
15+
breadcrumb: [
16+
{label: "Projects", href: "Projects/index.html"},
17+
{label: "Simple3D", href: "Projects/Simple3D/index.html"}
18+
],
19+
subpages: [
20+
{label: "Go Up", href: "Projects/index.html"}
21+
]
22+
};
23+
</script>
24+
<main>
25+
<section>
26+
<h1>Simple3D</h1>
27+
<div id="tocButton"></div>
28+
<div id="toc"></div>
29+
<table class="infobox">
30+
<tr>
31+
<th colspan="2">Simple3D</th>
32+
</tr>
33+
<tr>
34+
<th>Website</th>
35+
<td><a href="https://simple3d.openeggbert.com" target="_blank">https://simple3d.openeggbert.com</a> | <a href="https://libsimple3d.com" target="_blank">https://libsimple3d.com</a></td>
36+
</tr>
37+
<tr>
38+
<th>Programming language</th>
39+
<td>C++</td>
40+
</tr>
41+
<tr>
42+
<th>C++ standard</th>
43+
<td>C++23</td>
44+
</tr>
45+
<tr>
46+
<th>Licence</th>
47+
<td>MIT</td>
48+
</tr>
49+
<tr>
50+
<th>Based on</th>
51+
<td><a href="https://github.com/u3d-community/U3D" target="_blank">Urho3D / U3D</a> (MIT, © 2008–2022 the Urho3D project)</td>
52+
</tr>
53+
<tr>
54+
<th>Scripting</th>
55+
<td>Lua / LuaJIT</td>
56+
</tr>
57+
<tr>
58+
<th>Physics</th>
59+
<td>Bullet (3D), Box2D (2D)</td>
60+
</tr>
61+
<tr>
62+
<th>Backends</th>
63+
<td>U3D (default), <a href="Projects/Nova3D/index.html">Nova3D</a></td>
64+
</tr>
65+
</table>
66+
67+
<p><strong>Simple3D</strong> is a clean, minimalistic 3D/2D game framework for C++23 and Lua. It wraps an Urho3D engine fork with a high-level, game-first API that exposes no engine internals. Subclass <code>Game</code>, override <code>Start()</code> and <code>Update()</code>, and ship — without needing to know anything about Urho3D's component model.</p>
68+
<p>Urho3D types (<code>Urho3D::Node</code>, <code>Urho3D::Scene</code>, <code>Urho3D::Application</code>) never appear in public headers. They are hidden behind PIMPL classes. The only exception is math primitives (<code>Vector2/3/4</code>, <code>Color</code>, <code>Quaternion</code>, <code>Matrix3/3x4/4</code>, <code>BoundingBox</code>, <code>Rect</code>) which are re-exported as <code>Simple3D::</code> type aliases.</p>
69+
<h2>Architecture</h2>
70+
<pre><code>Game Code (C++ / Lua)
71+
72+
Simple3D API ← stable public boundary; no engine types visible here
73+
74+
Urho3D fork (U3D) ← scene graph, physics, navigation, networking, Lua
75+
76+
XNA C++ runtime ← rendering, audio, input (Nova3D backend only)
77+
78+
Vulkan / GLES / bgfx ← GPU backends
79+
80+
SDL3 / OS ← windowing, events
81+
</code></pre>
82+
<h2>Quick start (C++)</h2>
83+
<pre><code class="language-cpp">#include &lt;Simple3D/Simple3D.h&gt;
84+
using namespace Simple3D;
85+
86+
class MyGame : public Game {
87+
public:
88+
Entity* player;
89+
Camera* camera;
90+
91+
void Start() override {
92+
auto ground = CreateEntity(&quot;Ground&quot;);
93+
ground-&gt;AddModel(&quot;models/ground.obj&quot;);
94+
ground-&gt;AddRigidBody(0.0f);
95+
ground-&gt;AddBoxCollider(Vector3(50, 1, 50));
96+
97+
player = CreateEntity(&quot;Player&quot;);
98+
player-&gt;AddModel(&quot;models/character.fbx&quot;);
99+
player-&gt;AddAnimationController();
100+
player-&gt;AddRigidBody(1.0f);
101+
player-&gt;AddCapsuleCollider(0.5f, 1.8f);
102+
player-&gt;SetPosition(0, 2, 0);
103+
player-&gt;AddScript(&quot;Scripts/player.lua&quot;);
104+
105+
camera = CreateCamera();
106+
camera-&gt;Follow(player, 6.0f);
107+
camera-&gt;SetSmoothFollow(true);
108+
109+
PlayMusic(&quot;Music/theme.ogg&quot;);
110+
}
111+
112+
void Update(float dt) override {
113+
if (IsKeyDown(Key::Escape)) Quit();
114+
}
115+
};
116+
117+
int main() {
118+
return CreateGame&lt;MyGame&gt;()-&gt;Run();
119+
}
120+
</code></pre>
121+
<h2>Lua scripting</h2>
122+
<p>Per-entity <code>.lua</code> scripts with <code>Start()</code>, <code>Update(dt)</code>, and <code>Stop()</code>. Hot-reloadable at runtime without recompiling the engine.</p>
123+
<pre><code class="language-lua">-- Scripts/player.lua
124+
speed = 6
125+
jumpForce = 8
126+
127+
function Update(dt)
128+
local move = Vector3(0, 0, 0)
129+
if Input:IsKeyDown(&quot;W&quot;) then move.z = move.z + 1 end
130+
if Input:IsKeyDown(&quot;S&quot;) then move.z = move.z - 1 end
131+
if Input:IsKeyDown(&quot;A&quot;) then move.x = move.x - 1 end
132+
if Input:IsKeyDown(&quot;D&quot;) then move.x = move.x + 1 end
133+
134+
if move:Length() &gt; 0 then
135+
entity:MoveRelative(move:Normalized() * speed * dt)
136+
entity:GetAnimationController():Play(&quot;run&quot;)
137+
else
138+
entity:GetAnimationController():Play(&quot;idle&quot;)
139+
end
140+
141+
if Input:IsKeyPressed(&quot;Space&quot;) and entity:IsOnGround() then
142+
entity:ApplyImpulse(Vector3(0, jumpForce, 0))
143+
PlaySound(&quot;Sounds/jump.wav&quot;)
144+
end
145+
end
146+
</code></pre>
147+
<h2>Module status</h2>
148+
<table>
149+
<thead>
150+
<tr>
151+
<th>Module</th>
152+
<th>Status</th>
153+
<th>Notes</th>
154+
</tr>
155+
</thead>
156+
<tbody>
157+
<tr>
158+
<td>Core</td>
159+
<td>✅ Task #1</td>
160+
<td>Game loop, types, keys, window</td>
161+
</tr>
162+
<tr>
163+
<td>Entity</td>
164+
<td>✅ Task #1</td>
165+
<td>PIMPL over Urho3D::Node</td>
166+
</tr>
167+
<tr>
168+
<td>Camera</td>
169+
<td>✅ Task #1</td>
170+
<td>Follow, LookAt, smooth, ortho</td>
171+
</tr>
172+
<tr>
173+
<td>Audio</td>
174+
<td>✅ Task #1</td>
175+
<td>PlayMusic, PlaySound, volume</td>
176+
</tr>
177+
<tr>
178+
<td>Input</td>
179+
<td>✅ Task #1</td>
180+
<td>Keyboard, mouse</td>
181+
</tr>
182+
<tr>
183+
<td>UI</td>
184+
<td>✅ Task #1</td>
185+
<td>Label (Text element)</td>
186+
</tr>
187+
<tr>
188+
<td>Physics</td>
189+
<td>🔄 Task #2</td>
190+
<td>Bullet via Urho3D</td>
191+
</tr>
192+
<tr>
193+
<td>Animation</td>
194+
<td>🔄 Task #2</td>
195+
<td>AnimationController</td>
196+
</tr>
197+
<tr>
198+
<td>Lua</td>
199+
<td>🔄 Task #3</td>
200+
<td>LuaScriptInstance + custom bindings</td>
201+
</tr>
202+
<tr>
203+
<td>Navigation</td>
204+
<td>📋 Task #5</td>
205+
<td>Recast/Detour via Urho3D</td>
206+
</tr>
207+
<tr>
208+
<td>Networking</td>
209+
<td>📋 Task #6</td>
210+
<td>ENet via Urho3D</td>
211+
</tr>
212+
<tr>
213+
<td>2D support</td>
214+
<td>📋 Task #7</td>
215+
<td>Sprites, orthographic camera</td>
216+
</tr>
217+
<tr>
218+
<td>Android</td>
219+
<td>📋 Task #8</td>
220+
<td>Nova3D backend</td>
221+
</tr>
222+
<tr>
223+
<td>Web</td>
224+
<td>📋 Task #9</td>
225+
<td>Emscripten</td>
226+
</tr>
227+
<tr>
228+
<td>Samples</td>
229+
<td>📋 Task #10–12</td>
230+
<td>Hello World, 3D platformer, 2D game</td>
231+
</tr>
232+
</tbody>
233+
</table>
234+
<h2>Build</h2>
235+
<h3>Prerequisites</h3>
236+
<ul>
237+
<li>CMake 3.21+</li>
238+
<li>C++23 compiler (GCC 13+, Clang 16+, MSVC 2022+)</li>
239+
<li>U3D built at <code>/rv/data/library/github.com/u3d-community/U3D/cmake-build-debug</code> (or set <code>URHO3D_HOME</code> / <code>U3D_HOME</code>)</li>
240+
</ul>
241+
<h3>U3D backend (default)</h3>
242+
<pre><code class="language-sh">cmake -S . -B build-u3d
243+
cmake --build build-u3d
244+
</code></pre>
245+
<h3>Nova3D backend</h3>
246+
<pre><code class="language-sh">cmake -S . -B build-nova3d -DSIMPLE3D_ENGINE=NOVA3D
247+
cmake --build build-nova3d
248+
</code></pre>
249+
<h3>Web (Emscripten)</h3>
250+
<pre><code class="language-sh">emcmake cmake -S . -B build-web -DSIMPLE3D_ENGINE=U3D
251+
cmake --build build-web
252+
</code></pre>
253+
<h3>Windows (MinGW cross-compile)</h3>
254+
<pre><code class="language-sh">cmake -S . -B build-windows \
255+
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/mingw-w64.cmake \
256+
-DSIMPLE3D_ENGINE=U3D
257+
cmake --build build-windows
258+
</code></pre>
259+
<h2>Platforms</h2>
260+
<p>Windows, Linux, macOS (via U3D + SDL 3). Android (Task #8, Nova3D backend). Web/Emscripten (Task #9).</p>
261+
<h2>Attribution</h2>
262+
<p>Simple3D is built on top of the Urho3D / U3D engine fork (MIT license). Math types are ABI-identical re-exports of Urho3D math. All adapted files carry the original Urho3D copyright notice.</p>
263+
<p>Copyright (c) 2008–2022 the Urho3D project. Copyright (c) 2024–2026 Robert Vokac and the Simple3D contributors.</p>
264+
</section>
265+
</main>
266+
267+
</body>
268+
</html>

Projects/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
{label: "MetaGL", href: "Projects/MetaGL/index.html"},
3232
{label: "MeshCraft", href: "Projects/MeshCraft/index.html"},
3333
{label: "Sprite Utils", href: "Projects/Sprite_Utils/index.html"},
34-
{label: "Youtube Frontend", href: "Projects/Youtube_Frontend/index.html"}
34+
{label: "Youtube Frontend", href: "Projects/Youtube_Frontend/index.html"},
35+
{label: "Simple3D", href: "Projects/Simple3D/index.html"}
3536
]
3637
};
3738
</script>
@@ -106,6 +107,12 @@ <h2>Active projects</h2>
106107
<td></td>
107108
</tr>
108109
<tr>
110+
<td><a href="Projects/Simple3D/index.html">Simple3D</a></td>
111+
<td><a href="https://simple3d.openeggbert.com">simple3d.openeggbert.com</a> / <a href="https://libsimple3d.com">libsimple3d.com</a></td>
112+
<td></td>
113+
<td>Clean C++23/Lua 3D/2D game framework built on Urho3D</td>
114+
</tr>
115+
<tr>
109116
<td><a href="Projects/EasyGL/index.html">EasyGL</a></td>
110117
<td><a href="https://easygl.openeggbert.com">easygl.openeggbert.com</a></td>
111118
<td></td>

0 commit comments

Comments
 (0)