Re: [pygame] Drawing efficiency question

2022-03-01 Thread Jasper Phillips
position when needed... and that's it. Blitting is expensive, and with OpenGL you can just avoid it. There's a bit of up front learning cost if you're not familiar with these tools, but the payoff comes quickly and is well worth it. -Jasper On Tue, Mar 1, 2022 at 3:10 PM Irv Kalb wrote: &

Re: [pygame] Question about sound effect playback

2021-07-14 Thread Jasper Phillips
for pygame's release process to know how feasible that is. On Wed, Jul 14, 2021 at 4:50 PM Andrew Baker wrote: > I'd assume that deep under the hood, one should be able to advance > whatever read pointer to the soundbuffer is used by the channel. > > Is that correct? > &g

Re: [pygame] Question about sound effect playback

2021-07-14 Thread Jasper Phillips
rted > array and only do the slice + flip back to Sound but that's premature > optimization right now. > > On Wed, Jul 14, 2021, 03:15 Jasper Phillips > wrote: > >> Alas, that is precisely what I did: >> >> def clipEffect( effect, startTime ):

Re: [pygame] Question about sound effect playback

2021-07-14 Thread Jasper Phillips
distorts the audio, though the original Sound plays fine... Hi Jasper. Try the fourth answer here > <https://stackoverflow.com/questions/57960451/how-can-i-play-a-portion-of-an-audio-file-in-a-loop-in-pygame>, > by Ted Klein Bergman. > On 7/13/2021 4:24 PM, Jasper Phillips wrote: >

[pygame] Question about sound effect playback

2021-07-13 Thread Jasper Phillips
ing the bytes and there's some format details I don't know. Does anyone have any tips for hacking raw Sound data, or perhaps some better approach? -Jasper

Re: [pygame] Draft PEP 3156 -- Asynchronous IO Support Rebooted

2012-12-21 Thread Jasper
ue right at the start of that PEP's introduction. If anything such standardization aught to make it easier to work with multiple event loops. -Jasper

Re: [pygame] "tint" a surface?

2009-09-19 Thread jasper
It's not Pygame strictly, but if you're using Pyopengl w/ Pygame, you can pass such a tint as a "color" param when drawing a textured Quad in Pyopengl, without needing to monkey with surfaces at all. -Jasper > I've been searching around, trying to see if there is

Re: [pygame] Hexagonal collision detection?

2009-09-15 Thread Jasper
ners. For each I generate a second "mouse map" texture encoding color (e.g. (x,y,0)) that is drawn behind the scenes when the mouse is clicked, and I simply check what color is under the mouse and decode the clicked hex location. -Jasper rygoody wrote: Hello, I need to make a clicka

Re: [pygame] New GUI

2008-01-22 Thread Jasper
have a framework for testing GUIs? -Jasper Marcus von Appen wrote: On, Tue Jan 22, 2008, Kamilche wrote: [Unhappiness about the existing GUIs] It's interesting to see that a lot of people tell some public list/forum/whatever how unhappy they are with existing solutions, but do not dare to g

Re: [pygame] New GUI

2008-01-22 Thread Jasper
ing it. And double especially if some thought had gone into a GUI testing framework. -Jasper Kamilche wrote: I've looked at wxPython, PGU, Ocemp GUI, PyUI, and other GUI toolkits available for Python. Each of them had, to my eyes, severe flaws that prevented me from using them for my ap

Re: [pygame] .png saving

2007-10-27 Thread Jasper
get_size(), pygame.image.tostring( surface, 'RGBA' ) ) fileDir = os.path.dirname( filePath ) if not os.path.exists( fileDir ): os.makedirs( fileDir ) pilImage.save( filePath )| -Jasper

Re: [pygame] bidimensional arrays or the quick way to maps

2007-09-06 Thread Jasper
ly the funkier NumPy ones), but in practice that doesn't seem to be something you need for Tile Maps. -Jasper thanks to you all, it is working beautifully ^__^ Oh yeah, one more minor point. Perhaps I'm the only one daft enough to forget about map() in the heat of the moment, but

Re: [pygame] GUI unit testing - was "What about Python 3?"

2007-09-05 Thread Jasper
Jeff Cagle wrote: Jasper wrote: More specifically, it's tricky to write tests for GUIs and real time applications, or at least I don't know of any good python tools for doing so. I've put some thought into a robust GUI testing framework, but how exactly to go about it isn&#x

Re: [pygame] bidimensional arrays or the quick way to maps

2007-09-05 Thread Jasper
lt;= WIDTH and 0 <= y <= HEIGHT". The downside is you can't use array slicing tricks (especially the funkier NumPy ones), but in practice that doesn't seem to be something you need for Tile Maps. -Jasper

Re: [pygame] What about python 3?

