I'm playing around building a multiplayer game. Probably something similar to Videoball. But things might change during the project. I'm building this mostly to explore game development.
The main app is broken at the moment. The frontend has changed a lot since I wrote the backend, so the game is unable to start. It's best to run the debugCollisions
entry instead.
yarn debugCollisions
The project definition is very loose at the moment. I want to create a multiplayer game of some sort. When writing this the Quake III Network model/architecture is my current source of inspiration.
What kind of game I will build or if it's any fun is secondary. Currently I'm mostly interested in learning 2D vector graphics & the networking part of game development. Hopefully in the future it could evolve to a game that's actually a little bit fun to play.
My first backend proof of concept was build in Go, mostly because I wanted to try Go some more. But this might change in the future when I start working on the backend. There are some nice benefits if I decide to run the backend in node.js instead. A lot of game logic can be shared.
- Backend: Go (Might change)
- Frontend: Vanilla JS
- Communication: WebSockets
collisions-2.mov
- Collisions are working and objects can have different masses & elasticity.
- Using a Spatial grid to greatly reduce number of collision checks.
- Every object uses 2D vectors for properties like positions, velocity, acceleration etc.
- Framerate independence - Movement & physics should now behave pretty much the same no matter what framerate the game is running at.
attract-repell.mov
- Added gravity to the game. Each object have a gravitational force proportional to its mass.
- The player can alter his/her gravitational force to attract/repell close objects. ( I have no idea why you would want to do that, but why not. 🤷♂️ )
- Switching to a node backend? Using something like this? https://geckosio.github.io/ It would make it a lot easier to be able to use the same game logic code in both the frontend & backend.
- Node.js snapshot interpolation https://github.com/geckosio/snapshot-interpolation#readme