3d game - shoot bombs, bullets and control time

I created a simple looking 3d game using Three js as rendering library : Golem Island.
The game uses the following:-

  • Three js
  • WASM (compiled using emscripten).
  • SharedArrayBuffer (REMOVED) (for cpp code - takes around 10 ms per frame, as game logic is written in cpp).
  • A simple physics engine I wrote in WASM (no rotations - only spheres and cylinders) to move things around.

Three js is the only external library (apart from emscripten) I used. I mentioned other assets (icons, textures, etc.) in a link.

The game generates the terrain procedurally in the browser to save bandwidth.
I wrote my own camera controls for a few reasons.

Also I would like to ask one thing: to generate shadows for trees, I used a very large shadow map for a light, then I disabled auto-updates on the map. Then I set the intensity of that light to 0.
Will it still cause performance overhead after setting it to 0.
(For other objects, I use smaller shadow map with exactly similar but different light - this shadow map follows the player.)

EDIT: I removed the use of SharedArrayBuffer - was used for parallel processing and made the island small. Should load on mobile as well now, but it has no touch controls.


Thanks to the moderators for quick approval.


It looks cool but it’s unplayable on a French keyboard, because your controls are listening for the WASD keys characters, and WASD are not on the same place on a French keyboard. If you want to listen for the keys where WASD are on an English keyboard, allowing anybody to play, check the event.code property instead of event.key :

window.addEventListener( 'keydown', (event) => {
  if ( event.code === 'KeyA' ) {
    player pressed A if they have an English keyboard, and Q if they have
    a French keyboard. Q on a French keyboard is where A is on the English one.

Thanks for info.