Jump up and down various slopes. Can you balance on the nose of a dolphin?
NOTE: errors or slow (clear your data)? Click here for fullscreen ↗
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 |
R | respawn / restart |
Pressure sensitive jump (hold key). Press 'R' to respawn / restart in the town (especially if you get caught in the mesh).
BUGS: falling through/getting stuck in the mesh due to outdated & experimental ammo.js physics.
Jump detection can sometimes be slightly off on slopes since it attempts to guess when the player model is on the ground by Y values alone. This can be particularly obvious when the player is sliding on a slope, causing the jump to fail to fire (the game logic thinks the player is still in the air).
If the player moves before jumping (which is often the case), the jump should correctly fire.
Edited assets from Models-Resource.com ↗
NOTE: This is a 3D Engine, not a game. Game-like features were added only to test assets.
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.
With some snapshots I locates\d the main bottleneck at a repeated pipeline call in RenderTexture. By returning on Init, the problem was solved.
However, this project is fun to tinker with. Optimizing here. Cleaning-up and commenting there. Now nearly every line has been modified, including the controls and jump physics.
Bullet Physics ↗ allows for complex collision between meshes. The JavaScript version uses AmmoJS (a port of Bullet). This generates a proxy collision mesh for the stage (currently at run-time).