All Projects → aeon0 → multiplayer-babylon-js-game

aeon0 / multiplayer-babylon-js-game

Licence: MIT license
Multiplayer BabylonJS game with Server and Client-Side physics engine synchronization

Programming Languages

typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to multiplayer-babylon-js-game

Py3ODE
Port of PyODE for Python 3
Stars: ✭ 29 (-60.81%)
Mutual labels:  physics-engine
BabylonReactNative
Build React Native applications with the power of Babylon Native
Stars: ✭ 236 (+218.92%)
Mutual labels:  babylon
LunarGdx
A networking library for LibGDX utilizing Netty allowing easy creation of multiplayer games.
Stars: ✭ 23 (-68.92%)
Mutual labels:  multiplayer-game
Legion-Engine
Rythe is a data-oriented C++17 game engine built to make optimal use of modern hardware.
Stars: ✭ 502 (+578.38%)
Mutual labels:  physics-engine
Torque
2d 纯计算高性能刚体物理引擎
Stars: ✭ 62 (-16.22%)
Mutual labels:  physics-engine
tacoscript
🌮 The bidirectional alt-JS language
Stars: ✭ 46 (-37.84%)
Mutual labels:  babylon
StackQuest
A multiplayer and team-based action/shooter game.
Stars: ✭ 21 (-71.62%)
Mutual labels:  multiplayer-game
why-roguelike
A multiplayer ASCII roguelike
Stars: ✭ 17 (-77.03%)
Mutual labels:  multiplayer-game
kosm
Kosm for Android source code
Stars: ✭ 33 (-55.41%)
Mutual labels:  physics-engine
konan
find all require/import calls by walking the AST
Stars: ✭ 48 (-35.14%)
Mutual labels:  babylon
cyberwarfare4k
Yet another multi user domain, text based, hacker simulator role playing game👨‍💻
Stars: ✭ 39 (-47.3%)
Mutual labels:  multiplayer-game
jsShooter
html5 multiplayer game with nodejs server
Stars: ✭ 21 (-71.62%)
Mutual labels:  multiplayer-game
Playground
A playground for android developers
Stars: ✭ 41 (-44.59%)
Mutual labels:  physics-engine
fifa
React + Node.js + socket.io -- A turn-based multiplayer game-client based on FIFA
Stars: ✭ 26 (-64.86%)
Mutual labels:  multiplayer-game
WildWorld
Sandbox freestyle multiplayer game/engine in LÖVE/LUA.
Stars: ✭ 35 (-52.7%)
Mutual labels:  multiplayer-game
prismarine-physics
Provide the physics engine for minecraft entities
Stars: ✭ 24 (-67.57%)
Mutual labels:  physics-engine
CubbyFlow
Voxel-based fluid simulation engine for computer games
Stars: ✭ 215 (+190.54%)
Mutual labels:  physics-engine
ign-physics
Abstract physics interface designed to support simulation and rapid development of robot applications.
Stars: ✭ 40 (-45.95%)
Mutual labels:  physics-engine
ant sugar
Genetic Algorithms, Mutation, Crossover, Mating, Particle Animation, Gaming, Learning, P5JS, Fun Project
Stars: ✭ 33 (-55.41%)
Mutual labels:  physics-engine
GeoGuess
GeoGuess is an open-source geography game with Google Map StreetView. You can play solo or with your friends simultaneously.
Stars: ✭ 174 (+135.14%)
Mutual labels:  multiplayer-game

Multiplayer Babylon JS "Game" with Client & Server-Side Physics Engine

alt text

You can open the Demo in two different browser tabs, that way you spawn two different players into the world
Demo here: http://185.82.21.82:8700

Run Localy

>> cd client
>> npm install
>> tsc
>> npm start

In a new console:

>> cd server
>> npm install
>> tsc
>> npm start

Then visit http://localhost:8700.

Development

If you want to play around with the code you can run >> npm run dev. (nodemon must be installed globaly). This will watch any chances for the typescript files, recompiles and on the server side, also restarts the server to serve the changes.

What is this?

Testing the server side "NullEngine()" from Babylon.js. This enables you to run Babylon.js on a node server without having to render anything to the screen. That means you can simulate the world on your Clients as well as on the Server.

This implementation uses Websockets for Client <-> Server communication. The physics engine is simulating on Client as well on the Server. The Server then sends each render loop updates to all clients about the current "State of the World". The Clients then adjust the World according to the Server updates. That means, the higher the delay, the more visible "jumps" can occur. Interpolation could smooth out this jumps, but is currently not implemented.

The "game"

Granted, it is not really a game. It is just an "arena" where each player controls a ball. By pressing W or D you can give the ball a spin forward or backward into the camera direction.
With A and D you can rotate the camera around the ball to apply the spin from different directions. With SPACE you can jump (only working on the ground as it is hacked in...)
The plan was (or is) that you would have to try to push your opponents of the arena, but this is not implemented yet. Right now you just fall forever and have to reload the page (That is why there are walls around the arena for now : ).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].