3 hours ago, hplus0603 said:
At the very highest level: As long as you meet your goals, it doesn't matter how you do so.
This is my general philosophy. haha
Quote
At a slightly lower level: TCP based systems versus UDP based systems have different scalability and performance concerns. Most of the "web services" people don't care about UDP because it's not a good match for what they need, which means there's less easily accessible open source solutions for UDP than TCP messaging cross-bars, even though UDP may be better for some particular game (depends on the game.)
So very true, I've been scouring the net for something "like" mqtt that uses UDP, not much mention of it anywhere.. I think ZeroMQ has some mostly undocumented UDP abilities, but like I said, not much mentioned about it anywhere.
Quote
At a slightly lower level than that, implementation concerns like "are clients easily available for the platforms I care about" and "is there good support for expressing and efficiently encoding the kinds of data I care about" may point you towards one solution versus another, assuming that they both support the scalability goals that you need.
That's not really in my worry-house right now. Implementation concerns come with Options, not many of them out there like this that tailor to game developers.
Quote
And, at the bottom, you end up with "does this system have enough hooks for me to do content-based routing and optimization, and support optimizing the mesh for the needs of my specific game as I grow." Most games never get to have that problem, though, because they die before they get that far, so ti's usually not super high on the checklist of necessary properties.
Right, and I'm not really thinking about AAA titles moving their infrastructure over to a system like mine either. Chances are they are already using the best tech they can get their hands on anyhow. I'm talking about something that might speed a game to market by a significant amount by abstracting the server build and deployment process, allowing the developer to focus more on the code and less on the system that has to support it.
Quote
There are many cases where a messaging crossbar is useful, but they are all slightly different. A "chat room" has a well defined set of people who all need to see each other, which means that a topic-based pubsub system is a great match. A "game world movement" system has less of that, because in a world where player A only sees player B, player B sees A on one side and C on the other side, and player C only sees player B (because of distance-based cut-offs,) there is no single "topic" for getting data you want; instead, what each player sees is custom to that player. You can build this as a set of topics and subscribe players to multiple topics -- A subscribes to B, B subscribes to A and C, and C subscribes to B, in the above case. Then you need to create/tear down subscriptions when people move around, which ends up creating a lot of churn that you have to optimize the system for. You also need to make sure the system doesn't allow some client to just subscribe to all possible topics, and "cheat" by seeing the entire world.
A lot of those specific scenarios are addressed in the .pdf I linked above. A good read so far, but I'm not done yet haha..
Quote
An alternative then is to build the cross-bar in RAM in a game server, where queries on "who can see what" are efficient and can be done very frequently, and just send the stream of "data this client needs to see" without worrying about establishing/tearing down different topic subscriptions. This ends up generally being lighter weight long term, and thus the architecture of many MMO games that focus on world position/movement as a game mechanic. (As opposed to, say, Hearthstone-style card games or whatever.)
Essentially this is how my system works for the game I'm building, using Redis as the RAM based cross-bar, the mqtt routers are the public facing pub/sub netcode, as well as arbitrary server code execution points for distributed operations/localized entity interactions.
Quote
If you have more details requirements for all of the parameters that matter (encoding types, lookaside capability, subscription churn rates, and so forth,) then you can make a better call on whether to use a traditional topic-based broker architecture, or something more custom.
I'm more interested in the feasibility of this thing I'm building finding some use in somebody else's game, not so much if it fits my use case.. Because it does fit my use case, perfectly, or I rewrite it.
The grand idea is to leave that part open to the game developer. The architecture of the messages/topics isn't going to be predefined by the system(aside from the routing mechanics which relies on specific topic ids). Leaving the full(basic) capabilities of the mqtt pub/sub system available to the developer. Obviously there would have to be some concerns for that on a shared hosting system, but for an open-source server, I see no reason to push a format. It will all be end-user code that runs on the router(server), aside from basic routing functionality which is obviously built in.
So, I'm mostly picturing this as a fairly simple, spin up the docker/virtual server in the cloud, publish your server logic in C# form to a specific topic with authentication and encryption, and now you have multiplayer support in your game, while still controlling nearly all of the code that runs on the server and not caring one bit about actually Engineering a server/netcode, solution.
Not a AAA solution out of the box, but I think it might be a AAA time saver for somebody, especially for prototyping.