NeChessFel - A multiplayer chess game made in Unity3D
Experimental Unity3D project, that was designed for mobile devices. You can play a chess match with your friends online.
Each piece is derived from the Piece class, and all of them override the abstract method GetPossibleSteps.
The controls are simple. If you touch the device screen with two fingers, you can rotate the camera around the board. Once you touch the screen (event raised) the initial touch position is stored and after that it calculates the x coordinate offset, and using the magnitude of this value, and a RotationSpeed parameter, the camera is rotated around the center of the board until you lift your fingers.
If you tap the screen once, then using a raycast from the screen position converted to a world space vector, the program checks if it is intersecting with the board. If an intersection was found, then the selected field is calculated and highlighted with a nearest neighbour interpolation. This way the user can select any piece, if it is their turn. Once a piece is selected, the possible steps are highlighted. If a highlighted field is selected afterwards, then the step is executed.
The backend of this project was made by my collague. The server is an ASP.NET Core application, which manages matches, synchronizes steps. REST API is used for frontend-backend communication.
Each piece is derived from the Piece class, and all of them override the abstract method GetPossibleSteps.
public abstract List GetPossibleSteps();
This describes the possible fields the current piece can step to in the actual turn also depending on its position.The controls are simple. If you touch the device screen with two fingers, you can rotate the camera around the board. Once you touch the screen (event raised) the initial touch position is stored and after that it calculates the x coordinate offset, and using the magnitude of this value, and a RotationSpeed parameter, the camera is rotated around the center of the board until you lift your fingers.
Game icon
If you tap the screen once, then using a raycast from the screen position converted to a world space vector, the program checks if it is intersecting with the board. If an intersection was found, then the selected field is calculated and highlighted with a nearest neighbour interpolation. This way the user can select any piece, if it is their turn. Once a piece is selected, the possible steps are highlighted. If a highlighted field is selected afterwards, then the step is executed.
The backend of this project was made by my collague. The server is an ASP.NET Core application, which manages matches, synchronizes steps. REST API is used for frontend-backend communication.