Feb-11-2021, 06:33 AM
(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 Is there any good drawing libs that I don't know of?
Thanks for helping