Multi-player 3D World Game

Converging the technologies of VR/3D and real-time chat servers (see PHP real-time chat game server project), here is a small proof of concept multi-player 3D world game, which was created over some evenings during the first COVID lockdown in 2020...


A 3D multi-player browser game with group chat in less than 32K (not including three.js external libarary).
Very early prototype beta, pre code tidy up, pre code optimisation.
One html file (26K before JS obfuscation), one php file (5K). Vanilla JS. No JQuery! Pure code, no image files or 3d model files.
Copyright Paul Ireland, Abstract Worlds Ltd 2020

Save the Ball Game
Save the Ball Game

Just open the above link multiple times to simulate multiple users, and type something in the name field to start.

It is important to note that this is running on a mass market cheap shared hosting plan, there is no powerful dedicated server behind this. There are more modern options for handling realtime servers like Firebase Realtime Database, but these can incur a higher cost for outbound bandwidth, and such realtime systems are outbound bandwidth intensive (getting updates on multiplayer positions many times per second). For cheap hosting with 50GB bandwidth per month you can pay £5 per month, for the equivalent Firebase Realtime Database outbound bandwidth that would cost £35 per month (stackoverflow prices discussion and Firebase pricing calculator). For scalability, and spike handling, the Firebase option might be the better solution for more commercial ventures with better budgets (perhaps I'll create a working comparison in the future if it is possible to do this without the risk of running up a high bill at Google if pages get popular! Firebase does allow for the first 10GB outbound bandwidth to be free).

×