Felix. 0 Posted November 19, 2021 Please point me in the right direction. I would like to create a very simple game server (only backend without GUI, JS and frontend) that will allow the users to play board games (checkers, mancala, backgammon). No AI, only blitz. The client program should be written with Firemonkey. I created already a Firemonkey project that allows the users to play against each other on one machine (smartphone), so GUI is not a problem. How hard/easy can it be done? Please recommend me links, resources, examples, etc. Share this post Link to post
Diego Muñoz 5 Posted November 19, 2021 Hello! I developed chesslive.com (now offline, dead). I don't do it with Delphi, it was plain javascript but the system was: - backend with websockets. I think that you could search something about this tech with Delphi. Pub-Sub model, with websockets. It was really fast, playing thousands of simultaneous games (yeah, blitz! people like blitz). - client was vanilla javascript, but use websockets to talk with the servers. - The scheme was something like: player1: subscribe to the chanel with id (myGameId) server:ok create the channel player2: subscribe, player1: move, server: transmite the move to player2, player2: do the move and make my move, send to server... and so on. Is really easy. I hope that this info help you as one possible solution, at least, it is a real case! 🙂 🙂 🙂 You could read: https://blogs.embarcadero.com/websockets-harness-real-time-power-in-your-delphi-apps/ 1 Share this post Link to post
Felix. 0 Posted November 19, 2021 3 hours ago, Diego Muñoz said: Hello! I developed chesslive.com (now offline, dead). I don't do it with Delphi, it was plain javascript but the system was: - backend with websockets. I think that you could search something about this tech with Delphi. Pub-Sub model, with websockets. It was really fast, playing thousands of simultaneous games (yeah, blitz! people like blitz). - client was vanilla javascript, but use websockets to talk with the servers. - The scheme was something like: player1: subscribe to the chanel with id (myGameId) server:ok create the channel player2: subscribe, player1: move, server: transmite the move to player2, player2: do the move and make my move, send to server... and so on. Is really easy. I hope that this info help you as one possible solution, at least, it is a real case! 🙂 🙂 🙂 You could read: https://blogs.embarcadero.com/websockets-harness-real-time-power-in-your-delphi-apps/ Thank you Diego! I think the main problem is backend. Can it be implemented with Delphi? Or do I need to learn Php/Node.Js/etc. ? What do you think about ESEGECE Websockets? I've heard they are best for mobile clients. Share this post Link to post