How to Design a Distributed 2-Player Tic Tac Toe Game?

  • Thread starter Thread starter FrostScYthe
  • Start date Start date
  • Tags Tags
    Designing
Click For Summary

Discussion Overview

The discussion centers around designing a distributed two-player Tic Tac Toe game, exploring various technical approaches, programming languages, and networking considerations. Participants share ideas on implementation, user interface, and server-client architecture.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests using Gamemaker for its ease of use and graphical programming capabilities.
  • Another participant emphasizes the importance of networking, recommending a server-based approach over client-to-client connections due to potential firewall and NAT issues.
  • There are suggestions to use web technologies like PHP, AJAX, or Flash for the server and client-side implementation, highlighting the simplicity of a web-based solution.
  • One participant argues that a basic networked Tic Tac Toe game could be developed quickly using Python and Tkinter or wxPython, questioning the need for a more complex setup.
  • Another participant challenges the assumption that a client-to-client connection would work without addressing firewall and NAT issues, advocating for a web-based solution instead.
  • A participant mentions their own project, a network game similar to Tic Tac Toe, and seeks advice on server-side data management.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to designing the game, with some advocating for simpler programming solutions while others emphasize the importance of addressing networking challenges. No consensus is reached on a single preferred method.

Contextual Notes

Participants do not clarify the specific requirements or intentions behind the game design, leading to varying assumptions about the necessary complexity and networking capabilities.

FrostScYthe
Messages
80
Reaction score
0
Hi everyone,

I have to design a distributed game of Tic Tac Toe. I have to basically write what would be a good way to design this, but I really don't know much about this stuff, I'd be grateful if some of you could give me some design ideas.

Thanks in advance.
 
Last edited:
Technology news on Phys.org
A great, and easy to use, program is Gamemaker. If you pay $20 for the registered version you can get even better stuff. Anyways, its easy to use, fun, and can include programming in the reg. version. There is also very simple graphical programming, done by dragging icons for commands into position.
 
The interface is basic. The functionality is simple turn based action. The only design consideration is in the networking/communication side. For anything multiuser you always have the options of using client-to-client connections or server based. Unless the players are inside the same local network i would go with server based because Firewalls and NAT usually get in the way (you see this a lot in P2P apps).

For a server based tic-tac-toe i would have it be web-page driven - not required but there are no disadvantages. Use a server-side technology like PHP or ASP for the server, or build a game server with JAVA/C/C++, or use existing servers like the Flash Communication Server (if you're using flash at the client).

For the clients, since the game is so simple, i would use javascript with AJAX or possibly Flash to make a more appealing interface - no Java. Silverlight is now also an option - very much like flash but simpler - it's XML based.

The javascript/flash/silverlight client, running on a user's browsers connects to the server. The server keeps track of users and game tables. When two users are joined in a game the clients use AJAX (or the flash xmlSocket/loadVars depending on implementation) to query the server every x seconds to get any new messages from the other user, or the other user's game move, or to check if it's the user's round yet. When a user makes a move, the client tells the server what the move was, the server keeps the move in memory and passes it to the other client whenever it does the next of it's x-per-second queries. And so on.
 
Last edited:
Good lord, -Job-, that's incredible overkill.

An hour with Python and Tkinter or wxPython would be more than enough to write a basic networked tic-tac-toe client. No need for a server or database engine...

- Warren
 
Multiuser? With a client-2-client connection you'll have firewall and NAT issues. For example if you're within your University's network and would like to play a game with someone on the exterior. How do you suggest you get around this without getting into more complex programming or using an existing server or P2P framework (like JXTA)? As far as a multi-user game goes web-based is actually the simpler option - a little bit of Ajax and PHP/ASP and you have a fully working solution.

I bet i could put together a multiuser tic-tac-toe in Ajax/ASP faster than you can write it in Python and it would be more compatible and accessible.

It may sound like overkill - but if you're doing this with the purpose of learning then there's no sense in taking shortcuts.
 
Last edited:
Well, -Job-, he didn't tell us anything about his intentions -- particularly whether or not he intended the program to be able to be used across firewalls or NAT. :smile:

- Warren
 
Seriously, check out gamemaker, with the registered version you can make multiplayer games, even network or peer to peer type.
 
chroot said:
Well, -Job-, he didn't tell us anything about his intentions -- particularly whether or not he intended the program to be able to be used across firewalls or NAT. :smile:

- Warren

Why would i not mention firewall/nat issues when someone asks specifically on the design aspects of a multiplayer game as simple as tic-tac-toe? Should i have focused instead on how big the cells should be, or how to draw the window?
 
-Job- said:
The javascript/flash/silverlight client, running on a user's browsers connects to the server. The server keeps track of users and game tables. When two users are joined in a game the clients use AJAX (or the flash xmlSocket/loadVars depending on implementation) to query the server every x seconds to get any new messages from the other user, or the other user's game move, or to check if it's the user's round yet. When a user makes a move, the client tells the server what the move was, the server keeps the move in memory and passes it to the other client whenever it does the next of it's x-per-second queries. And so on.



Hello, Job! I'm from Kazakhstan!
I'm writing network game, like tic-tac-toe, called Points. The game technology works like you written above. (I use php, JavaScript and Ajax). Can you help me how to keep data in the server side.
I'm looking forward hearing from you!
My e-mail is saule2007@gmail.com.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 195 ·
7
Replies
195
Views
25K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
10
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K