GitHub Documentation Patreon donate button

Is Colyseus what I'm looking for?



  • Hi, everyone!

    I am currently planning my first real project ever.
    I already finished some parts of the front-end and now I want to start working on the backend.
    It will be a WebApp for a LAN-Event, where players can search for Counter Strike matches.

    For example:

    1. A player needs to log in through Steam (I guess I'll use passportjs for that).
    2. The player can search for a match
    3. After 10 players search for a match they can accept the match
    4. If all players accepted they get forwarded into a lobby-room, where they can vote their teams and the map that will be played.
    5. After the teams are set a CS:GO gameserver gets started and they get the IP / a connect button displayed.
    6. After the CS:GO match is finished the lobby will get closed and the rankings updated.

    After looking a little bit through the documentation and the sample projects I think Colyseus might help me a lot with setting up the room-logic and the realtime scenarios like the player / map voting.
    I set up a Trello board to visualize the different things that the backend logic needs to handle: https://trello.com/b/3LjNLyCZ/saarlanpug

    So, to my question: Is Colyseus what I'm looking for?
    I am definitely not an experienced web developer. I mainly worked with express / mongodb / ejs / vuejs so far.
    Would Colyseus provide me a lot of help with this project or am I on the wrong track?

    Any help is appreciated! Also if you have any hints / tips / other example projects to get me started I would highly appreciate if you would share them!


  • administrator

    Hi @Tobi4s1337, welcome!

    That's an interesting use-case. I think the major challenge is listening and triggering CS:GO events. I've googled about this and found a project that may help you with that, not sure how to use it, though:

    I imagine this is not possible through a web browser, but maybe it can be achieved through Electron.

    Not sure if CS:GO allow external applications to perform actions, such as creating the server and stuff.

    Cheers, good luck!



  • Thank you very much for your reply @endel !

    • "That's an interesting use-case. I think the major challenge is listening and triggering CS:GO events."
      To be honest that is actually one of the things I don't worry about too much (for now).
      I think it is possible to achieve that using this open source project: https://github.com/pushrax/node-rcon
      You can configure a source-engine gameserver using rcon commands and there are even more projects like "eBot" that feature an API: https://github.com/teamreflex/eBotAPI

    • "I imagine this is not possible through a web browser, but maybe it can be achieved through Electron."
      This sounds like an interesting concept. Currently the idea is that every visitor can reach the page through an internal domain and can then search for a match. But a client might be even better / more awesome. Will definitely look into it, ty!

    I am not sure if I described my project the right way (sorry I am not the best at describing things).
    Maybe it helps if you have a look at the front end: http://saarlan-pug.durek.cc/NotLoggedIn/index.html

    The concept would be the following: A user visits the page, authenticates himself (using passportjs and the steam api) and then presses on the green button that says "Spielen" ( = play).
    If I understood Colyseus correctly I would create a room and set the max number of "room-participants" to 10.
    After that number is reached I would lock the room and then trigger some dialog with an accept button.
    If every player accepts I would forward them to a page that is only available if you are in the match-room.
    On that page two (random) captains can vote their team and then the map that will be played.
    After that stuff is done the nodejs server would configure a CS:GO server using the eBot api for example. - And that should be kind of it :D

    I hope my explanation is okay.

    Here is a similar page:
    When joining the queue: https://youtu.be/JVzjHTCimx0?t=91
    The match lobby: https://youtu.be/JVzjHTCimx0?t=167

    I hope I don't waste too much of your time^^
    I am doing this project to learn and for free, so I'll definitely make it open source once it is finished. Thanks once again!



  • Hey @Tobi4s1337

    What you describe is possible with colyseus and colyseus will definitely take some work away.
    And you understood colyseus right. the features u want from colyseus are all supportedö.

    Since you think a client would be a cool idea and u already know vue this one would be super good for you:
    https://github.com/SimulatedGREG/electron-vue



  • Hi @Wenish,

    thank you very much for your reply!

    Yeah I already realized that Colyseus is the perfect fit for my project while exploring the examples and working with them.
    It is really fun to play around with Colyseus and already makes my life easier.

    Also thank you for sharing electron-vue with me, will definitely check it out at one point =)



  • @Tobi4s1337 cool

    btw i work on a game launcher atm with the electron-vue

    those are some alpha builds if u wanna see how it comes.
    https://github.com/memgame/game-launcher/releases



  • @wenish looks really awesome, thanks for sharing!
    Did you do the artwork yourself? :o (On the Login / Sign Up screen)
    I'll definitely consider using it at one point.


 

GitHub Documentation Patreon donate button

© 2019 Endel Dreyer