Re: [pygame] draw.line bounding box bug when width>1
On Tue, Oct 13, 2009 at 4:09 AM, Aaron Brady wrote: > On Sun, Oct 11, 2009 at 1:07 PM, Luke Paireepinart > wrote: > > > > > > On Sat, Oct 10, 2009 at 10:57 PM, Aaron Brady > wrote: > >> > >> Hello, > >> New to the list. > >> I have a bug! Nice 'n' easy repro steps below. > > > > Just FYI, > > http://catb.org/~esr/faqs/smart-questions.html#id382249 > > Ah I see. Too informal and hasty. For the record, I like these parts > of this link: > > "...claim you have found a bug, you'll be impugning their competence, > which may offend..." > > and > > "...it is best to write as though you assume you are doing something > wrong, even if you are privately pretty sure..." > > Is it appropriate to share what I'm pleased with? > Adrian, Yes, that article is quite good and you'll see it linked on technical mailing lists a lot. I recommend reading the whole article if you have time. It's by Eric Raymond, which many people have differing opinions on, but most people seem to agree that that particular article sums up technical fora's etiquette quite well. As far as what's appropriate, I don't know. I didn't find anything offensive about your post, but then again I'm not a core Pygame developer. They're pretty cool guys though, and your post was probably not offensive to anyone, which is why I said "FYI" not "RTFM", so you'd know that in some situations a bug report can be misconstrued :) In general it's better to err on the side of politeness when you're first approaching a new group and only moving to more familiar terminology once you've been on the list for a while and you've got a good feeling for how everyone talks to each other. I don't know how long you've been on this particular list though, just some general advice. > > > This bug was already addressed in a DOC post in 2005, > > http://www.pygame.org/docs/ref/draw.html#pygame.draw.line > > I'm not really sure why no one included the patch. > > I attempted 'inflate', but didn't account for the width. I just tried > a range of constants. > So does it work with that code or are there still errors? Perhaps that's why it hasn't been patched (because the example code doesn't work in all situations). If you look at the source for the method and you see where the calculation error is occurring, you could submit a diff patch or maybe upload a revision to SVN or something. Then you can say you contributed to an open-source project on your resume :)
Re: [pygame] Python IDE for windoz
i use komodo edit, it has pretty good code completion and doesn't suck in general: http://www.activestate.com/komodo_edit/ 2009/10/7 pierrelafran...@sympatico.ca > Hi > I have administrator rights on a computor in a lab at work, until > tomorrow. I would like install IDE for Python. What do you suggest me ? > > I know, I may not write this question in the good room, but I just learn > this news, and after tomorrow, it will be too late to install Python. > > Thanks > -- > Pierre >
Re: [pygame] draw.line bounding box bug when width>1
On Sun, Oct 11, 2009 at 1:07 PM, Luke Paireepinart wrote: > > > On Sat, Oct 10, 2009 at 10:57 PM, Aaron Brady wrote: >> >> Hello, >> New to the list. >> I have a bug! Nice 'n' easy repro steps below. > > Just FYI, > http://catb.org/~esr/faqs/smart-questions.html#id382249 Ah I see. Too informal and hasty. For the record, I like these parts of this link: "...claim you have found a bug, you'll be impugning their competence, which may offend..." and "...it is best to write as though you assume you are doing something wrong, even if you are privately pretty sure..." Is it appropriate to share what I'm pleased with? > This bug was already addressed in a DOC post in 2005, > http://www.pygame.org/docs/ref/draw.html#pygame.draw.line > I'm not really sure why no one included the patch. I attempted 'inflate', but didn't account for the width. I just tried a range of constants.
Re: [pygame] MIDI output on OS X???
On Mon, Oct 12, 2009 at 12:54 PM, Chris Phoenix wrote: > BTW, the install of pygame somehow didn't set the python path > correctly, so I had to cd to > > Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages > to run this command, and in my programs I do: > > import sys > > sys.path.append('/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages') > > Hmmm.. that doesn't sound right. Python extension libraries are not supposed to be changing your python path when they install. Your python install should already be using the right "site-packages" directories for whichever version of python you are running. It sounds like the python you are running is not the python 2.5 framework version you installed, which is the one pygame installs in. You are probably running the system python instead (on OS X 10.5, it's a python 2.5.1 install using /Library/Python/2.5/site-packages), which most extensions avoid installing in because it belongs to the system. What does "which python" at the shell tell you? What python version is printed when you just run "python" from a command shell to get at the python shell? How do things work out if you run python using "/Library/Frameworks/Python.framework/Versions/2.5/bin/python" instead?
Re: [pygame] First person shooter help
I recommend just improvising. My take is, you will probably want some sort of general camera direction (in the horizontal plane) and a pointer direction where you're aiming (can rotate on the screen within the view). You should be using gluLookAt(camx,camy,camz,centerx,centery,centerz,upx,up,y,upz). [camx,camy,camz] is simply the player's position in 3D space. [centerx,centery,centerz] is [camx,camy,camz] + ([1,0,0], rotated by the player's direction around [0,1,0]). [upx,upy,upz] is [0,1,0]. To find where the cursor is pointing, project the mouse into the 3D scene. This gives you a view controlled by the player's direction, and a movable aiming point inside. If you want where you're aiming to be the center of the screen, rotate the view by the relative mouse movement. Ian
Re: [pygame] MIDI output on OS X???
Hobbes-8%70 python -m pygame.examples.midi --list in stat: : No such file or directory in stat: : No such file or directory Hobbes-8%71 BTW, the install of pygame somehow didn't set the python path correctly, so I had to cd to Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages to run this command, and in my programs I do: import sys sys.path.append('/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages') I'm sure there's an easy way to configure this, but what is it? I did look at "Audio Midi Setup" but it didn't show any outputters. Even with SimpleSynth running, all it shows is IAC Driver, Network, and an input-only Oxygen keyboard. Pitch bend magically started working - the same midi file that didn't work, now does. So I'm fine until it magically breaks again. pymidi seems to be source-only, with only one review on sourceforge - which complains that it doesn't build. I've had very bad luck building things on this machine - there's always some other package to be built first, and I have wasted many hours and won't go down that road again for this project. Chris On Mon, Oct 12, 2009 at 7:29 AM, René Dudfield wrote: > hi, > > what does this show for you? > python -m pygame.examples.midi --list > > Have you seen the 'Audio Midi Setup' program in OSX? > > > The "in stat: : No such file or directory" messages are a bug with portmidi, > and are fixed in portmidi subversion, but not in a release of portmidi yet. > > Not sure why the pitch bend controller message is not working. > > > You might have more luck with this: > http://notahat.com/pymidi > > If you just care about midi on OSX. I'm not sure if pyobjc wraps CoreMidi > yet. > > I found out SDL is in the process of rewriting its OSX midi support for > SDL_mixer. > > > > cheers, > > > > > > > On Sat, Oct 10, 2009 at 6:23 AM, Chris Phoenix wrote: >> >> OK... with SimpleSynth running, I now get "in stat: : No such file or >> directory" printed twice on the pygame.midi.init() call. >> >> If I continue, pygame.midi.get_default_output_id() returns 0, and >> pygame.midi.get_count() returns 1. >> >> But then midiOut = pygame.midi.Output(0, latency = 1) gives me this: >> PortMidi call failed... >> PortMidi: `Bad pointer' >> type ENTER... >> >> Meanwhile, I'm using pygame.mixer to play midi files that I create. I >> find that it doesn't play the last note of the tracks, even when >> Quicktime does. And neither one seems to pay attention to the Pitch >> Bend Range controller message. Any insight into any of this? >> >> Thanks, >> Chris >> >> On Fri, Oct 9, 2009 at 6:55 AM, René Dudfield wrote: >> > Hi, >> > >> > Roger from portmedia explains the situation here: >> > >> > >> > http://lists.create.ucsb.edu/pipermail/media_api/2009-October/000751.html >> > >> > In short, OSX does not come with midi output on all machines by default. >> > You need to install a software synth to use it with CoreMidi. SDL_mixer >> > must be using something else to play midi files. >> > >> > Fluidsynth, and simplesynth would be two free options for software >> > synths on >> > osx. >> > >> > cu, >> > >> > >> > On Fri, Oct 9, 2009 at 1:07 PM, René Dudfield wrote: >> >> >> >> Hi, >> >> >> >> it seems to be able to list output devices that are plugged in. Like >> >> it >> >> lists my midi keyboard when plugged in. >> >> >> >> However it does not seem to list the internal midi hardware on sound >> >> cards. >> >> >> >> pygame.midi uses CoreMIDI through portaudio on OSX. pygame.music.midi >> >> uses a different older API. So maybe that's the cause of the problems. >> >> >> >> Will need to look into it some more. If you can, please ask on the >> >> portmedia mailing list at: >> >> http://lists.create.ucsb.edu/mailman/listinfo/media_api >> >> >> >> If you can't post, I'll follow up on it later there. >> >> >> >> >> >> cheers, >> >> >> >> >> >> On Thu, Oct 8, 2009 at 10:20 AM, Chris Phoenix >> >> wrote: >> >>> >> >>> I'd like to make a MIDI sound from a Python program. PyGame's midi >> >>> module was supposed to do it, but it doesn't seem to have a default >> >>> midi output device - or any midi output device! >> >>> >> >>> pygame.midi.get_default_output_id() returns -1. Half an hour of >> >>> googling didn't help. Looking at the unit tests didn't help (there's a >> >>> bugfix aimed at this problem, but it seems to just bypass the test). >> >>> >> >>> The mixer module can indeed read a midi file and make a sound come out >> >>> the speakers, but I'd rather drive the midi directly instead of >> >>> writing mini-files and playing them... >> >>> >> >>> What should I pass in to pygame.midi.Output() on 10.5? Or what should >> >>> I do to create the midi device so that >> >>> pygame.midi.get_default_output_id() will tell me something other than >> >>> -1? >> >>> >> >>> Thanks... >> >>> >> >>> Chris >> >>> >> >>> -- >> >>> Chris Phoenix >> >>> cphoe...@gmail.com >> >>> 650-776-5195 >> >>> >> >>> Director of Research >> >>> Cente
Re: [pygame] First person shooter help
PYGGEL is still in active development, but we recently used it to create a FPS for pyweek :) http://pyweek.org/e/robo-solo/ http://code.google.com/p/pyggel/ On Mon, Oct 12, 2009 at 2:12 PM, Skizzaltix wrote: > Have you checked out PYGGEL? I'm not sure if it was ever completed, but > from what I heard, it's a great tool. Search for it on the Pygame site. > > > Horst JENS wrote: > >> Am Montag, den 15.06.2009, 18:08 +1000 schrieb Astan Chee: >> >> >>> Hi, >>> I am trying to understand and make a simple first person shooter game. I >>> >>> >> >> Hi Astan, >> if you found something, please be so kind and inform me, i'm very >> interested on that too. >> >> greetings, >>-Horst >> >> >> > >
Re: [pygame] First person shooter help
Have you checked out PYGGEL? I'm not sure if it was ever completed, but from what I heard, it's a great tool. Search for it on the Pygame site. Horst JENS wrote: Am Montag, den 15.06.2009, 18:08 +1000 schrieb Astan Chee: Hi, I am trying to understand and make a simple first person shooter game. I Hi Astan, if you found something, please be so kind and inform me, i'm very interested on that too. greetings, -Horst
Re: [pygame] First person shooter help
Am Montag, den 15.06.2009, 18:08 +1000 schrieb Astan Chee: > Hi, > I am trying to understand and make a simple first person shooter game. I Hi Astan, if you found something, please be so kind and inform me, i'm very interested on that too. greetings, -Horst -- Horst JENS horst.j...@spielend-programmieren.at http://www.spielend-programmieren.at signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: [pygame] Capture tablet pressure?
So I tried the cgkit\wintab route. Had some success, but still can't get the dang pressure. Below is the code I came up with if anyone wants to poke at it When ran, it prints stuff like: 0 0 With the last two values representing pressure. Well, it's a start ;) # pressure.py import os import pygame from cgkit import wintab pygame.init() hwnd = 1024 os.environ["SDL_WINDOWID"] = str(hwnd) def main(): screen = pygame.display.set_mode((640, 480)) background = pygame.surface.Surface(screen.get_size()) background.fill(pygame.color.Color("Black")) screen.blit(background, (0,0)) # # Creates a "Context" object: tablet = wintab.Context() tablet.open(hwnd, True) looping = True while looping: events = pygame.event.get() for event in events: if event.type == pygame.QUIT: # allow for exit: looping = False # # Get a tuple of range of packets captured: (first, last) packetExtents = tablet.queuePacketsEx() if packetExtents[1] is not None: # This is a sub-list of Packet objects: packets = tablet.packetsGet(packetExtents[1]) # Get the last Packet object: packet = packets[-1] # Print packet info, and pressure data: print packet, packet.normalpressure, packet.tangentpressure pygame.display.flip() pygame.quit() if __name__ == "__main__": main()
Re: [pygame] MIDI output on OS X???
hi, what does this show for you? python -m pygame.examples.midi --list Have you seen the 'Audio Midi Setup' program in OSX? The "in stat: : No such file or directory" messages are a bug with portmidi, and are fixed in portmidi subversion, but not in a release of portmidi yet. Not sure why the pitch bend controller message is not working. You might have more luck with this: http://notahat.com/pymidi If you just care about midi on OSX. I'm not sure if pyobjc wraps CoreMidi yet. I found out SDL is in the process of rewriting its OSX midi support for SDL_mixer. cheers, On Sat, Oct 10, 2009 at 6:23 AM, Chris Phoenix wrote: > OK... with SimpleSynth running, I now get "in stat: : No such file or > directory" printed twice on the pygame.midi.init() call. > > If I continue, pygame.midi.get_default_output_id() returns 0, and > pygame.midi.get_count() returns 1. > > But then midiOut = pygame.midi.Output(0, latency = 1) gives me this: > PortMidi call failed... > PortMidi: `Bad pointer' > type ENTER... > > Meanwhile, I'm using pygame.mixer to play midi files that I create. I > find that it doesn't play the last note of the tracks, even when > Quicktime does. And neither one seems to pay attention to the Pitch > Bend Range controller message. Any insight into any of this? > > Thanks, > Chris > > On Fri, Oct 9, 2009 at 6:55 AM, René Dudfield wrote: > > Hi, > > > > Roger from portmedia explains the situation here: > > > > > http://lists.create.ucsb.edu/pipermail/media_api/2009-October/000751.html > > > > In short, OSX does not come with midi output on all machines by default. > > You need to install a software synth to use it with CoreMidi. SDL_mixer > > must be using something else to play midi files. > > > > Fluidsynth, and simplesynth would be two free options for software synths > on > > osx. > > > > cu, > > > > > > On Fri, Oct 9, 2009 at 1:07 PM, René Dudfield wrote: > >> > >> Hi, > >> > >> it seems to be able to list output devices that are plugged in. Like it > >> lists my midi keyboard when plugged in. > >> > >> However it does not seem to list the internal midi hardware on sound > >> cards. > >> > >> pygame.midi uses CoreMIDI through portaudio on OSX. pygame.music.midi > >> uses a different older API. So maybe that's the cause of the problems. > >> > >> Will need to look into it some more. If you can, please ask on the > >> portmedia mailing list at: > >> http://lists.create.ucsb.edu/mailman/listinfo/media_api > >> > >> If you can't post, I'll follow up on it later there. > >> > >> > >> cheers, > >> > >> > >> On Thu, Oct 8, 2009 at 10:20 AM, Chris Phoenix > wrote: > >>> > >>> I'd like to make a MIDI sound from a Python program. PyGame's midi > >>> module was supposed to do it, but it doesn't seem to have a default > >>> midi output device - or any midi output device! > >>> > >>> pygame.midi.get_default_output_id() returns -1. Half an hour of > >>> googling didn't help. Looking at the unit tests didn't help (there's a > >>> bugfix aimed at this problem, but it seems to just bypass the test). > >>> > >>> The mixer module can indeed read a midi file and make a sound come out > >>> the speakers, but I'd rather drive the midi directly instead of > >>> writing mini-files and playing them... > >>> > >>> What should I pass in to pygame.midi.Output() on 10.5? Or what should > >>> I do to create the midi device so that > >>> pygame.midi.get_default_output_id() will tell me something other than > >>> -1? > >>> > >>> Thanks... > >>> > >>> Chris > >>> > >>> -- > >>> Chris Phoenix > >>> cphoe...@gmail.com > >>> 650-776-5195 > >>> > >>> Director of Research > >>> Center for Responsible Nanotechnology > >>> http://CRNano.org > >> > > > > > > > > -- > Chris Phoenix > cphoe...@gmail.com > 650-776-5195 > > Director of Research > Center for Responsible Nanotechnology > http://CRNano.org >