Python Forum
Drawn line shift when that surface is copied to another in pygame
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drawn line shift when that surface is copied to another in pygame
#5
(Feb-08-2021, 04:21 PM)nilamo Wrote: Pygame is a pretty barebones library, and there's definitely a lot of work involved to use it.
Pyglet is perhaps more geared to 3d games, and can fairly easily use shaders to take advantage of the gpu (which pygame cannot do).

I think you might have more luck using a 16x16 list/array as the "pixels", and then converting that to a surface as needed so it can be rendered at any size (allowing for zooming, or having it visible in multiple places [perhaps a zoomed in workspace, and an actual-size view next to it]). Or, you could try doing all your processing using Pillow, which is an incredible graphics package, again rendering it to a surface as needed.

I will definitely try it out, I am sure it will fix the zoom problem. But, it still does not fix the shift problem. While trying to fix the issue, I found that mouse cords does somehow change when clicked. Maybe if I some how filter incorrect mouse readings, but I failed on doing it. On a side note, I found cocos2D which is based on pyglet, It does have some neat features and is also fast, but does not have any sort of documentation (It does, but it is really bad). I also found pycairo, but the same problem (Bad docs). It turns out tkinter has a lot of good feature for drawing. But, I did not choose that as i am trying to go for a pixel UI and not the generic OS UI. Still nothing that fits my needs. I want a good foundation for my project. Someone needs to make a great drawing lib in python LOL Is there any good drawing libs that I don't know of?

Thanks for helping Heart
Reply


Messages In This Thread
RE: Drawn line shift when that surface is copied to another in pygame - by Leo_Red - Feb-11-2021, 06:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] Surface and rectangle in pygame Fabrizio_fg 6 2,415 May-27-2023, 09:15 AM
Last Post: Fabrizio_fg
  [PyGame] Pygame is treating blob_group as a surface, when I need it to treat it as a Sprite. Swagford 1 1,340 Jan-24-2023, 09:58 PM
Last Post: metulburr
  Coloring a surface with transparency Sandor 4 2,373 Jan-02-2022, 08:11 AM
Last Post: Sandor
  [PyGame] pygame.Surface.fill help Shemira 3 6,235 Nov-29-2019, 12:01 AM
Last Post: Shemira
  pygame and shift branching? MuntyScruntfundle 2 3,429 Feb-23-2019, 01:39 PM
Last Post: Windspar
  pygame.surface Graham 10 8,524 Nov-29-2018, 04:45 PM
Last Post: nilamo
  [PyGame] PLEASE HELP! TypeError: unsupported operand type(s) for +: 'pygame.Surface' and 'int' keyfive 1 5,325 Jun-19-2018, 01:20 PM
Last Post: volcano63

Forum Jump:

User Panel Messages

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