-
Notifications
You must be signed in to change notification settings - Fork 0
Funcionalidades
AABB collisions: https://gamedev.stackexchange.com/questions/586/what-is-the-fastest-way-to-work-out-2d-bounding-box-intersection
Para detectar por qué lado se choca, e.g. para conservar la velocidad en el eje en el que no hay choque:
- guardar la posición actual. mover primero en sólo uno de los ejes. Si se detecta colisión, deshacer el movimiento. Sabemos que ha habido colisión en este eje, lo cual es puede utilizar para implementar algún aspecto, e.g. poner a 0 la velocidad en este eje.
- igual que arriba, pero para el otro eje.
-
Dumping world state into file as JSON at intervals, and uploading it to Amazon S3. Downloading it upon server bootup and using it to populate the game world. Helps with keeping a consistent state of the world, when too much of its state could change at the same time. https://devcenter.heroku.com/articles/s3-upload-node#setting-up-the-app-side-node-code
-
SQL database. Save character data upon log in / log out. (Similar to WoW. Persistence is only at the character level – there's no world persistence). Character could also be saved upon important events happening, like beating a raid, making a trade, etc. https://devcenter.heroku.com/articles/heroku-postgresql#connecting-in-node-js
Howler.js: https://howlerjs.com/
Use examples: