Re: [pygame] Start of an OpenGL accelerated Pygame
Paul Vincent Craven : I looked at the drawing primitives portion of pygame reloaded, and I knew that was not the way I wanted to go. It was still software driven. For things like line widths, it supported only horizontal and vertical lines. Plus it wasn't a drop-in replacement. The things I put together for ellipses and lines only work with OpenGL though. SDL doesn't have primitives for line thickness or ellipses, so if a program uses software or directx for graphics you are out of luck. Reinventing the wheel is never a good idea, I'm hoping some of the other pygame packages can port more directly. Seconded. Did you look at the old code? I can't remember to have written any line drawing code for the SDL2 code of pgreloaded. Cheers Marcus
Re: [pygame] import pygame.font failing
Is this a more updated website for pygame than pygame.org? Em quinta-feira, 28 de fevereiro de 2013 09h06min29s UTC-3, Paul Vincent Craven escreveu: > > I have instructions on pygame.info under 'developers'. It is pretty easy. > > Paul Vincent Craven > > On Feb 28, 2013, at 4:55 AM, Sam Bull > > wrote: > > > On Thu, 2013-02-28 at 10:33 +, Kai Childheart wrote: > >> I can't find any other Pygame in the repository (Fedora). > > > > I have the same problem in Ubuntu, if you want a Python 3 version, you > > probably need to compile it yourself. Maybe René or someone can point > > out the information for this, I can't remember where the details for > > this are. >
Re: [pygame] Loading files from .tar
I'm just curious before trying it on my own code: In the first *try*, you opened the file as *"wb"* and then, called f.write( data*)*. What does it mean? Why not *"r"* and *f.read()*? Thanks! Em segunda-feira, 25 de fevereiro de 2013 04h33min16s UTC-3, Radomir Dopieralski escreveu: > > On Mon, Feb 25, 2013 at 3:33 AM, Vinícius Naves Castanheira > > wrote: > > In order to make the game more presentable to the user, I have this idea > on > > putting all the resources on a .tar file (and further compiling > everything > > in a single .exe) > [...] > > > Anyone has tried this before? > > Yes, although it's much easier using a zip file. > I described my method at > http://sheep.art.pl/Your%20Python%20Application%20as%20a%20Single%20File > > -- > Radomir Dopieralski, http://sheep.art.pl >
Re: [pygame] How to control the physical size of displayed objects?
On Thu, Feb 28, 2013 at 01:28:01PM +0100, Mathieu Dubois wrote: > > > Le 27/02/2013 22:33, Julian a écrit : >> On 02/27/2013 04:23 PM, Mathieu Dubois wrote: >>> Just a last question: do you think the horizontal and vertical factors >>> has to be the same? Because list_modes() tells me that my monitor can >>> display: 1280x800 (ratio: 1.6), 1024x768 (ratio: 1.33), 800x600 >>> (ratio: 1.33), 640x480 (ratio: 1.33). >> >> You mean dealing with wrong aspect ratios? That's a tough one because >> different drivers handle it differently; some distort the picture, some >> zoom it while maintaining the aspect ratio, some don't zoom it at all. I >> would say that it's best to either assume there is no distortion of >> aspect ratio (i.e. a square is a square), or allow a horizontal >> adjustment that normally syncs with the vertical adjustment. > > I'm not sure to understand the difference between the 2 solutions you > suggest but it seems reasonnable to assume that the horizontal and > vertical ratios are the same (a square image of say 256x256 pixels will > be displayed as a square). > > I will try to code a simple application in order to test. > > Mathieu > Unfortunately, no you cannot assume a square aspect ratio. A widescreen monitor could be using a non-widescreen resolution, or vice-versa. There is no reliable way to know. I discovered that The Gimp uses on-screen rulers to calibrate DPI, you might want to look at how it is done there. (Edit->Preferences->Display and then click the calibrate button) --- James Paige
[pygame] unsubscribe pygame-users
unsubscribe pygame-users
Re: [pygame] import pygame.font failing
On 28 February 2013 12:12, Kai Childheart wrote: > Even still I sudo yum'd the thing from the Fedora repository do I really > need to compile from source? The last thing I compiled from source didn't > work with anything and I had to rm -rf the lot. > The Fedora package is probably for Python 2 - I know that the Ubuntu package python-pygame is, for example. Thomas
Re: [pygame] How to control the physical size of displayed objects?
Le 27/02/2013 22:33, Julian a écrit : On 02/27/2013 04:23 PM, Mathieu Dubois wrote: Just a last question: do you think the horizontal and vertical factors has to be the same? Because list_modes() tells me that my monitor can display: 1280x800 (ratio: 1.6), 1024x768 (ratio: 1.33), 800x600 (ratio: 1.33), 640x480 (ratio: 1.33). You mean dealing with wrong aspect ratios? That's a tough one because different drivers handle it differently; some distort the picture, some zoom it while maintaining the aspect ratio, some don't zoom it at all. I would say that it's best to either assume there is no distortion of aspect ratio (i.e. a square is a square), or allow a horizontal adjustment that normally syncs with the vertical adjustment. I'm not sure to understand the difference between the 2 solutions you suggest but it seems reasonnable to assume that the horizontal and vertical ratios are the same (a square image of say 256x256 pixels will be displayed as a square). I will try to code a simple application in order to test. Mathieu
Re: [pygame] import pygame.font failing
Hi Paul, http://programarcadegames.com/index.php << needs some updating then. (You're, the same Paul Vincent Craven right or is this just some joke being played!?) Even still I sudo yum'd the thing from the Fedora repository do I really need to compile from source? The last thing I compiled from source didn't work with anything and I had to rm -rf the lot. Thanks On 28 February 2013 12:06, Paul Vincent Craven wrote: > I have instructions on pygame.info under 'developers'. It is pretty easy. > > Paul Vincent Craven > > On Feb 28, 2013, at 4:55 AM, Sam Bull wrote: > > > On Thu, 2013-02-28 at 10:33 +, Kai Childheart wrote: > >> I can't find any other Pygame in the repository (Fedora). > > > > I have the same problem in Ubuntu, if you want a Python 3 version, you > > probably need to compile it yourself. Maybe René or someone can point > > out the information for this, I can't remember where the details for > > this are. >
Re: [pygame] import pygame.font failing
I have instructions on pygame.info under 'developers'. It is pretty easy. Paul Vincent Craven On Feb 28, 2013, at 4:55 AM, Sam Bull wrote: > On Thu, 2013-02-28 at 10:33 +, Kai Childheart wrote: >> I can't find any other Pygame in the repository (Fedora). > > I have the same problem in Ubuntu, if you want a Python 3 version, you > probably need to compile it yourself. Maybe René or someone can point > out the information for this, I can't remember where the details for > this are.
Re: [pygame] import pygame.font failing
On Thu, 2013-02-28 at 10:33 +, Kai Childheart wrote: > I can't find any other Pygame in the repository (Fedora). I have the same problem in Ubuntu, if you want a Python 3 version, you probably need to compile it yourself. Maybe René or someone can point out the information for this, I can't remember where the details for this are. signature.asc Description: This is a digitally signed message part
Re: [pygame] import pygame.font failing
Hi, Thanks, Sam but apparently there is no Pygame for python3, it 'should' just work. Pygame imports just fine which is odd. I can draw lines and rects no problem. But when I type pygame.font.Font(None, 25) # Or something to that effect... I get the same problem. I think this covers Julians' email too (thanks). I can't find any other Pygame in the repository (Fedora). If I use 9. if pygame.font: 10.print("Font Found") I get the output: "Font Found" which is really confusing. This is the terminal output I get without importing font explicitly... 1. python3 ch1.py 2. Font found! 3. ch1.py:53: RuntimeWarning: use font: No module named font 4. (ImportError: No module named font) 5. font = pygame.font.Font(None, 25) 6. Traceback (most recent call last): 7. File "ch1.py", line 53, in 8. font = pygame.font.Font(None, 25) 9. File "/usr/lib/python3.2/site-packages/pygame/__init__.py", line 70, in __getattr__ 10. raise NotImplementedError(MissingPygameModule) 11. NotImplementedError: font module not available 12. (ImportError: No module named font) On 28 February 2013 03:11, Julian wrote: > On 02/27/2013 06:51 PM, Kai Childheart wrote: > >> 5. import pygame >> 6. import pygame.font >> 7. >> 8. pygame.init( ) >> > > I don't know if this is your problem, but you're normally not supposed to > import pygame.font explicitly. It comes with the pygame module. > > If the font module is unavailable, you will get an error when you try to > use a font. >