Python Forum
[PyGame] Terrible Sprite controls, need help.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Terrible Sprite controls, need help.
#6
I get no error when I run your code. What yours python and pygame version.
My python version 3.7.3, pygame version 1.9.6.

All my math is base on delta not being divide by 1000.
delta = clock.tick(60)
You also going to want to change original surface. To alpha state and copy original image not assign.
    self.original_image = pygame.Surface((10, 20), pygame.SRCALPHA)
    self.original_image.fill((100, 200, 200))
    self.image = self.original_image.copy()

Could try: On line 65.
self.rect.center = tuple(map(int, self.position))
99 percent of computer problems exists between chair and keyboard.
Reply


Messages In This Thread
RE: Terrible Sprite controls, need help. - by Windspar - Dec-15-2019, 08:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] Sprite image.get_rect() moves sprite to 0, 0 michael1789 2 4,677 Dec-13-2019, 08:37 PM
Last Post: michael1789
  Sprite not rendering Clunk_Head 2 2,242 Oct-03-2019, 11:27 AM
Last Post: Clunk_Head
  Need help making a sprite GalaxyCoyote 4 3,355 Aug-11-2019, 09:12 PM
Last Post: metulburr
  moving a sprite pfaber11 3 2,673 May-15-2019, 12:52 PM
Last Post: pfaber11
  [PyGame] Need Help With Sprite ghost0fkarma 2 3,349 Jan-09-2018, 02:14 PM
Last Post: ghost0fkarma
  [PyGame] Snake controls not working jakegold98 5 6,577 Dec-12-2017, 01:45 AM
Last Post: Windspar

Forum Jump:

User Panel Messages

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