one of my problems with colyseus is that although it might be small, theere are many intricacies regarding handling room events, different kinds of messages (as in emit vs state change), what is the EXACT behavior to expect, and so on.
I鈥檝e started a unity game, and used colyseus.
First thing鈥檚 first - the colyseus unity client is not something I would gladly recommend someone to use... the apis are uncomfortable, code is outdated...
I mean - just opening visual studio and looking at the amount of errors shows you what鈥檚 going on.
Second of all - handling game state.
I think the idea behind the game state patches is good - long as it is for netcode.
Handling these changes in the client side is not something you鈥檇 want to deal with, but instead, I鈥檇 rather have the framework deal with it - sorta reduce style:
state = func(prevState, patch).
And have the client side framework inform you of changes in a more user friendly way.
When I thought about all the code I鈥檇 have to maintain to be able to just scale my game in terms of how much types of data I pass, I was getting nauseous...
That and - there has to be a full, thorough tutorial to using the framework - client side and server side.
Most of the development felt like trial and error. Especially on the client side.
This framework has a lot of potential, it鈥檚 so elegant and at first, it feels like you can get some really nice stuff done with it. But eventually it all came down(for me) that the development experience on the client side, especially with Unity, felt downright horrible.
I鈥檓 not giving up on using the library, I鈥檒l definitely try to make some cool JavaScript based game(I imagine the client side is much simpler in js).
I would love to discuss more about this. I don鈥檛 want to just come and rant about this being a shitty framework, because it isn鈥檛.
Thanks for taking your time to share your experience @gioragutt!
the colyseus unity client is not something I would gladly recommend someone to use
I totally agree with you - the C# client is very painful to use. It's necessary to typecast every single value coming from the server, which is unproductive. The same problem would be true for an eventual C/C++ client.
I'm currently researching some alternative concepts for patching, like flatbuffers and avro, which are suitable for statically typed languages. This is also a big change, as in https://github.com/gamestdio/colyseus/issues/176#issuecomment-449371515
there has to be a full, thorough tutorial to using the framework - client side and server side
This year was great to receive some feedback - like yours - and more use cases. Hopefully next year it will be the time to prepare tutorials. It requires a lot of effort to carefully make and write them, though. (I'm not a native english speaker, and it takes a lot of thought to write anything, even this post 馃槸)
I鈥檓 not giving up on using the library
鉂わ笍
Some really great points here - I don't use the Unity Client or C# on a regular basis, so I can't help there. However - regarding tutorials, I had a few good ideas on topics that would be more than suitable for tutorials based on what I've learnt in my own experience with Colyseus the past 1.5 years (Auth via JWT, scaling/stateless, persisted data etc.).
@endel Might be worth having a chat about what sort of topics we should cover in a potential tutorial series? I'm a native English speaker, so if nothing else, I can help in that department.
CC @seiyria
I can definitely help in that regard.
I also agree that having jwt auth, scaling, and how to manage (load/store) data would be good. Another course to consider is doing things efficiently - what things slow down colyseus (big states)? What techniques can you use to make it easier on the server (like not storing everything in the state)?
Also some documentation on how to X - how to make a multiplayer RPG, how to make a multiplayer action game, how to make a simple 3d game, how to make a multiplayer turn based game (like a board game) - would be very helpful for the average person. Many people will come here and look for those resources, so having them readily available is a good idea.
@endel @seiyria Could be worth considering having a Discord Server for Colyseus? I know we have a Gitter, but Discord has many more benefits (More people use it, free VOIP servers etc.), could prove useful in areas like this for the (bright) future. Sorry if I'm going off-topic now, just getting a few ideas from the ideas flowing in this issue.
If it's something we would collectively use, sure.
I鈥檓 really happy to see that you guys fee it as well.
I agree on the Discord server idea, it鈥檇 be a great place to communicate.
You're amazing, guys, glad to have you here 鉂わ笍
I've updated the Gitter links to the Discord server: https://discordapp.com/invite/RY8rRS7
Still playing around with the server configuration, if it makes sense let's create more text channels there! :)
Your feedback is very valuable @gioragutt, I'm hoping that we're slowly getting better.
I believe the new serializer for Unity3d is way more productive now than it used to be. If you happen to use Colyseus for a new project I highly recommend checking it out!
Most helpful comment
@endel @seiyria Could be worth considering having a Discord Server for Colyseus? I know we have a Gitter, but Discord has many more benefits (More people use it, free VOIP servers etc.), could prove useful in areas like this for the (bright) future. Sorry if I'm going off-topic now, just getting a few ideas from the ideas flowing in this issue.