Python Forum
Small game (school project)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small game (school project)
#8
Hello,

We have tons of things to do... and this project on the side that needs continuous work... Others are beginning to understand it will need more than a week-end, but so far, I came up with this...

The main background is set and the "quit" option works. It is thus an acceptable program... hum hum... Cool


import Tkinter as tk
 
color =  '#2c3e50'

Francais = ["Nouvelle partie", "Sauver", "Charger", "Quitter", "Changer de langue", "Aide"]

#crea fen
window = tk.Tk()
#change tk pour titre
window.title("Bathathaï") 
#crea canvas
display = tk.Canvas(window, width=1280, height=720)
#affichage fond carte (remplacer par image le fond) 
carte = display.create_rectangle(25, 50, 676, 701, fill="grey") # 93*7 
#affichage grille
xa = 35
ya = 60
for i in range(8):
    display.create_line(xa, ya, xa, ya + 630)
    xa += 90
xa = 35 #reset xa
for i in range(8):
    display.create_line(xa, ya, xa + 630, ya)
    ya += 90

#affichage fond menu
menu = display.create_rectangle(700, 50, 1250, 350, fill="blue")
#affichage fond texte
affichage = display.create_rectangle(700, 375, 1250, 700, fill="white")
#packing dcanvas display
display.pack()

#bouton quitter + placement
button1 = tk.Button(window, text = Francais[3], command = window.destroy)
button1.place(x=1075, y = 100)

#mainloop
window.mainloop()
The next step is quite crucial. I want to create the working coordinates of the map. Movements will be only NWSE, one tile at the time, and we will need to be able to cast spells on units. Is there a simple method for that or do I need to create a list of tupples with 49 coordinates?
Reply


Messages In This Thread
Small game (school project) - by Ganesh - Oct-24-2017, 09:09 PM
RE: Small game (school project) - by Larz60+ - Oct-24-2017, 10:23 PM
RE: Small game (school project) - by Ganesh - Oct-25-2017, 07:40 AM
RE: Small game (school project) - by Larz60+ - Oct-25-2017, 10:25 AM
RE: Small game (school project) - by Ganesh - Nov-02-2017, 02:33 PM
RE: Small game (school project) - by Larz60+ - Nov-02-2017, 03:54 PM
RE: Small game (school project) - by nilamo - Nov-02-2017, 09:27 PM
RE: Small game (school project) - by Ganesh - Nov-08-2017, 09:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  my python project for school vavervirus 2 762 Oct-12-2023, 03:28 AM
Last Post: buran
Shocked School project -- need help with it it says syntax error XPGKNIGHT 6 3,452 Aug-11-2022, 08:43 PM
Last Post: deanhystad
  Need some help with Dice Game for daughter in school OptX 2 1,999 Feb-12-2021, 08:43 PM
Last Post: BashBedlam
  School project janivar91 3 2,830 Jan-23-2021, 06:31 AM
Last Post: KonohaHokage
  problem on creating a small game nayo43 5 2,891 Dec-13-2020, 01:03 PM
Last Post: jefsummers
  Python School Project andreas30298 2 2,225 Nov-12-2020, 09:58 AM
Last Post: Axel_Erfurt
  Guidance on solving an "if else loop" in this small project ando 5 2,832 Mar-27-2020, 10:56 PM
Last Post: ando
  I need help for a school project IndyNeerhoff 1 2,157 Sep-28-2019, 08:28 PM
Last Post: Gribouillis
  [Tkinter] Tkinter project school Kersow 2 2,542 Apr-08-2019, 08:45 PM
Last Post: Larz60+
  card dealer school project kalle1234 5 13,131 Jan-05-2019, 09:21 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020