2007-09-02 Thread Jasper
seems like even more of a pain, though I don't need it so haven't thought about it much. Anyway, I'm guessing I'm not the only one with such problems... Is there any interest on collaborating on such testing framework extensions, of the sort that'd be useful for games in general? -Jasper

Re: [pygame] Using PyOpenGL for 2D graphics

2007-07-08 Thread Jasper
identical sprites. It ended up being the only optimization I needed. -Jasper

Re: [pygame] Using PyOpenGL for 2D graphics

2007-07-08 Thread Jasper
Ian Mallett wrote: On 7/8/07, *Jasper* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Using openGL for 2D allows you to take advantage of 3D graphics cards for smooth scrolling and zooming, or to tilt otherwise 2D game boards into 2D. I also suspect that it'

Re: [pygame] Using PyOpenGL for 2D graphics

2007-07-08 Thread Jasper
mming style is weak). You only really need the first 10 or so to get started; afterwards you can look at the later ones and still follow what they're doing, even if they aren't in Python. -Jasper Ian Mallett wrote: Try looking at glOrtho2D() or something like that... Why do you wan

Re: [pygame] pygame networking redux

2007-06-06 Thread Jasper
they first seem. Plus making a game is a lot of work, so every little bit you can shave off helps. -Jasper brass-golem.com (a bit stale, but I am still working on it!)

Re: [pygame] pygame networking redux

2007-06-05 Thread Jasper
at it was actually slower for me. It's pretty simple to switch though, so probably worth trying it both ways. Hearing that the guy suggesting this approach has it only "mostly working" isn't exactly encouraging though. -Jasper Simon Wittber wrote: Richard Jones just men

Re: [pygame] pygame networking redux

2007-06-05 Thread Jasper
Perhaps useful. Seems like premature optimization to me though, and unlikely to gain enough to be worth the pain of dealing with threads. -Jasper René Dudfield wrote: I'm not sure this is true or not, but it's something I think is the case (untested)... It seems that running tw

Re: [pygame] pygame networking redux

2007-06-04 Thread Jasper
, Perspective Broker saved me from (re)writing tons of code, and I've undoubtedly avoided plenty of nasty networking bugs as well. What would you hope to gain by rolling your own networking code? -Jasper

Re: [pygame] Sticky Variables

2007-05-27 Thread Jasper
is what is intended to be returned -- how else would you modify such a list? If you intend to take the list and modify it's contents locally without changing the original, then you should explicitly copy the original. If you're not intending to modify it locally, then you should use the reference. -Jasper

Re: [pygame] rc 3. please test windows installer.

2006-12-26 Thread Jasper
Pygame's obsolete references to Numeric would definitely be nice! -Jasper

Re: [pygame] SDL vs. Pygame: Alpha Differences

2006-12-24 Thread Jasper
quad color. Not sure how large your sky texture is though, so perhaps this would burn too much video card ram. -Jasper

Re: [pygame] map format

2006-12-18 Thread Jasper
Arg! I hate thunderbird. To avoid further screw-ups, I've just posted the source for the larger map here (which is actually a .py file): http://brass-golem.com/wp-content/uploads/2006/12/showmap.txt Ignore the comments about kludges... -Jasper Jasper wrote: G, my code got it&#

Re: [pygame] map format

2006-12-18 Thread Jasper
G, my code got it's line breaks mangled. Try #2: symbolToTerrain = { '_' : Plains, '@' : Fertile, '+' : Desert, '^' : Mountains, '*' : Hills, '$' : Forest, '%' : Water, '~' : River, '&' : WideRiver, '=' : Roads, '#' : Bridge, '!' : Cliff, } carteString =

Re: [pygame] map format

2006-12-18 Thread Jasper
Following is a more concrete serialization that I used to generate the strategic map seen in this screenshot: http://brass-golem.com/wp-content/uploads/2006/03/0216-1

Re: [pygame] Widescreen problems?

2006-11-08 Thread Jasper
Bob the Hamster wrote: On Wed, Nov 08, 2006 at 02:18:18PM -0800, Jasper wrote: I mean that when you dragged the pygame window across the windows desktop, that it no longer drew correctly. The openGL quad + texture I use for my startup screen was distorted, and not centered correctly. I

Re: [pygame] Widescreen problems?

2006-11-08 Thread Jasper
Luke Paireepinart wrote: Jasper wrote: I was giving a demo of my game today on a friend's widescreen laptop, and my pygame/opengl app broke! Does anyone else have any experience with pygame windows being redrawn incorrectly after being dragged across the windows desktop? I don&#x

[pygame] Widescreen problems?

2006-11-08 Thread Jasper
I was giving a demo of my game today on a friend's widescreen laptop, and my pygame/opengl app broke! Does anyone else have any experience with pygame windows being redrawn incorrectly after being dragged across the windows desktop? -Jasper

