Sure! Here's an example of a simple game where you control a ball to navigate through a 3D maze with obstacles using JavaScript. Please note that the ball movement is controlled using arrow keys on a keyboard and may not work on a smartphone, as physical keyboard events are required.
Simply copy and paste this code into a new HTML file and open it in your browser to play the game. You can navigate the ball using the arrow keys on your keyboard. The red ball represents the player-controlled object, and the gray squares are the obstacles. Feel free to add more obstacles by duplicating the `div` with class "obstacle" and modifying the `top` and `left` CSS properties.
Please note that the game experience might not be optimal on a smartphone, as keyboard events are required for moving the ball.