0

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.

asked Jun 15, 2020 at 13:30
2
  • If you wanted to make this app over the internet, you should check out Firebase. Commented Jun 15, 2020 at 13:52
  • 1
    Hello radams, this question is a little too broad for users to give you meaningful help. You can look into peer-to-peer or have a server which keeps track of what the players do and communicate actions. This would require a client - server architecture with a REST-Interface. There isnt a definite answer for this, however. Commented Jun 15, 2020 at 13:57

2 Answers 2

1

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
answered Jun 15, 2020 at 14:01
Sign up to request clarification or add additional context in comments.

Comments

0

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.

answered Jun 15, 2020 at 13:36

2 Comments

The link you sent for the chat app is creating a chatroom with socket, so it can be only used for 2 computer within the same LAN (?)
If you are using python 3, please don't use the link provided for the architecture for the chat app. It's written in python 2 and some functions are outdated.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.