How far can you go on a smart feature phone? That’s what I’m going to find out with this 3D game for KaiOS, utilizing the amazing WebGL game engine ThreeJS.
One of many challenges is to keep the garbage collector away to avoid annoying hick-ups during the game.
The other one is CPU load, that tends to be the bottleneck. The GPU on the other hand is powerful enough on most devices for the task at hand.
Features implemented so far:
- Lightweight infinite terrain (check this project)
- Collision detection with the terrain and other objects without a hefty physics engine
- Soft shadows with pre-rendered decals
- Custom shaders
- Object and variable pools to avoid creating garbage during runtime (turret & rocket recycling)
- Imitating volumetric clouds in front of the ship
- Mesh instancing to render hundreds of objects at the same time
The game is available through the KaiStore on KaiOS-powered devices.
An online multiplayer mode is currently being developed. Check this out: