Python Forum
Simple maze game controls
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple maze game controls
#1
My assignment is to create a simple maze game. So far everything is working, but i am unhappy with the movement of my sprite.
turtle.listen()
turtle.onkeypress(player.go_left,"a")
turtle.onkeypress(player.go_right,"d")
turtle.onkeypress(player.go_up,"w")
turtle.onkeypress(player.go_down,"s")
At the moment this code can make my sprite move using "w", "a", "s", "d" keys to move and you are able to hold down the key to continuously move. What i need help with is the sprite will move one "block" wait a second then start moving. I was wondering if there anyway to make it move as soon as the keys presses?


Sorry if there's any grammar or punctuation errors
Reply


Messages In This Thread
Simple maze game controls - by OmegaSupreme - Apr-25-2019, 05:04 AM
RE: Simple maze game controls - by SheeppOSU - Apr-25-2019, 05:16 PM
RE: Simple maze game controls - by OmegaSupreme - Apr-26-2019, 12:19 AM
RE: Simple maze game controls - by SheeppOSU - Apr-26-2019, 01:59 AM
RE: Simple maze game controls - by OmegaSupreme - Apr-26-2019, 08:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Heuristic for GBFS Maze RockBlok 0 351 Jan-30-2024, 12:12 AM
Last Post: RockBlok
  Using If Statements Instead of While Loop in Simple Game Program new_coder_231013 5 3,253 Dec-14-2021, 12:23 AM
Last Post: supuflounder

Forum Jump:

User Panel Messages

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