New Project Tip - Command Line Chess Game Between Two Ubuntu Machines

I am a CS student and I would love to make a command line chess game. Ideally I could track my actions right in front of my opponent and just for fun, I would rather use ASCII art to print the board (no chess in memory) on the command line.

I have a 4 year computer science degree under my belt and am just starting out as a Java programmer. I want to go back to basics to have a little fun, but I'm stumped on how to get started.

What kind of connection would you make and how? What language would you use and what would be the most difficult in this project in your opinion.

2 linux machines on the same network, I can ping the machine easily.

Greetings,

Woof

EDIT

What are my thoughts on a possible approach? I could do it in Java easily and this is probably the best option for me. Create an executable Jar and run it from the command line. I was just hoping to learn a new language or skill using a scripting language or the like. I just don't know anything about setting up a connection in Python, for example.

Sorry, I know the question was a little vague, but I was just looking for a couple of pointers, nothing deeper. What technology would you use.

+2


source to share


4 answers


I did something similar for my online chess site at www.geekswithchess.com .

I have implemented my chess system in C # using a client server architecture. I have used Microsoft Silverlight for clients and Windows Communication Foundation (WCF) for server.

You can go with a customer to a desingn customer, but each customer will have to store their own information such as rating, win profile. This would make it very easy to hack and change your account for example.



I would highly recommend having an online client for security reasons. You can restrict the domain name that has access to your web services and prevent any unauthorized access to your server. If you create a distributed client, it will be much more difficult for you to protect, since anyone can download the client and access your services. You should also consider that in this design, someone could make their own client that cheats using a computer chess engine.

If you need more help, feel free to search my contact information on my web page.

If you would like to learn more about writing a chess engine and download the free source code, visit my blog: www.chessbin.com

+1


source


If you are using Java you can use Java Sockets. I have heard that it is very easy to build a connection between them.

On a quick google search I came up with the following: http://www.devarticles.com/c/a/Java/Socket-Programming-in-Java/



This might be helpful.

+1


source


If you are making a socket connection between machines, consider testing.

It would be much easier to check if they are sending text moves to each other, then you can test it manually with telnet rather than some complicated remote object thing (although there are probably many tools for testing / monitoring a system like J2EE).

+1


source


I made a command line chess game using Java. However, I have not implemented online mode. But Java will probably be the best language to use.

0


source







All Articles