This game is an experiment by the Elixir Meetup Rostock.
We are building a multiplayer browser game with Elixir & LiveView and (on the way) learn as much as possible.
- We have a closed map with objects like trees
- Players from two factions can run around the map
- Players of opposing teams can hit each other
- Players can hide behind objects to avoid being hit
- There is a counter with K/D ratio for the teams
- You start in a /lobby where you pick your name and jump into the game.
- The game itself is currently only about movement and displaying all connected players and their movement in realtime.
- From here we start building the game logic and develop the game further
💡 This project uses asdf to pin runtime versions for Erlang and Elixir. You'll need to set up asdf to contributing. Check its website and docs for instructions.
With asdf set up, install it with:
$ asdf install
Install dependencies:
$ mix deps.get
💡 To speed things up, compile everything upfront:
$ mix do compile + assets.setup + assets.build
This project uses PostgreSQL - there isn't much requirements for the version in use. Any version that's recent enough should do.
Set up the database with:
$ mix ecto.setup
💡 If you get any
Postgrex.Errorrelated to user permissions,role "postgres" does not exist, etc., it might be because your PostgreSQL server does not have apostgresuser/role, or your database server might be somewhere else thanlocalhost, etc. In any case, you can customize it through aDATABASE_URLenvironment variable with a.env.Check the
.env.samplefile for usage instructions.
With all set, run the project with:
$ mix phx.server
You can also start it with IEx (Elixir's REPL):
$ iex -S mix phx.server
You should be able to access it through localhost:4000.
💡 To start it with a REPL
We ecourage everyone to get in touch and contribute as much as you like.
You can find us on Discord.