This project is read-only.
Engine-Wars Chess Client

Introduction

Engine Wars a WCF / WPF client / server project I started in 2009. I put the project on hold many times, mostly due to frustration with WCF and WPF. As a Windows Forms developer, learning WCF and WPF came with plenty of grief and vague error messages.

I want to thank the unnamed heroes that have answered my many forum questions for this project and others; without them this project would not exist.

In the original release I included the server code with the download.
I have since purchased (rented) a cloud server to host this project and my web site www.daily-click.com. The server code contained SQL Server login information and other information that I did not want to share with the public. I also needed a server to host the matches and I keep more control over the project this way.

I am current seeking a WPF guru, and I am sure sometime in the near future a WCF expert could help on future issues. Please email me at support@engine-wars.com for information about becoming a part of the Engine-Wars development team. Being this project is open source the starting pay is not very high (zero in fact), but there are some financial prospects in the long term that could become lucrative. If nothing else you would have bragging rights for building the coolest chess program on your resume. A Graphics Designer could also be helpful.

I am paying around $100 per month to host the server and could definitely use some help. If you can spare $5 or $10 per month or year or whenever you can I would appreciate any help. I made a decision to keep the program advertisement free, and if you appreciate this fact a few dollars would really help.

I am not a big mega corporation; I am just a software developer that was frustrated with how bad Yahoo Chess is, and I was also frustrated with how difficult it was to write code for UCI and Win Board chess engines.

If you would like to make a donation, please visit www.daily-click.com.
  • Note to Developers **
I created many of the images myself, and I was granted the right to use some images, and I have also purchased images for this project. You are free to use these images in the Engine-Wars project, but I do not have the right to grant you free use of these images in any other projects, even noncommercial projects.

Thank you for not abusing these images.

If you have any questions about usage of images or this software, email me at corby@daily-click.com . For a large donation the server source code is available.
Engine-Wars Chess Client
Programmers Guide


Service References

ChessManagerService – The Chess Manager Service is used to retrieve data from the server. All of these operations use http and are one way operations.

NotificationService – The Notification Service is used to send messages from a client to server, client to client or possibly server to client. Server to client is not being implemented at the moment.

The source code download already contains two service references, but if you need to add them again:

http://216.230.230.71:8000/ChessManagerService *

net.tcp://216.230.230.71:8001/NotificationService/mex
  • You might need /mex on this service reference, I can’t remember.

For a complete list of calls to these services, look at the interfaces IChessManagerService and INotificationService located in EngineWars.Shared.Interfaces directory.

Chess Manager Service will undoubtedly be updated with new methods as the project progresses. If you need any database storage and / or retrieval methods updated in the web service and you are actively helping to improve the project then please contact me at support@engine-wars.com .

NotificationService Background

A little background is in order for the Notification Service. Programmers tend to over complicate things. In fact our survival depends on billable hours so complicating things is in our best interest most of the time.

In my original design for the notification service, I had service operations for every imaginable event I could think that would occur in a chess match. I had methods for SendGameRequest, OfferDrawRequest, PieceMovedNotification methods and many more. Nine or ten methods would work perfectly fine, and then after adding another method, the service references could not be updated.

I would lose days or weeks on every issue. What was really frustrating was the fact that I had thought I had solved all my WCF issues three months ago when I successfully sent a message through the server to another machine at my location.

Rather than spend any more time on debugging or solving WCF issues, I realized all I need is a ‘Messaging Service’, thus I deleted about a dozen methods on the INotificationService interface, and now the NotificationService only has one method:

SendWebMessage(WebMessage message)

Introducing the WebMessage object.

WebMessage

The WebMessage object is the mechanism for sending any type of information you need to another client or possibly the server if needed.

There are many properties on the web message, but the key properties are below:

BoardSquareID

The ID of a chess board square that a piece was moved to

Message

Any text that is sent with the web message.

MessageType

The type of message that is being sent: PieceMovedNotification, DrawRequest, etc.

PieceID

The ID of a piece being moved or acted upon.

Sender

The Player who sent or originated the message.

SenderPlayerID

The Player ID of the Sender

SenderSide

The side the Sender is currently sitting or playing.

TargetPlayer

The player the message will be delivered to

TargetPlayerID

The PlayerID of the TargetPlayer.

TargetPlayerSide

The side the Target Player is currently sitting or playing.

SecurityToken

A Guid that comes from the ChessMatch.SecurityToken. This SecurityToken must be sent with a message to be delivered. This prevents unauthorized messages from being sent. A SecurityToken for players is also needed to send message to players who are not seated at a table.

If you need any additional properties added to the Web Message the server must be updated with the changes so send me a copy of the code with a little note as to what was added. My general approach is to send ID’s of items and not the actual object as the serialization / deserialization of objects and sending across the internet tends to slow down performance and adds to complexity (WCF issues).

Known Issues / Tasks to be completed

1. The drag and drop code will not let you capture a piece
2. The UI needs to not let you move when not your turn
3. A legal moves check needs to be created
4. Chess Clock needs to be implemented
5. The Start Game and menu options need to be created
6. A table needs to be created for Player Options
7. The Web Service needs to retrieve and save player options
8. A GUI to edit player options
9. Filter Games Control / Web Service methods are need
10. Update available games list
11. View Players Online List
12. Send Game Request
13. Send Game Request Response
14. Send Friend Request
15. Send Friend Request Response
16. Save move history as a player moves
17. Save Game / Adjourn Game
18. Retrieve Saved Game
19. Server needs to close idle tables
20. Server needs to update idle players as offline
21. Adjust rating after win
22. Create Tournament Software
23. Send message to players not sitting at a table
This is just a short list, but I wanted to post an update to this project since the program is close to being able to play a game of chess. I also wanted to test the server with multiple users simultaneously.

Another update will be posted once the capturing piece code is complete and the UI handles things like whose turn it is, and disabling pieces from being moved when it is not your turn.

This document will evolve as the project progresses and I have more time to update it.

Engine Wars is a Visual Studio 2012 project. I originally created the project in Visual Studio 2008, then it was converted to Visual Studio 2010, and now I have it converted to Visual Studio 2012.

All of the code in the current project will run on Visual Studio 2010, but I have the project converted to .Net Framework 4.5 to take advantage of the new ASync methods that I do not fully understand yet. I figure with chess engines that go off into long running processes this type of approach would come in handy.

If more than one person requests that a Visual Studio 2010 project be maintained I will create a 2010 version by setting the references back to .Net Framework 4.0 or .Net 4.0 Client Framework. Please email me at support@engine-wars.com if you need or want a Visual Studio 2010 version.

If you work on the code, you will notice all of the methods, properties and events are arranged into regions that are sorted alphabetically for each section.

If you work on the code you will need to use Regionizer, which is another open source project of mine hosted at http://regionizer.codeplex.com .

I know of most of the bugs in the software, but if you encounter any bugs that require a server fix or if you solved any bugs please contact me.

If you plan on working on the client please coordinate with me so we can focus our efforts effectively and not work on the same problems.

Also any feedback or comments are welcome.

Thank you,

Corby Nichols
Data Juggler Software
Houston, Texas


Last edited Nov 1, 2012 at 4:36 PM by CorbyNichols, version 5

Comments

No comments yet.