[pygame] Odd Window Problem
Hi, I am having a weird window problem. I am trying to have my pygame window come up on a second screen so before starting my app I am setting the SDL_VIDEO_WINDOW_POS environment variable to 800, 0 (800 being the edge of my first screen. For some reason the window will not move all the way over to 800. I thought there might be a problem with setting the environment variable but if I pick up the window with my cursor and try and move it it also gets stuck at the same point and I can't move it any further. It is like pygame thinks the edge of the screen is there and not where it should be. I can move my cursor beyond the point that the window gets stuck so I don't think this is an X or video configuration problem. This is running on linux. Any idea what could be going on? Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. 613-608-9752
Re: [pygame] Odd Window Problem
Nevermind it was an X problem. On 11-03-30 9:23 AM, Bram Cymet wrote: Hi, I am having a weird window problem. I am trying to have my pygame window come up on a second screen so before starting my app I am setting the SDL_VIDEO_WINDOW_POS environment variable to 800, 0 (800 being the edge of my first screen. For some reason the window will not move all the way over to 800. I thought there might be a problem with setting the environment variable but if I pick up the window with my cursor and try and move it it also gets stuck at the same point and I can't move it any further. It is like pygame thinks the edge of the screen is there and not where it should be. I can move my cursor beyond the point that the window gets stuck so I don't think this is an X or video configuration problem. This is running on linux. Any idea what could be going on? Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. 613-608-9752
[pygame] State of the movie module in pygame 1.9.0
Hi, What is the state of the movie module in pygame 1.9? Is it still the old one using smpeg or had it been updated to use ffmpeg? Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752
Re: [pygame] State of the movie module in pygame 1.9.0
Thanks, I am using linux. Do you know where I can find the patch to use ffmpeg in pygame? On 05/10/2010 07:44 AM, René Dudfield wrote: hi, it's the old one. The new one needs porting to mac/windows... but should work on linux at least. cheers, On Mon, May 10, 2010 at 12:27 PM, Bram Cymet bcy...@cbnco.com mailto:bcy...@cbnco.com wrote: Hi, What is the state of the movie module in pygame 1.9? Is it still the old one using smpeg or had it been updated to use ffmpeg? Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752 -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752
Re: [pygame] State of the movie module in pygame 1.9.0
I got it to compile fine but now I am getting a seg fault when running __movie_test.py in the examples directory: Program received signal SIGSEGV, Segmentation fault. 0x7fffea37c63e in _movie_init (self=0xbe3cb0, args=value optimized out, kwds=value optimized out) at src/gmovie.c:89 89if(surf PySurface_Check(surf)) Any idea what could be messing up? On 05/10/2010 10:19 AM, Tyler Laing wrote: You just need to change a few lines in the build file Setup.in: #_movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c $(SDL) $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG) Uncomment that line. Then type ./configure and then compile and build. :)The code is all there and should work if you have the ffmpeg libraries installed. Let me know if it doesn't. On Mon, May 10, 2010 at 5:09 AM, Bram Cymet bcy...@cbnco.com mailto:bcy...@cbnco.com wrote: Thanks, I am using linux. Do you know where I can find the patch to use ffmpeg in pygame? On 05/10/2010 07:44 AM, René Dudfield wrote: hi, it's the old one. The new one needs porting to mac/windows... but should work on linux at least. cheers, On Mon, May 10, 2010 at 12:27 PM, Bram Cymet bcy...@cbnco.com mailto:bcy...@cbnco.com wrote: Hi, What is the state of the movie module in pygame 1.9? Is it still the old one using smpeg or had it been updated to use ffmpeg? Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752 -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752 -- Tyler Laing Online Editor The Phoenix Newspaper (1) 250 863-4869 University of British Columbia - Okanagan University Way Kelowna, BC UNC 109 Student Services Building -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752
[pygame] Adding Opengl to an existing app
Hi, I have an existing app that works very well and now I want to add an opengl segment. I have the opengl park working just fine as a stand alone app but when I try to integrate it into the main app that is when things go bad. In my existing app I use thing like surface.fill and display.update which is not allowed on an opengl surface. Is there anyway that I can start with a regular pygame surface then make it an opengl surface when I need it to be and then switch it back when I am done with OpenGL. I am not adversed to having two surfaces as long as I can control which one is on top. I tried doing this but as soon as I create the opengl surface it seems to replace the regular surface. I suppose I could just launch a second app to display the opengl portion but I would really like to avoid doing this. Any ideas would be great! Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752
Re: [pygame] Adding Opengl to an existing app
I am also not adversed to re-writing my existing app so that it works fine on an opengl surface but if possible I would like to avoid this as it looks like quite the large task especially when it comes to text usage. On 04/27/2010 04:16 PM, Bram Cymet wrote: Hi, I have an existing app that works very well and now I want to add an opengl segment. I have the opengl park working just fine as a stand alone app but when I try to integrate it into the main app that is when things go bad. In my existing app I use thing like surface.fill and display.update which is not allowed on an opengl surface. Is there anyway that I can start with a regular pygame surface then make it an opengl surface when I need it to be and then switch it back when I am done with OpenGL. I am not adversed to having two surfaces as long as I can control which one is on top. I tried doing this but as soon as I create the opengl surface it seems to replace the regular surface. I suppose I could just launch a second app to display the opengl portion but I would really like to avoid doing this. Any ideas would be great! Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752
Re: [pygame] Rotation Performance
Thanks everyone for the help. I used the suggestion of caching the rotations and that works really well. On 01/21/2010 11:55 AM, Brian Fisher wrote: .2 seconds to rotate an image sounds ridiculously long - that sounds broken. Are you sure it can take that long just to do the rotation? How big is this image? Can you share a minimal sample (like 1 file + the image) that does the rotations and prints out the timings, which goes really slow for you? If you do that, then others can run it as well to see if they get the same slowness you do. On Wed, Jan 20, 2010 at 5:08 PM, Bram Cymet bcy...@cbnco.com mailto:bcy...@cbnco.com wrote: Hi All, I did some profiling of my pygame application and I found that it was spending a lot of time doing rotation operations. Basically I have some balls on the screen that are represented by gifs with transparent backgrounds and I want to make them spin. I use the following code: These first two lines are only run in init for the object self.image = pygame.image.load('image.gif') self.image = self.image.convert() self.image = pygame.transform.rotate(self.image, degrees) self.rect = self.image.get_rect() Then I return the rect and blit and update that part of the screen. A lot of time is spent on that pygame.transform.rotate command. On my laptop with a dual core 2.2 ghz processor if works fine. However on the target hardware which is: Atom 330 (dual core 1.6 ghz) with an ION chipset and graphics it runs very slow and can take up to 0.2 seconds to execute just that one line of code. Is there something I am doing wrong? Is there some way I can make this faster. I am not sure if it matters but just for the sake of completeness: the application is multi-threaded but only one thread is running during this part of the application. Any help would be great. Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752 -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752
[pygame] Rotation Performance
Hi All, I did some profiling of my pygame application and I found that it was spending a lot of time doing rotation operations. Basically I have some balls on the screen that are represented by gifs with transparent backgrounds and I want to make them spin. I use the following code: These first two lines are only run in init for the object self.image = pygame.image.load('image.gif') self.image = self.image.convert() self.image = pygame.transform.rotate(self.image, degrees) self.rect = self.image.get_rect() Then I return the rect and blit and update that part of the screen. A lot of time is spent on that pygame.transform.rotate command. On my laptop with a dual core 2.2 ghz processor if works fine. However on the target hardware which is: Atom 330 (dual core 1.6 ghz) with an ION chipset and graphics it runs very slow and can take up to 0.2 seconds to execute just that one line of code. Is there something I am doing wrong? Is there some way I can make this faster. I am not sure if it matters but just for the sake of completeness: the application is multi-threaded but only one thread is running during this part of the application. Any help would be great. Thanks, -- Bram Cymet Software Developer Canadian Bank Note Co. Ltd. Cell: 613-608-9752
[pygame] Pygame and windows managers
Hi, I am currently using pygame on a xandros linux based eee pc. When I run pygame.init() and then pygame.display.info() I get that the system in not compatible with a windows manager. I know that it is because I can open other stuff in windows within the OS. Any ideas what could be going on? Thanks -- Bram Cymet Software Developer Centre For Technological Innovation Canadian Bank Note Co. Ltd. Cell: 613-608-9752
Re: [pygame] Pygame and windows managers
One thing I just noticed is that when I run pygame.display.get_driver() it returns fbcon where I am thinking this should return x11. Is there anywhere I can set the display driver that pygame uses? Bram Cymet wrote: Hi, I am currently using pygame on a xandros linux based eee pc. When I run pygame.init() and then pygame.display.info() I get that the system in not compatible with a windows manager. I know that it is because I can open other stuff in windows within the OS. Any ideas what could be going on? Thanks -- Bram Cymet Software Developer Centre For Technological Innovation Canadian Bank Note Co. Ltd. Cell: 613-608-9752
Re: [pygame] Pygame and windows managers
Thanks for the response, I have tried just using pygame regardless. I only actually found out about the info stuff while trying to debug problems. The actual problem I am having is that the only mode that pygame seems to see is 640X480 even though the screen in the eee pc can do 1200X800 and I am using it with an external display and I need it to do 1360X768 which is outputting just fine with other applications. Patrick Mullen wrote: It looks like your eee pc is using directfb or some sort rather than standard x11. fbcon = framebuffer console maybe? Not sure. I did some googling and found some reports of people having trouble in this regard, with other reports of it working. By the way, have you tried skipping the display.info and just trying to use pygame anyway? Also an actual error log might be helpful. -- Bram Cymet Software Developer Centre For Technological Innovation Canadian Bank Note Co. Ltd. Cell: 613-608-9752
Re: [pygame] Pygame and windows managers
Lenard Lindstrom wrote: Bram Cymet wrote: One thing I just noticed is that when I run pygame.display.get_driver() it returns fbcon where I am thinking this should return x11. Is there anywhere I can set the display driver that pygame uses? Set the SDL_VIDEODRIVER environment variable to 'x11'. I have just added this question in the Pygame FAQ: http://www.pygame.org/wiki/FrequentlyAskedQuestions Thanks for the tip. I had tried that one, just found it earlier today. After doing it is says something like video system no initialized and pygame.init() returns (5,1) so something failed. I am thinking there is a driver missing somewhere I am just sure what I need to install. -- Bram Cymet Software Developer Centre For Technological Innovation Canadian Bank Note Co. Ltd. Cell: 613-608-9752
[pygame] Display Modes
Hi, I am working on an application using pygame that will run on an Asus eeePC connected to a larger monitor. I am having this issue where the monitor is displaying the correct resolution but when I run pygame.display.list_modes() the only mode I get is 640x480 where I should be getting 1360x768. I did run pygame.init() and it ran fine. Any ideas? Thanks, -- Bram Cymet Software Developer Centre For Technological Innovation Canadian Bank Note Co. Ltd. Cell: 613-608-9752