radams
radams

Reputation: 1

Python multiplayer scrabble game

I am trying to write a two-player Scrabble game in Python using Tkinter and I would like each player to be able to play on a separate computer. But I am not sure how to code this.

Please could someone help me with coding this or point me to a tutorial.

Many thanks in advance.

Upvotes: 0

Views: 282

Answers (2)

mime
mime

Reputation: 312

I'm going to talk about the Connectivity part of the question.

First question is: Is your friend playing from the other side of the world? Or is he connected to the same LAN as you?

  1. If your friend is on the other side of the world, use Firebase.
  2. If your friend is on the same LAN or Wi-Fi, use a socket server. That should require a server script and two client scripts, one for each of you.

Next, I'm going to talk about the interface you want to use.

Second question is: Do you want to use a GUI like tkinter or something web-based?

  1. If you want to use a GUI, use tkinter
  2. If you want to use something web-based, try flask or web2py

Upvotes: 1

You could use a similar sort of architecture as a chat app, see for example this link for a simple example.

You would probably want your server to store the state of the game, and keep copies on either client side, to be updated as the game progresses.

If you want to have something that works over the web, you might want to look into using a Flask based setup, which is sometimes easier to deal with.

Upvotes: 0

Related Questions