0

I'm looking for advice on how to implement online chess move validation using a winboard chess engine. I am creating a mobile battle chess game in Unity 2020.3. Right now I have the possible moves for each player, castle rights, check status, etc being generated by an open source C# chess engine.  I chose this engine because it's written in C# and the code could be directly included in my Unity Project. I successfully wrote my own code that connects this chess engine to a 3D battle chess game.

How the game works (video preview):

  1. A piece is selected by the player clicking it with their mouse or tapping the screen.
  2. The possible moves for the current board are calculated by the chess engine.
  3. I use the possible move indexes to show possible move highlights.
  4. When a player makes one of these possible moves, the move is applied on the chess engine.
  5. It becomes the other player's turn.

I have some custom code to run player animations, based on the kind of move (ex. an attack animation runs when a piece is captured). I also show have screens that show when it's time for a promotion, a player is in check, or the game is over.

I'd like to somehow make the process of calculating possible moves and applying moves to be done on a server. My goal is to protect from players sending illegal moves to the board and breaking the game.

How would you recommend I approach this problem? This is the last thing I need to turn this game into an enjoyable online experience. I just lack the crucial skill of understanding how to make this game online.

2
  • Welcome to our community! Thank you for making the effort of asking this question but I don't think it's within the scope of our site. It doesn't look like a chess-related problem at all
    – David
    May 24, 2021 at 22:05
  • 1
    What do you mean by validation? If you mean cheat detection, this is probably on-topic. If you mean legal move detection, it's a coding problem (and seems a trivial one: just generate the legal moves and check the proposed move is in that set...) May 25, 2021 at 19:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy