title: How to shoot a bullet towards mouse cursor in pygame
body: <p>I'm trying to create a top down shooter in pygame. I figured out how to shoot bullets towards the cursor, but I've got a problem with my implementation. When the mouse cursor is on or very close to the player the bullets that are shot out are really slow. I don't know why. How do I fix this?</p>
  <p>My code:</p>
  <pre><code>mouse_x, mouse_y = pygame.mouse.get_pos()
  from_player_x, from_player_y = mouse_x - self.rect.x, mouse_y - self.rect.y
  x_speed, y_speed = round(from_player_x * 0.1), round(from_player_y * 0.1)
  self.speed_x = x_speed
  self.speed_y = y_speed
  ...
  self.rect.x += self.speed_x
  self.rect.y += self.speed_y
  </code></pre>