I am about to make an application which have several features:

Application Name: Tictactoe


1. Game can be played on network and over the internet
2. Make dll of that application and integrate with msn messanger or skype
3. Add chat capability to game
4. Select Image or browse image to upload to play game and that image will be used instead of "X" or "o" in the game
5. Users can play with each other or can also play with PC. For PC levels of playing game can also be set "Easy", "Medium", "Hard".
6. Record the scores in the XML file to view highest scorers

The main query is that I never made a game before and never worked with XML file. Also i never worked in network programming in C# as i did in java long time before.

Can somebody suggest me what knowledge i need to know before start programming following.

As I know many application of tictactoe are there on internet but i want all coding myself with help of your people as i got very good response in this forum.

Re: Visual C# General Need Help in Design Game


1 and 3 are related, you need to learn about how to use sockets. After that it is just sending/receiving through the sockets. You'll probably be able to use one socket and just have a method for marking moves and for marking chat. Something like
c:Hey there, Just wanted to say good luck
then you can split received strings with split( ':', 2 ), inspect the first token for command then process the second based on the command

4 - depends on what control you have. Many controls have background images that could be set, otherwise you can add a paint event and paint the right picture to the space. As for the "upload" it would just need to be file transfer if you're allowing each user to have a unique playing token. Otherwise it's just allowing file select and storing locally the image to draw.

6 - Read documentation on reading and writing XML files, it should be fairly simple to store a top ten list in memory then write it out at the end of the program, as well as reading it in again at the start.

5 - AI/Bots are a little trickier. You'll essentially have to turn a playing style into a process dependent on conditions. You'll also have to have a turn marker to indicate turn so the AI can pick up it's turn, look at the status of the board, make it's move and change the turn flag.

2 - You'll have to see if there are any requirements of dlls intergrating with msn messenger or skype. It's fairly easy to build a class library (DLL) in C#.

Re: Visual C# General Need Help in Design Game


Thanks but do you know any help or doc available on AI

Re: Visual C# General Need Help in Design Game


This has some good information, haven't sorted through for the AI parts
You can look back at the
Virtual Intelligence, AI thread

I doubt you'd find anything directly relating to making Tic-tac-toe AI, but you can get an idea of the concepts. (ignore the VB in go look for the section "Simple AI (Artificial Intelligence)" )

AI in the sense of games is just a set of states with conditions on which state to move to next from the current state. You can make an AI that should always cause ties or win if you use the right logic. Or you can make an AI that will lose sometimes. And you can make an AI that will lost most of the times. All based on which states lead to which other states.

Your initial state is a blank board, there are 1 in 9 moves. AI would pick one of those moves randomly from a list of moves it knows are good for heading to the win, or even completely random (for the "easy" AI), after that you have more potential states to be in, based on which moves has been made, if there are any blocking moves that could be made (or ignored), if there are any winning moves that the AI could take.

I would probably not write code to evaluate each state individually, I'd write a state evaluator that checked for winning moves, blocking moves, and then potential moves based on difficulty.