. : 3D Engine : .

Brand / IP

Nintendo, Super Mario

Tech

JavaScript, C++, Haxe, Kha, WebGL, OpenGL, AmmoJS, Bullet Physics, OGEX file format, Shader Model 450, Vulkan, SPIR-V

Span

1.5 Months

Live Demo (export):

Jump up and down various slopes -- can you balance on the nose of a dolphin?

Controls (Refresh if you get stuck):

KEY(S) EVENTS
WASD to move
ARROWS ^^^^^^^^^^^^^^^^^^^^^^^
Q&E rotate camera
F1 toggle FPS
O Jump
SPACEBAR ^^^^^^^^^^^^^^^^^^^^^^^
NUMPAD9 ^^^^^^^^^^^^^^^^^^^^^^^
LeftClick enter fullscreen mode
Esc exit fullscreen mode

Gameplay:

Game screenshot: water shader with low-poly Italian city.

Super jump (by holding the key) to far off destinations.

As of right now it's still very easy to get caught in the mesh and the 'R' key for reset doesn't quite work. Mainly because I'm building out a camera system in a different project and have not merged them yet.

Edited assets from Models-Resource.com

Development:

Game screenshot: 3D platforming on rooftops. Hills & terrain with a sewer & docks.

Often building out from tutorials and existing code causes sluggish performance. This engine in particular would freeze every few minutes for unknown reasons. Usually that can be traced to memory leaks and repeated calls in critical areas of the graphics pipeline(s).

After some debugging I located the main bottleneck in a repeated pipeline call in RenderTexture. By returning on Init, the problem was solved.

However, I enjoyed the project and so continued to tinker. Optimizing here. Cleaning-up and documenting there. Now nearly every file and line added has been modified, including the controls and jump physics.

Physics:

3D Game screenshot: Bullet Physics triangle collision mesh.

Bullet Physics allows for complex collision between meshes. The JavaScript version uses AmmoJS (a port of Bullet). A proxy collision mesh is generated for the stage (currently at run-time).

Effects:

3D Game screenshot:  Underwater opacity blend & screen fill.
  • ☑⁡⁡ Tint: when the camera goes below the water level.
  • ☑⁡⁡ Fast Z-fog: for various hazes (and possibly darkness) is in, but not ready for viewing in this version.

To-Do:

3D Game screenshot: Mario overlooking an optimized & camera culled city.
  • ☑⁡⁡ UI & key binding
  • ☑⁡⁡ Use UI to swap assets (ie, player models & stages)
  • ☑⁡⁡ Integrate camera system
  • ☑⁡⁡ Pregenerated collision meshes (faster load and improved collision)
  • ☑⁡ ⁡Local multiplayer
  • ☑⁡⁡ Netplay