Re: [pygame] Rain Generator

2006-10-26 Thread Jasper
No lag here, although I'm on XP. I'm getting like 1200 FPS though, so if there were such a periodic slowdown I probably wouldn't notice. -Jasper Farai Aschwanden wrote: Nice looking rain and proper code! I experienced a tiny lag like every 3 seconds. I experienced that also

Re: [pygame] I can handle more of a one monitor?

2006-10-09 Thread Jasper
I had a friend try my game on a dual monitor system once, and it wouldn't work. I recall at the time someone here said SDL just didn't support dual monitors, so there was no way to make it work short of extending SDL. -Jasper Jose Luis DALLAPICCOLA wrote: Hello. Sorry, I d

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
Greg Ewing wrote: Jasper wrote: > The resulting .exe can't find all of it's needed parts, and > apparently includes a vast array of stuff that isn't needed. This is tangential to the OP's problem, but last time I tried to use py2exe, it seemed to insist on including

[pygame] Pypack

2006-09-28 Thread Jasper
code to force import... Clearly I need someway to manually include certain things, but the Pypack docs give no indication of how to do this... Is there a way to force Pypack to import missing things? I don't know, and so I'm back to futzing with py2exe, for which my .exe is presently looking for datafiles in a different place than py2exe put them. :-( -Jasper

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
Bob Ippolito wrote: On 9/28/06, Jasper <[EMAIL PROTECTED]> wrote: IMHO you're wrong that code needs to be "pathologically dynamic" to use dynamic imports. I find it an entirely reasonable way to load dynamic code and content. I don't make much use of it now, bu

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
Bob Ippolito wrote: On 9/28/06, Jasper <[EMAIL PROTECTED]> wrote: Sami Hangaslammi wrote: > I'd still like to hear why the original poster found PyPack > unsuitable, (so that I could improve it), since it, for example, gets > around both of the numpy/Numeric problems post

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
Bob Ippolito wrote: On 9/28/06, Jasper <[EMAIL PROTECTED]> wrote: Now I'm working on this one, which I vaguely recall coming up in Pypack discussion before: Traceback (most recent call last): File "legacy.py", line 9, in ? File "Realms\Myth\Client\client.pyc"

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
Brian Fisher wrote: Hey Jasper, It does seem like an obscure and difficult problem, but at least it seems to be one a lot of people are having :) [snip] Pretty straight forward really, as I'd already seen most of the excerpts you posted, and so had a good idea of what to expec

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
Sami Hangaslammi wrote: I'd still like to hear why the original poster found PyPack unsuitable, (so that I could improve it), since it, for example, gets around both of the numpy/Numeric problems posted by Brian. Partly because it apparently didn't like having an entry script somewhere other

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
in ? File "OpenGL\__init__.pyc", line 18, in ? File "OpenGL\__init__.pyc", line 14, in __set_attributes IOError: [Errno 2] No such file or directory: 'c:\\BrassGolem\\Realms\\dist\\lib\\shared.zip\\OpenGL\\version' -Jasper

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
Jasper wrote: Luke Paireepinart wrote: What exactly is the problem you're having with py2exe? Afaict you just make a couple-line setup.py file and "it just works" Did you try the py2exe instructions on the pygame website? Yes, I've tried that, but unfortunately th

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
" errors I'm getting are from code I never use, burried deep within libraries I need, e.g. numpy. I've had less trouble getting crossplatform C++ code to statically compile than I'm having sorting this out for just Windows. -Jasper

[pygame] Executable creation blues

2006-09-26 Thread Jasper
se, and thus doesn't work for me. Is there anything else worth trying? Am I stuck fiddling with py2exe, or rolling my own solution? I'm beginning to seriously consider shipping Python, half a dozen libraries, and .pyc files as a possible improvement. :-/ -Jasper http://brass-golem.com

Re: [pygame] Best 3d library.

2006-06-16 Thread Jasper
Has PyOgre stabilized yet? andrew baker wrote: Blender and/or OGRE -- Andrew Ulysses Baker "failrate"

Re: [pygame] Isometric Math

2006-06-15 Thread Jasper
ean if the two actors crossed paths at some point, the actor placed further north would blit *through* the actor to the south, whereas it should really blit *behind*. Sort your "actors" by their depth into the screen, and draw them in that order, rather than just drawing them in the order placed. -Jasper

Re: [pygame] Isometric Math

2006-06-13 Thread Jasper
e same texture, and varry only their colorFilter). So each hex mouseMap is drawn with an RGB color of (x,y,0), while game-piece mouseMaps are drawn with RGB = (0,0,id). Then I read the color of the screen pixel the mouse points to, and decode it to precisely determine what hex/piece is picked. Hope this helps, -Jasper