jdev - 2024-12-31


  1. nidhish

    Hi, We want to create a cross platform board game app, the moves are communicated between players using Qxmpp after moves validation in local client. How feasible is this idea? And do we have to setup a xmpp server in further stages when we want to develop plugins for existing xmpp client?

  2. nidhish

    Hi, We want to create a cross platform board game app, the moves are communicated between players using Qxmpp after their validation in local client. How feasible is this idea? And do we have to setup a xmpp server in further stages when we want to develop plugins for existing xmpp client?

  3. moparisthebest

    nidhish: it's perfectly feasible to use XMPP as your message passing layer, in fact, that's literally what it was designed for

  4. moparisthebest

    Not sure what you are asking about re: server or plugins, it's highly likely you won't need to do anything with the server, plain XMPP should be fine

  5. nidhish

    moparisthebest: ok thanks, can you point me to few code examples?

  6. nidhish

    moparisthebest: ok thanks, can you point me to few code examples involving a board game?

  7. nidhish

    regarding 2nd question is client to client communication possible without any server in xmpp? or can I do like this: when first client starts it automtically becomes server and other clients can connect and communicate through chat system?

  8. Benson

    nidhish: Welcome

  9. Benson

    There is a jingle protocol that is used to initiate direct synchronous communication such as video calls between two clients. However, for asynchronous communication, a server is needed to store messages. The protocol is quite flexible in content that can be sent and stored, though the specification is large, and choosing appropriate and widely implemented XEPs to send game state information requires some research.

  10. nidhish

    is this ever done in the past, can you point me to any code base or resources?

  11. Benson

    An IoT example http://www.xmpp-iot.org/tutorials/python-philiphshue/ though still looking for a FOSS game example.

  12. Guus

    I think there's a XEP out there that describes how you can implement simple turn based games with XMPP. The Spark client implements some very basic games, like tic tac toe, but I don't think it uses that XEP.

  13. Guus

    There are other examples of games that use XMPP internally (like Fortnite, Quake Live, League of Legends), but I don't think there's much documentation around their implementation.

  14. Guus

    Although I believe that there's a paper on scalability that was written by the LoL people a few years ago.

  15. Guus

    I also recall that there was an (OSS?) game that had a booth next to us at FOSDEM a few years ago. I think they used XMPP only for in-game chat.

  16. Guus

    Don't recall the name

  17. Benson

    Spark client has game plugins https://github.com/igniterealtime/Spark/tree/master/plugins Thanks

  18. nidhish

    Benson: how about using xmpp for chats and websockets for the moves transfer (but they both need servers)?

  19. nidhish

    Benson: how about using xmpp for chats, presence and websockets for the gameplay (but they both need servers)?

  20. Benson

    nidhish: There are already many XMPP servers deployed. Reusing them also for gameplay is helpful as some games can take a long time, so players may go offline. Deploying an extra server that is under light use is inefficient.

  21. pulkomandy

    The game using XMPP for chat was probably 0 A.D.

  22. nidhish

    Benson: I can do like this the players will send inviation over multi user chat and after inviation acceptance, the private chat terminal is establish between them where moves will be exchanged and reflected over board( server required for all this) ?

  23. nidhish

    Benson: can we do like this, the players will send inviation over multi user chat and after inviation acceptance, the private chat terminal is establish between them where moves will be exchanged and reflected over board( server required for all this) ?

  24. Benson

    nidhish: May also be helpful - https://oneminutedistraction.wordpress.com/2013/01/29/implementing-a-multi-player-xmpp-game-part-1/ - https://sourceforge.net/p/rbxmpp-games/code/ci/master/tree/ - https://xmpp.org/extensions/inbox/tictactoe.html - https://pypi.org/project/jubatu-chess - https://pypi.org/project/jubatu

  25. Benson

    - https://xmpp.org/extensions/inbox/instant-gaming.html - https://www.ijcaonline.org/archives/volume178/number51/30903-2019919434/

  26. nidhish

    Thanks

    💯 1
  27. singpolyma

    For a custom game the benefits of using a xep a probably low. So use it if it makes sense, but be aware you can put any XML you want in your own namespace in the message to pass whatever you need

  28. nidhish

    singpolyma, the game is not very complex and latency is not that critical for gameplay.

  29. singpolyma

    Right. So putting any XML you want in either message or iq is probably fine

  30. singpolyma

    (if using message with correct marker to say if you want to be in offline archives or not)

  31. moparisthebest

    If you want it to work even when clients temporarily go offline you'll want message that is archived :)

  32. singpolyma

    Right. It depends on the kind of game :) for a turn based game archived message could make sense for example

  33. pulkomandy