Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:26:13+00:00 2026-06-17T13:26:13+00:00

When I play test on linux, everything is fine, but on my windows machine,

  • 0

When I play test on linux, everything is fine, but on my windows machine, I can’t go diagonally down and to the left (but can go the other three diagonals).

if event.type == QUIT or event.type == KEYDOWN and event.key == K_ESCAPE:
        self.running = False
    if event.type == KEYDOWN:
        if event.key == K_SPACE:
            self.player.shooting = True
        if event.key == K_UP:
            self.player.moving.add("forward")
        if event.key == K_DOWN:
            self.player.moving.add("back")
        if event.key == K_RIGHT:
            self.player.moving.add("right")
        if event.key == K_LEFT:
            self.player.moving.add("left")
    if event.type == KEYUP:
        if event.key == K_SPACE:
            self.player.shooting = False
        if event.key == K_UP:
            self.player.moving.remove("forward")
        if event.key == K_DOWN:
            self.player.moving.remove("back")
        if event.key == K_RIGHT:
            self.player.moving.remove("right")
        if event.key == K_LEFT:
            self.player.moving.remove("left")

Here’s the update method that does the moving:

def update (self, time_passed):

    tp = time_passed # From clock.tick(60)
    if self.moving:
        if "forward" in self.moving and (self.rect.top > 0):
            self.rect.move_ip(0, -self.speed*tp)
        if "back" in self.moving and (self.rect.bottom < self.screen_ref[1]):
            self.rect.move_ip(0, self.speed*tp)
        if "left" in self.moving and (self.rect.left > 0):
            self.rect.move_ip(-self.speed*tp, 0)
        if "right" in self.moving and (self.rect.right < self.screen_ref[0]):
            self.rect.move_ip(self.speed*tp, 0)

I checked just now to double check I didn’t break anything confirmed. Diagonally down and to the left doesn’t work. I either start going down and then change to moving left, are start off going left and change to moving down. Anyone have any ideas why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:26:15+00:00Added an answer on June 17, 2026 at 1:26 pm

    If this code works on Linux I’d expect it to work exactly the same in Windows. Problems like this are often related to hardware limitations of the keyboard.

    Did you use exactly the same setup for both tests, specifically the keyboard? If you used the same keyboard for both tests, I’d be inclined to blame the Windows drivers.

    Before you blame the code, make sure that you can press those two keys at once and get the expected result. Fire up a flash game or something for a quick test.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a folder in windows/Linux which has below files test_1a.play test_1AA.play test_1aaa.play test-_1AAAA.play
I am trying to test the new subscriptions in Google Play but the service
I'm trying to start Play 1.2.3 in test mode using play test but I
I can run a single selenium test in play's browser UI, however, is it
I have a very simple test app just to play around with Windows Phone
I am building an intial-data.yml file to test my Play! application, but when I
When executing 'play test', is there a way to pass in system properties to
I use play2 to create a default scala app: play new test Then: play
I'm trying to test a model method using Play Framework 2.0 and Specs2. Global.scala
testing Play framework and JPA. I eclipsify my very simple test application. Import the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.