title: creating different screens in a GUI game on a canvas?
body: <p>This is what I have so far, I am making a game where you have a character (right now it is just a circle) and you have to make it through the game without touching the walls. It will progressively get harder as you can see the first level you wouldn't have to really even do much. What I don't know how to do is create a "Start screen with the game title and a start button as well as a instructions button while still being a 600x600 canvas. I've looked around and there are frames and classes being used in most situations but I also read somewhere you shouldn't use .pack with .grid? If anyone could give me an idea how to just even make one screen I'm sure I could piece the rest together and it would be greatly appreciated!</p>
  
  <pre><code>from Tkinter import *
  
  
  '''global for all three levels'''
  
  root=Tk()
  root.wm_title("Game title")
  canvas = Canvas(root, width=600, height=600, bg = 'white')
  canvas.grid()
  
  circle = canvas.create_oval(280, 280, 300, 300, fill = 'purple')
  dx, dy = 0, 0
  
  def move(e):
      global dx, dy
      if e.keysym == 'Left':
          dx, dy = -5, 0
      elif e.keysym == 'Right':
          dx, dy = 5, 0
      elif e.keysym == 'Up':
          dx, dy = 0, -5
      elif e.keysym == 'Down':
          dx, dy = 0, 5
      elif e.keysym == 's':
          dx, dy = 0,0
  
  def animate():
      x1, y1, x2, y2 = canvas.coords(circle)
      canvas.coords(circle, x1 + dx, y1 + dy, x2 + dx, y2 + dy)
      canvas.after(100, animate)       
  
  root.bind('&lt;Left&gt;', move)
  root.bind('&lt;Right&gt;', move)
  root.bind('&lt;Up&gt;', move)
  root.bind('&lt;Down&gt;', move)
  animate()
  
  
  #class main_Screen()        
  
  #start button, instructions button, want it to be 600x600 same as level screens              
  
  
  
  #class levels()
  
      #def level_One()
  
          #wall1 = canvas.create_rectangle(0, 0, 650, 200, fill='#00ff00')
          #wall2 = canvas.create_rectangle(0, 400, 650, 600, fill='#00ff00')
  
  
      #def level_Two():
  
          #canvas.create_rectangle(500, 0, 600, 600, fill = '#000000')
          #canvas.create_rectangle(490, 600, 500, 0, fill = '#000000')
          #canvas.create_rectangle(400, 90, 490, 360, fill = '#000000')
          #canvas.create_rectangle(440, 40, 0, 0, fill = '#000000')
          #canvas.create_rectangle(260, 40, 350, 210, fill = '#000000')
          #canvas.create_rectangle(60, 90, 210, 240, fill = '#000000')
          #canvas.create_rectangle(0, 0, 10, 310, fill = '#000000')
          #canvas.create_rectangle(0, 290, 120, 600, fill = '#000000')
          #canvas.create_rectangle(400, 600, 440, 410, fill = '#000000')
          #canvas.create_rectangle(440, 410, 270, 500, fill = '#000000')
          #canvas.create_rectangle(490, 360, 220, 260, fill = '#000000')
          #canvas.create_rectangle(220, 260, 170, 560, fill = '#000000')
          #canvas.create_rectangle(170, 560, 210, 240, fill = '#000000')
          #canvas.create_rectangle(350, 560, 220, 550, fill = '#000000')
  
  
  
      #def level_Three()
  
  
  root.mainloop()
  </code></pre>