Jump to content
Felix.

Delphi, Blitz (board game) and server

Recommended Posts

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

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/

 

  • Thanks 1

Share this post


Link to post
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×