Re: [pygame] my 3d planet game
Looks like the culprit is if sys.platform == 'win32': os.environ['SDL_WINDOWID'] = str(self.GetHandle()) os.environ['SDL_VIDEODRIVER'] = 'windib' If I take it out completely, it works regardless. Wierd, but I'll try to get the gluPerspective to work and update a new version. Thanks. Cheers Charlie Nolan wrote: Works fine for me on almost-pristine 1.8. (I've got a patch in locally to fix the buffer is always 256 bug that tends to cause crackly sound.) -FM Astan Chee wrote: Ok. I just tried upgrading to pygame 1.8 and true enough, nothing appears. Im not sure why. Maybe doing the env var settings ( http://wiki.wxpython.org/IntegratingPyGame ) breaks something new that is introduced in 1.8? I reverted it back to 1.7.1 and it worked again fine. Although using 1.8 didnt break my other games that were pure pygame, only the ones that did things mentioned in that website. Anyone have any idea why? Cheers Astan Astan Chee wrote: This is very unusual. Can you get a screenshot of this fuzzy circle and two small dots? Maybe its the size of the pygame window not sizing properly. Also, once you click on the navigate/open navigation button, the pygame window behaves like a wxDialog, in that it becomes a child window of the main UI and unless the child window is closed, interaction with the parent is disabled. Anyway, I'll try and upgrade mine to pygame 1.8 and see if it still happens. Thanks again Cheers etrek wrote: I have tried both ways to open navigation console. I create some objects and then click on Navigation Information tab. Then click on Resume button to start time. Then click on Navigate/Open Navigation Console button. A separate Pygame window does not appear. All I see is a fuzzy circle and two small dots (My guess is they represent, Sun,Earth,Moon) on the same screen as the Navigation Information UI screen. Also, once I have clicked on the Navigate/Open Navi... button, the UI becomes unresponsive, i.e. Pause button, tabs (Object Editor, etc.) stop working, and can't resize or move the UI. I have to close the Python.exe console window, or shut the program down in Task Manager in order to shut it down. I have Windows Vista32, Pygame 1.8.0, latest wxPython, Python 2.5 and PyOpengl -etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 6:41 PM Subject: Re: [pygame] my 3d planet game I havent tested this in pygame 1.8.0. There are 2 ways of opening the navigation console, via the menu and from the button. Both open a new window (pygame window) with the 3D shape. While the console is open, you cant interact with the main window. The new pygame window has to be closed before normal interaction can be resumed (kinda mimicing the dialog modal behaviour). The navigation console should have 2 minimaps on the bottom right and left corner. Are this not appearing for you? Cheers etrek wrote: Does this work with Pygame 1.8.0? Is the Navagation Console supposed to be on the same screen as the Navagation menu? Or is it supposed to open a new window (Pygame window) with the 3D shapes? All I see is a fuzzy dark circle on the Navagation menu page. The navagation keys, or clicking with mouse just causes the circle to flicker. Thanks, etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 2:21 AM Subject: Re: [pygame] my 3d planet game Charlie Nolan wrote: Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). Thanks. Im not so good at manuals or documenting code. * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. Ah, I didnt notice that. I'll fix it in the next version as well as a text based manual. Let me know if its too confusing. Thanks again Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http
Re: [pygame] my 3d planet game
Hi, Thanks for the tip. Right now Im still researching on how to network the games so that it plays like MMOs. But yes, along the way there will be a need for messaging other players as well as trading with other players. thanks again M. Peterson wrote: hi if your game is network ready, can you make a plugoin for the messenger http://retroshare.sf.net http://retroshare.sf.net/ so that 2 buddies in the friendslist can play against eacvh other?` Please habe a look later, as more games soon will be integrated. Thx Max On Thu, Jun 12, 2008 at 10:20 AM, Astan Chee [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi guys, I've been working on my 3d planet game and now it is finally done. For those of you interested the source can be found at: http://code.google.com/p/planetgame/ If you are using linux, I dont think it should be a problem. If you are using windows and cant get it to run, tell me your msn (I think even email attachments wont let over 20MB files through) and I'll compile it and send it to you. The compiled one is about 50MB, so I cant host it anywhere without paying in one place. Also, this is kinda like a post-prototype, so any feedback is much appreciated. Cheers Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. http://www.animallogic.com/ Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
I have tried both ways to open navigation console. I create some objects and then click on Navigation Information tab. Then click on Resume button to start time. Then click on Navigate/Open Navigation Console button. A separate Pygame window does not appear. All I see is a fuzzy circle and two small dots (My guess is they represent, Sun,Earth,Moon) on the same screen as the Navigation Information UI screen. Also, once I have clicked on the Navigate/Open Navi... button, the UI becomes unresponsive, i.e. Pause button, tabs (Object Editor, etc.) stop working, and can't resize or move the UI. I have to close the Python.exe console window, or shut the program down in Task Manager in order to shut it down. I have Windows Vista32, Pygame 1.8.0, latest wxPython, Python 2.5 and PyOpengl -etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 6:41 PM Subject: Re: [pygame] my 3d planet game I havent tested this in pygame 1.8.0. There are 2 ways of opening the navigation console, via the menu and from the button. Both open a new window (pygame window) with the 3D shape. While the console is open, you cant interact with the main window. The new pygame window has to be closed before normal interaction can be resumed (kinda mimicing the dialog modal behaviour). The navigation console should have 2 minimaps on the bottom right and left corner. Are this not appearing for you? Cheers etrek wrote: Does this work with Pygame 1.8.0? Is the Navagation Console supposed to be on the same screen as the Navagation menu? Or is it supposed to open a new window (Pygame window) with the 3D shapes? All I see is a fuzzy dark circle on the Navagation menu page. The navagation keys, or clicking with mouse just causes the circle to flicker. Thanks, etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 2:21 AM Subject: Re: [pygame] my 3d planet game Charlie Nolan wrote: Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). Thanks. Im not so good at manuals or documenting code. * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. Ah, I didnt notice that. I'll fix it in the next version as well as a text based manual. Let me know if its too confusing. Thanks again Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
Hi, Thanks for the explanation but again, I dont understand the terms you are using. I only call gluPerspective once; how or what are aspect parameters? It seems that the last part you are describing is similar with what I am already doing. What or how is mine different? Thanks again. Charlie Nolan wrote: He's missing a major detail, namely that you're going to need to translate to/from spherical co-ordinates if you want to do it right. You could just toy around with the look speed until you found something close to right, but you might as well just get it right to start with. Whenever you call gluPerspective, store the fovy and aspect parameters. Multiply fovy by aspect to get fovx. Divide each of these by the respective screen dimension to get unitx and unity, the arc size (in degrees) represented by each pixel in the x and y directions, respectively. From there, you just use whatever code you already have for handling drags and multiply the mouse motion by unitx and unity to get the amount you need to turn the view by. I may have missed a few details, but that's the basic method. -FM Astan Chee wrote: James Paige wrote: On Fri, Jun 13, 2008 at 07:21:30PM +1000, Astan Chee wrote: * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? WHen you recieve the right mouse button's mouse down event, store the X/Y position of the mouse. Then, until you recieve the mouse up event, position the camera according to the difference between the current position of the mouse and the position when the right button was first pressed. Somehow I still dont understand this.Can you paraphrase this in pseudocode or some snippet? Thanks --- James Paige -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
This is very unusual. Can you get a screenshot of this fuzzy circle and two small dots? Maybe its the size of the pygame window not sizing properly. Also, once you click on the navigate/open navigation button, the pygame window behaves like a wxDialog, in that it becomes a child window of the main UI and unless the child window is closed, interaction with the parent is disabled. Anyway, I'll try and upgrade mine to pygame 1.8 and see if it still happens. Thanks again Cheers etrek wrote: I have tried both ways to open navigation console. I create some objects and then click on Navigation Information tab. Then click on Resume button to start time. Then click on Navigate/Open Navigation Console button. A separate Pygame window does not appear. All I see is a fuzzy circle and two small dots (My guess is they represent, Sun,Earth,Moon) on the same screen as the Navigation Information UI screen. Also, once I have clicked on the Navigate/Open Navi... button, the UI becomes unresponsive, i.e. Pause button, tabs (Object Editor, etc.) stop working, and can't resize or move the UI. I have to close the Python.exe console window, or shut the program down in Task Manager in order to shut it down. I have Windows Vista32, Pygame 1.8.0, latest wxPython, Python 2.5 and PyOpengl -etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 6:41 PM Subject: Re: [pygame] my 3d planet game I havent tested this in pygame 1.8.0. There are 2 ways of opening the navigation console, via the menu and from the button. Both open a new window (pygame window) with the 3D shape. While the console is open, you cant interact with the main window. The new pygame window has to be closed before normal interaction can be resumed (kinda mimicing the dialog modal behaviour). The navigation console should have 2 minimaps on the bottom right and left corner. Are this not appearing for you? Cheers etrek wrote: Does this work with Pygame 1.8.0? Is the Navagation Console supposed to be on the same screen as the Navagation menu? Or is it supposed to open a new window (Pygame window) with the 3D shapes? All I see is a fuzzy dark circle on the Navagation menu page. The navagation keys, or clicking with mouse just causes the circle to flicker. Thanks, etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 2:21 AM Subject: Re: [pygame] my 3d planet game Charlie Nolan wrote: Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). Thanks. Im not so good at manuals or documenting code. * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. Ah, I didnt notice that. I'll fix it in the next version as well as a text based manual. Let me know if its too confusing. Thanks again Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
Look up the syntax for gluPerspective. Two of the parameters are called fovy and aspect. The point is that *those* parameters are the ones that drive the display, so when you apply them to the mouse rotation, it'll feel more natural. -FM Astan Chee wrote: Hi, Thanks for the explanation but again, I dont understand the terms you are using. I only call gluPerspective once; how or what are aspect parameters? It seems that the last part you are describing is similar with what I am already doing. What or how is mine different? Thanks again. Charlie Nolan wrote: He's missing a major detail, namely that you're going to need to translate to/from spherical co-ordinates if you want to do it right. You could just toy around with the look speed until you found something close to right, but you might as well just get it right to start with. Whenever you call gluPerspective, store the fovy and aspect parameters. Multiply fovy by aspect to get fovx. Divide each of these by the respective screen dimension to get unitx and unity, the arc size (in degrees) represented by each pixel in the x and y directions, respectively. From there, you just use whatever code you already have for handling drags and multiply the mouse motion by unitx and unity to get the amount you need to turn the view by. I may have missed a few details, but that's the basic method. -FM Astan Chee wrote: James Paige wrote: On Fri, Jun 13, 2008 at 07:21:30PM +1000, Astan Chee wrote: * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? WHen you recieve the right mouse button's mouse down event, store the X/Y position of the mouse. Then, until you recieve the mouse up event, position the camera according to the difference between the current position of the mouse and the position when the right button was first pressed. Somehow I still dont understand this.Can you paraphrase this in pseudocode or some snippet? Thanks --- James Paige signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
Works fine for me on almost-pristine 1.8. (I've got a patch in locally to fix the buffer is always 256 bug that tends to cause crackly sound.) -FM Astan Chee wrote: Ok. I just tried upgrading to pygame 1.8 and true enough, nothing appears. Im not sure why. Maybe doing the env var settings ( http://wiki.wxpython.org/IntegratingPyGame ) breaks something new that is introduced in 1.8? I reverted it back to 1.7.1 and it worked again fine. Although using 1.8 didnt break my other games that were pure pygame, only the ones that did things mentioned in that website. Anyone have any idea why? Cheers Astan Astan Chee wrote: This is very unusual. Can you get a screenshot of this fuzzy circle and two small dots? Maybe its the size of the pygame window not sizing properly. Also, once you click on the navigate/open navigation button, the pygame window behaves like a wxDialog, in that it becomes a child window of the main UI and unless the child window is closed, interaction with the parent is disabled. Anyway, I'll try and upgrade mine to pygame 1.8 and see if it still happens. Thanks again Cheers etrek wrote: I have tried both ways to open navigation console. I create some objects and then click on Navigation Information tab. Then click on Resume button to start time. Then click on Navigate/Open Navigation Console button. A separate Pygame window does not appear. All I see is a fuzzy circle and two small dots (My guess is they represent, Sun,Earth,Moon) on the same screen as the Navigation Information UI screen. Also, once I have clicked on the Navigate/Open Navi... button, the UI becomes unresponsive, i.e. Pause button, tabs (Object Editor, etc.) stop working, and can't resize or move the UI. I have to close the Python.exe console window, or shut the program down in Task Manager in order to shut it down. I have Windows Vista32, Pygame 1.8.0, latest wxPython, Python 2.5 and PyOpengl -etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 6:41 PM Subject: Re: [pygame] my 3d planet game I havent tested this in pygame 1.8.0. There are 2 ways of opening the navigation console, via the menu and from the button. Both open a new window (pygame window) with the 3D shape. While the console is open, you cant interact with the main window. The new pygame window has to be closed before normal interaction can be resumed (kinda mimicing the dialog modal behaviour). The navigation console should have 2 minimaps on the bottom right and left corner. Are this not appearing for you? Cheers etrek wrote: Does this work with Pygame 1.8.0? Is the Navagation Console supposed to be on the same screen as the Navagation menu? Or is it supposed to open a new window (Pygame window) with the 3D shapes? All I see is a fuzzy dark circle on the Navagation menu page. The navagation keys, or clicking with mouse just causes the circle to flicker. Thanks, etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 2:21 AM Subject: Re: [pygame] my 3d planet game Charlie Nolan wrote: Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). Thanks. Im not so good at manuals or documenting code. * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. Ah, I didnt notice that. I'll fix it in the next version as well as a text based manual. Let me know if its too confusing. Thanks again Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. signature.asc
Re: [pygame] my 3d planet game
Whops, sorry. Dropped you off the list there. Versions? sure, but Im sure I deleted the old one before uploading the new one just now. Does the new one come up with the old interface? h, I'll have a look and change it accordingly next time Cheers Charlie Nolan wrote: It doesn't look like you actually got a new version uploaded. Remember, with Google Code, you have to use a new filename each time, so include a version number of some kind. Also, I think you meant to put this on the list, not directly to me. Back up, try again. :) -FM Astan Chee wrote: Charlie Nolan wrote: The main interface is going to be too tall for 1280x800. If you move the second section of the Object Editor to the right of the first (instead of below), you should be able to drop the height significantly. Hi, I've changed the layout abit to be less tall but with the same width. Its uploaded on the project page ( http://code.google.com/p/planetgame/ ) plus I've had to fix some bugs. Thanks again for your feedback. Cheers -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
Astan Chee wrote: Im guessing you are using linux,right? Commenting out os.environ['SDL_VIDEODRIVER'] = 'windib' should work if you are on linux. Right. Tried that, got a new error: (python:31706): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window The program 'python' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 54 error_code 3 request_code 18 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) I also got some KeyErrors (with key 0, then many instances of key -1) the first time I ran it, Do you have a screenshot of this? No, but I just got it to reproduce. Wasn't from the display at all, it was from unpausing time. Apparently I didn't unpause it long enough earlier for it to actually tick. Traceback (most recent call last): File wxSol.py, line 1768, in OnCountDown self.RefreshSingle() File wxSol.py, line 2172, in RefreshSingle self.CalcElemPerc() File wxSol.py, line 2231, in CalcElemPerc info = self.elements[int(num)] KeyError: 0 Traceback (most recent call last): File wxSol.py, line 1768, in OnCountDown self.RefreshSingle() File wxSol.py, line 2172, in RefreshSingle self.CalcElemPerc() File wxSol.py, line 2231, in CalcElemPerc info = self.elements[int(num)] KeyError: -1 The -1 then repeats until I pause it again. -FM signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
Google Code actually isn't supposed to allow deleting files. I guess you had little enough exposure that you got the whoops, wrong file exception. -FM P.S. Feh, my turn to drop off the list. Direct TO/CC's screw up the reply button. :/ Astan Chee wrote: Whops, sorry. Dropped you off the list there. Versions? sure, but Im sure I deleted the old one before uploading the new one just now. Does the new one come up with the old interface? h, I'll have a look and change it accordingly next time Cheers Charlie Nolan wrote: It doesn't look like you actually got a new version uploaded. Remember, with Google Code, you have to use a new filename each time, so include a version number of some kind. Also, I think you meant to put this on the list, not directly to me. Back up, try again. :) -FM Astan Chee wrote: Charlie Nolan wrote: The main interface is going to be too tall for 1280x800. If you move the second section of the Object Editor to the right of the first (instead of below), you should be able to drop the height significantly. Hi, I've changed the layout abit to be less tall but with the same width. Its uploaded on the project page ( http://code.google.com/p/planetgame/ ) plus I've had to fix some bugs. Thanks again for your feedback. Cheers signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
Thanks for the feedback. I really appreciate it. Charlie Nolan wrote: (python:31706): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window The program 'python' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 54 error_code 3 request_code 18 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) I have no clue what is causing this. I know wx and pygame isnt supposed to be used together, but it works on windows yet Im wondering what I have to do to get it to play nice in linux. Maybe someone from the mailing list can help? Traceback (most recent call last): File wxSol.py, line 1768, in OnCountDown self.RefreshSingle() File wxSol.py, line 2172, in RefreshSingle self.CalcElemPerc() File wxSol.py, line 2231, in CalcElemPerc info = self.elements[int(num)] KeyError: -1 I think I've fixed this bug. Something about an invalid key and uploaded a new version. Thanks again. Cheers Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
What is it that you're trying to do? Reuse the same window for both pygame/OpenGL and wx? If so, it might work better to separate them into two windows. I haven't really done anything with OpenGL though, so take that with a grain of salt. -FM Astan Chee wrote: Thanks for the feedback. I really appreciate it. Charlie Nolan wrote: (python:31706): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window The program 'python' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 54 error_code 3 request_code 18 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) I have no clue what is causing this. I know wx and pygame isnt supposed to be used together, but it works on windows yet Im wondering what I have to do to get it to play nice in linux. Maybe someone from the mailing list can help? Traceback (most recent call last): File wxSol.py, line 1768, in OnCountDown self.RefreshSingle() File wxSol.py, line 2172, in RefreshSingle self.CalcElemPerc() File wxSol.py, line 2231, in CalcElemPerc info = self.elements[int(num)] KeyError: -1 I think I've fixed this bug. Something about an invalid key and uploaded a new version. Thanks again. Cheers Astan signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
No, and the wx window should be on a seperate thread as the pygame/opengl one. The wx window calls the pygame one though. But yeah, they are two separate windows. Thanks for trying though. Cheers Astan Charlie Nolan wrote: What is it that you're trying to do? Reuse the same window for both pygame/OpenGL and wx? If so, it might work better to separate them into two windows. I haven't really done anything with OpenGL though, so take that with a grain of salt. -FM Astan Chee wrote: Thanks for the feedback. I really appreciate it. Charlie Nolan wrote: (python:31706): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window The program 'python' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 54 error_code 3 request_code 18 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) I have no clue what is causing this. I know wx and pygame isnt supposed to be used together, but it works on windows yet Im wondering what I have to do to get it to play nice in linux. Maybe someone from the mailing list can help? Traceback (most recent call last): File wxSol.py, line 1768, in OnCountDown self.RefreshSingle() File wxSol.py, line 2172, in RefreshSingle self.CalcElemPerc() File wxSol.py, line 2231, in CalcElemPerc info = self.elements[int(num)] KeyError: -1 I think I've fixed this bug. Something about an invalid key and uploaded a new version. Thanks again. Cheers Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
Found it. I just had to not set the other environment variable (SDL_WINDOWID) either, and it worked fine. -FM Astan Chee wrote: No, and the wx window should be on a seperate thread as the pygame/opengl one. The wx window calls the pygame one though. But yeah, they are two separate windows. Thanks for trying though. Cheers Astan Charlie Nolan wrote: What is it that you're trying to do? Reuse the same window for both pygame/OpenGL and wx? If so, it might work better to separate them into two windows. I haven't really done anything with OpenGL though, so take that with a grain of salt. -FM Astan Chee wrote: Thanks for the feedback. I really appreciate it. Charlie Nolan wrote: (python:31706): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window The program 'python' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 54 error_code 3 request_code 18 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) I have no clue what is causing this. I know wx and pygame isnt supposed to be used together, but it works on windows yet Im wondering what I have to do to get it to play nice in linux. Maybe someone from the mailing list can help? Traceback (most recent call last): File wxSol.py, line 1768, in OnCountDown self.RefreshSingle() File wxSol.py, line 2172, in RefreshSingle self.CalcElemPerc() File wxSol.py, line 2231, in CalcElemPerc info = self.elements[int(num)] KeyError: -1 I think I've fixed this bug. Something about an invalid key and uploaded a new version. Thanks again. Cheers Astan signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
Thanks! So the keyboard shortcuts work in linux as well? Cheers Astan Charlie Nolan wrote: Found it. I just had to not set the other environment variable (SDL_WINDOWID) either, and it worked fine. -FM Astan Chee wrote: No, and the wx window should be on a seperate thread as the pygame/opengl one. The wx window calls the pygame one though. But yeah, they are two separate windows. Thanks for trying though. Cheers Astan Charlie Nolan wrote: What is it that you're trying to do? Reuse the same window for both pygame/OpenGL and wx? If so, it might work better to separate them into two windows. I haven't really done anything with OpenGL though, so take that with a grain of salt. -FM Astan Chee wrote: Thanks for the feedback. I really appreciate it. Charlie Nolan wrote: (python:31706): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window The program 'python' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 54 error_code 3 request_code 18 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) I have no clue what is causing this. I know wx and pygame isnt supposed to be used together, but it works on windows yet Im wondering what I have to do to get it to play nice in linux. Maybe someone from the mailing list can help? Traceback (most recent call last): File wxSol.py, line 1768, in OnCountDown self.RefreshSingle() File wxSol.py, line 2172, in RefreshSingle self.CalcElemPerc() File wxSol.py, line 2231, in CalcElemPerc info = self.elements[int(num)] KeyError: -1 I think I've fixed this bug. Something about an invalid key and uploaded a new version. Thanks again. Cheers Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
Thanks! So the keyboard shortcuts work in linux as well? Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. -FM signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
Charlie Nolan wrote: Thanks! So the keyboard shortcuts work in linux as well? Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. -FM Oh, and could we get a plain-text version of the manual, too? Even a bare-bones PDF reader feels bulky compared to a text editor. And it looks like all you're using PDF for is to embed screenshots, which aren't critical. -FM signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
Charlie Nolan wrote: Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). Thanks. Im not so good at manuals or documenting code. * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. Ah, I didnt notice that. I'll fix it in the next version as well as a text based manual. Let me know if its too confusing. Thanks again Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
On Fri, Jun 13, 2008 at 07:21:30PM +1000, Astan Chee wrote: * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? WHen you recieve the right mouse button's mouse down event, store the X/Y position of the mouse. Then, until you recieve the mouse up event, position the camera according to the difference between the current position of the mouse and the position when the right button was first pressed. --- James Paige
Re: [pygame] my 3d planet game
Does this work with Pygame 1.8.0? Is the Navagation Console supposed to be on the same screen as the Navagation menu? Or is it supposed to open a new window (Pygame window) with the 3D shapes? All I see is a fuzzy dark circle on the Navagation menu page. The navagation keys, or clicking with mouse just causes the circle to flicker. Thanks, etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 2:21 AM Subject: Re: [pygame] my 3d planet game Charlie Nolan wrote: Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). Thanks. Im not so good at manuals or documenting code. * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. Ah, I didnt notice that. I'll fix it in the next version as well as a text based manual. Let me know if its too confusing. Thanks again Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
James Paige wrote: On Fri, Jun 13, 2008 at 07:21:30PM +1000, Astan Chee wrote: * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? WHen you recieve the right mouse button's mouse down event, store the X/Y position of the mouse. Then, until you recieve the mouse up event, position the camera according to the difference between the current position of the mouse and the position when the right button was first pressed. Somehow I still dont understand this.Can you paraphrase this in pseudocode or some snippet? Thanks --- James Paige -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
I havent tested this in pygame 1.8.0. There are 2 ways of opening the navigation console, via the menu and from the button. Both open a new window (pygame window) with the 3D shape. While the console is open, you cant interact with the main window. The new pygame window has to be closed before normal interaction can be resumed (kinda mimicing the dialog modal behaviour). The navigation console should have 2 minimaps on the bottom right and left corner. Are this not appearing for you? Cheers etrek wrote: Does this work with Pygame 1.8.0? Is the Navagation Console supposed to be on the same screen as the Navagation menu? Or is it supposed to open a new window (Pygame window) with the 3D shapes? All I see is a fuzzy dark circle on the Navagation menu page. The navagation keys, or clicking with mouse just causes the circle to flicker. Thanks, etrek - Original Message - From: Astan Chee [EMAIL PROTECTED] To: pygame-users@seul.org Sent: Friday, June 13, 2008 2:21 AM Subject: Re: [pygame] my 3d planet game Charlie Nolan wrote: Looks good. A few notes: * Mouse scroll down is equivalent to s (move back), not f (move up). Thanks. Im not so good at manuals or documenting code. * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? * When time is paused, keys aren't repeating, so you can only turn by mouse or by pounding the key like mad. Ah, I didnt notice that. I'll fix it in the next version as well as a text based manual. Let me know if its too confusing. Thanks again Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
He's missing a major detail, namely that you're going to need to translate to/from spherical co-ordinates if you want to do it right. You could just toy around with the look speed until you found something close to right, but you might as well just get it right to start with. Whenever you call gluPerspective, store the fovy and aspect parameters. Multiply fovy by aspect to get fovx. Divide each of these by the respective screen dimension to get unitx and unity, the arc size (in degrees) represented by each pixel in the x and y directions, respectively. From there, you just use whatever code you already have for handling drags and multiply the mouse motion by unitx and unity to get the amount you need to turn the view by. I may have missed a few details, but that's the basic method. -FM Astan Chee wrote: James Paige wrote: On Fri, Jun 13, 2008 at 07:21:30PM +1000, Astan Chee wrote: * When dragging with RMB, the mechanics feel off. The mouse cursor should stay on top of roughly the same bit of space as I drag it, not have the space go zooming out past it. I dont know how to do this in pygame. Is there an example somewhere of how to do this? WHen you recieve the right mouse button's mouse down event, store the X/Y position of the mouse. Then, until you recieve the mouse up event, position the camera according to the difference between the current position of the mouse and the position when the right button was first pressed. Somehow I still dont understand this.Can you paraphrase this in pseudocode or some snippet? Thanks --- James Paige signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
On Thu, Jun 12, 2008 at 06:20:25PM +1000, Astan Chee wrote: I've been working on my 3d planet game and now it is finally done. For those of you interested the source can be found at: http://code.google.com/p/planetgame/ Also, this is kinda like a post-prototype, so any feedback is much appreciated. The main window doesn't fit on my 1280x800 screen. If I blindly tab down there and press Enter, without changing any of the default settings, I get this exception: Traceback (most recent call last): File wxSol.py, line 1925, in OnAddObj orbit = int(self.txt_orb_time.GetValue()) ValueError: invalid literal for int() with base 10: '0.6' Cheers! Marius Gedminas -- Special bonus feature: absolutely nowhere in RetchMail's code is there an arbitrary 3-second sleep(). Wow! What other mail retriever can say that? (Hint: not fetchmail.) -- http://open.nit.ca/wiki/index.php?page=RetchMail signature.asc Description: Digital signature
Re: [pygame] my 3d planet game
Marius Gedminas wrote: The main window doesn't fit on my 1280x800 screen. Hmm, is it too long or too wide? or both? If I blindly tab down there and press Enter, without changing any of the default settings, I get this exception: Traceback (most recent call last): File wxSol.py, line 1925, in OnAddObj orbit = int(self.txt_orb_time.GetValue()) ValueError: invalid literal for int() with base 10: '0.6' I think i've fixed that one and updated the code. Thanks for the feedback! Cheers Astan -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.
Re: [pygame] my 3d planet game
Typo in Player Details - Total Ammount Ian
Re: [pygame] my 3d planet game
You can apparently support python 2.4 by changing the one place where you have class foo(): to read class foo:. The main interface is going to be too tall for 1280x800. If you move the second section of the Object Editor to the right of the first (instead of below), you should be able to drop the height significantly. If I try to Navigate, I get this error: (python:30836): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window No available video device error(No available video device) in Inited() (wxSol.py:line 346) - Run() (wxSol.py:line 990) I also got some KeyErrors (with key 0, then many instances of key -1) the first time I ran it, but I'm not getting those to duplicate now, so I can't be more specific. -FM signature.asc Description: OpenPGP digital signature
Re: [pygame] my 3d planet game
Charlie Nolan wrote: You can apparently support python 2.4 by changing the one place where you have class foo(): to read class foo:. The main interface is going to be too tall for 1280x800. If you move the second section of the Object Editor to the right of the first (instead of below), you should be able to drop the height significantly. I'll try and see what I can do about this. If I try to Navigate, I get this error: (python:30836): Gdk-WARNING **: gdkdrawable-x11.c:878 drawable is not a pixmap or window No available video device error(No available video device) in Inited() (wxSol.py:line 346) - Run() (wxSol.py:line 990) Im guessing you are using linux,right? Commenting out os.environ['SDL_VIDEODRIVER'] = 'windib' should work if you are on linux. I also got some KeyErrors (with key 0, then many instances of key -1) the first time I ran it, Do you have a screenshot of this? Thanks again. Cheers -- Formulations of number theory: Complete, Consistent, Non-trivial. Choose two. Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.