Sn4k3 - next generation MMO
Requirements (if you don't have Docker)
- PHP >=7.0
- Python >=2.7 (with
- NodeJS >=4.4 (with
Execute all these commands directly from the root directory of the repository.
pip install crossbar composer --working-dir=backend install cd frontend npm install npm run build
docker-compose up -d
And go to
You will need at least 3 terminals for this, because all apps need to be run independently.
Run Crossbar middleware instance
crossbar start --config=crossbar/config.json
Run the php broadcast application
And finally execute nodejs static server
cd frontend node server.js
And go to
On EVERY tick, the app checks collisions for every "snake head vs any other object".
In this case, we make other naive/less precise assumptions.
- First, we check the distance between each object's center (because we're making comparisons on circles, most of the time). It's very fast because it just compares two values.
- Next, we calculate a rectangle hitbox collision, which is slower but still faster than a precise text.
- And finally we make a geometrical comparison of circles, which is very slow.
Here are some benchmarks about this: