Real Python
realpython.com › tic-tac-toe-python
Build a Tic-Tac-Toe Game With Python and Tkinter – Real Python
February 1, 2025 - In this tic-tac-toe game, you’ll mostly handle one type of event: players’ moves. Translated to Tkinter terms, a player’s move is just a click on the selected cell, which is represented by a button widget. Every player’s move will trigger a bunch of operations on the TicTacToeGame class. These operations include: ... In the following sections, you’ll write the code to handle all these operations in your TicTacToeGame class. To download the source code for this step from GitHub, click the link below and navigate to the source_code_step_3/ folder:
Here's a game I made in Python using Tkinter!
Using Tkinter? Wow. I absolutely hated that framework because it felt like a mess compared to the clean Python code I saw elsewhere. But I thought Tkinter was for GUI interfaces and not for building games. Could you share why you chose Tkinter for this instead of something like Pygame and some pointers for where to find resources for learning to build games using Tkinter? More on reddit.com
tkinter Pausing root.mainloop()
What you are asking about is called a "modal window". This is how it's done: try: #python3 imports import tkinter as tk except ImportError: #python3 failed, try python2 imports import Tkinter as tk class Main(tk.Frame): def __init__(self, master): tk.Frame.__init__(self, master) lbl = tk.Label(self, text="this is the main frame") lbl.pack() btn = tk.Button(self, text='click me', command=self.popup) btn.pack() def popup(self): Popup(self) class Popup(tk.Toplevel): def __init__(self, master): tk.Toplevel.__init__(self, master) lbl = tk.Label(self, text="this is the popup") lbl.pack() btn = tk.Button(self, text="OK", command=self.destroy) btn.pack() self.transient(master) #set to be on top of the main window self.grab_set() #hijack all commands from the master (clicks on the main window are ignored) master.wait_window(self) #pause anything on the main window until this one closes (optional) def main(): root = tk.Tk() window = Main(root) window.pack() root.mainloop() if __name__ == '__main__': main() More on reddit.com
Does anyone have the source code for a complex tkinter GUI I could look at?
To be honest, most "polished and complex" GUIs are going to be written using a more modern framework such as PySide/PyQt. That said, see if you can find something here.
More on reddit.comDoes anyone have the source code for a complex tkinter GUI I could look at?
Idle More on reddit.com
40:49
Memory Game Python Project - Complete Memory Game Project Using ...
Python Tkinter Project 05: BlackJack Game - YouTube
Build a Tic-Tac-Toe Game with Python & Tkinter | Tutorial
Python Tkinter Project 06: RPG Game - YouTube
10:54
Number guessing game using python tkinter | Python Tkinter number ...
02:27:15
Python Game Development Project Using OOP – Minesweeper Tutorial ...
GitHub
github.com › itspyguru › Python-Games
GitHub - itspyguru/Python-Games: A collection of small python games made by me using pygame and tkinter libraries · GitHub
This repository contains a collection of small python games made by me using turtle, tkinter and pygame library.
Author itspyguru
Python Guides
pythonguides.com › create-a-snake-game-in-python
Create A Snake Game In Python Tkinter
July 9, 2025 - In this code, we have created a Snake game, set up a scoring system. from tkinter import * from random import randint from PIL import Image, ImageTk movement = 20 steps_per_sec = 10 speed = 1100 // steps_per_sec class Snake(Canvas): def __init__(self): super().__init__( width=700, height=700, background='#53ff1a', highlightthickness=0 ) self.snake_pos = [(100, 80), (80, 100), (80, 100)] self.food_pos = self.set_new_food_pos() self.direction = 'Right' self.score = 0 self.load_img() self.create_objects() self.bind_all('<Key>', self.on_key_press) self.pack() self.after(speed, self.perform_actions
GitHub
github.com › Degef › Snake-Game
GitHub - Degef/Snake-Game: Simple Snake Game made using python Tkinter · GitHub
Simple Snake Game made using python Tkinter. Contribute to Degef/Snake-Game development by creating an account on GitHub.
Author Degef
Project Gurukul
projectgurukul.org › home › python snake game – create snake game program
Python Snake Game - Create Snake Game Program - Project Gurukul
January 14, 2021 - The game is as easy to code as to play and in this article, we will develop snake game in python · We will use python to build the logic of the game and for the interface part, we will use tkinter because it is easy to use. The prerequisites are as follows: Basic concepts of Python, Tkinter · Please download source code of python snake game project: Snake Game Python Code
Reddit
reddit.com › r/python › here's a game i made in python using tkinter!
r/Python on Reddit: Here's a game I made in Python using Tkinter!
July 15, 2017 -
A little while ago, I posted a trailer for the game that I was making called Vector Venture, everyone seemed to like it so here is the follow up post. Now the game has been released and can be downloaded for free! If you have any comments, please ask.
https://jonathanalderson.itch.io/vector-venture
Top answer 1 of 5
35
Using Tkinter? Wow. I absolutely hated that framework because it felt like a mess compared to the clean Python code I saw elsewhere. But I thought Tkinter was for GUI interfaces and not for building games. Could you share why you chose Tkinter for this instead of something like Pygame and some pointers for where to find resources for learning to build games using Tkinter?
2 of 5
17
Holy shit. I don't have to repeat the original thread but you are a glutton for punishment for building that in TKinter. Nice job finishing a project and nice looking game!
CodeWithFaraz
codewithfaraz.com › home › python projects › python snake game tutorial for beginners using tkinter (source code)
Python Snake Game Tutorial for Beginners using Tkinter (Source Code)
July 17, 2024 - Learn Python game development from scratch with our beginner-friendly Snake Game tutorial. Get hands-on experience with source code and step-by-step guidance. ... In this Python tutorial, we'll delve into the exciting world of game development by creating a simple yet addictive Snake game using the Tkinter library.
Medium
prrasad.medium.com › building-a-snake-game-using-python-and-tkinter-a-step-by-step-guide-652ea41d6dd0
Building a Snake Game using Python and Tkinter: A Step-by-Step Guide | by Prasad | Medium
April 29, 2023 - The game keeps track of the player’s score and displays it on the screen. ... import tkinter as tk import random class Snake: def __init__(self, master): self.master = master master.title("Snake") # Set up the game canvas self.canvas = tk.Canvas(master, width=400, height=400, bg='black') self.canvas.pack() # Create the snake and food self.snake = [(200, 200), (190, 200), (180, 200)] self.food = self.create_food() # Set up the game loop self.direction = 'Right' self.game_over = False self.delay = 500 self.score = 0 self.label = tk.Label(master, text=f"Score: {self.score}") self.label.pack() #
GitHub
github.com › saiduc › Connect-4-Tkinter
GitHub - saiduc/Connect-4-Tkinter: Connect 4 game with Tkinter GUI in Python
Simple Connect 4 game made in Python 3 with a Tkinter GUI. This was a personal project to learn how to program user interfaces in Python. The game code itself was written by me in Python2 for my PHYS1201 Programming and Data Analysis module ...
Starred by 4 users
Forked by 3 users
Languages Python 100.0% | Python 100.0%
Medium
medium.com › pythoneers › building-a-tic-tac-toe-game-in-python-with-tkinter-e9060345f629
Building a Tic Tac Toe Game in Python with Tkinter! | by Aarafat | The Pythoneers | Medium
October 10, 2024 - But did you know that you can also ... using Python’s Tkinter library? In this article, we’ll walk through the process of creating a Tic Tac Toe game using Tkinter. By the end of this article, you’ll have a basic understanding of how to create a simple game using a GUI framework, and you’ll have a fun game to play with your friends and family! import tkinter as tk from tkinter import messagebox · The code begins by ...