Git Product home page Git Product logo

Comments (4)

pserwylo avatar pserwylo commented on May 31, 2024

Thanks for this recommendation, I completely agree we should be able to have server operators specify what games they want to play. I will add this as it shouldn't be too hard.

However, while you are here, can I counter propose something which may make this more ergonomic without having to spin up your own server (though that should certainly be an option). Right now, a server consists of a number of "Rooms". You don't really get exposed to this, it is just an implementation detail. Furthermore, it doesn't really get used, because not many people play this game!

Rooms are controlled via the env vars MAX_ROOMS (defaults to 10) and ROOM_SIZE (defaults to 4). If more than 4 people join a server, a new room is created until MAX_ROOMS is reached. New players are assigned to the first non-full room. When nobody is in a room, the room is removed from the server.

But it was in my original plans (and still in the code - though unused) to be able to let people create their own private rooms on a public server, then share invites to that room to their friends.

It will require a lot more work, because it needs a UI for adding a new room, selecting which games to enable. However I think it will be better for most players as you don't need to spin up a separate server just to customise rules.

Thoughts on whether to prioritise one or the other approach?

from retrowars.

GGORG0 avatar GGORG0 commented on May 31, 2024

Well, I think the first approach is by far easier and faster to implement that the second, so it would be cool to get that out and maybe push the private rooms for later.
Still certainly a cool idea!

Just wanna add, that for this to make more sense #137 has to be considered, as I'm not even sure if a Tetris-only server would be accepted as a public server

from retrowars.

pserwylo avatar pserwylo commented on May 31, 2024

This has now been implemented, via the --supported-games=tetris,asteroids argument or the SUPPORTED_GAMES=tetris,asteroids env var when starting a server. Will now begin work on #137.

However, if you are that way inclined, I'd be happy to accept public servers that only support a limited subset of games via PRs to the retrowars/retrowars-servers project. Only thing is we don't yet support server descriptions, so it would be good if the hostname hinted at the games available (e.g. tetris.my-server.com).

from retrowars.

pserwylo avatar pserwylo commented on May 31, 2024

I should note that this does not require any update to the client to work. Old clients can connect to a server with a limited subset of games just fine.

from retrowars.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.