Re: [pygame] Drawing efficiency question

2022-03-01 Thread Jasper Phillips
. 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: > I am developing a game but I'm running into som

Re: [pygame] Question about sound effect playback

2021-07-14 Thread Jasper Phillips
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? > > > On Wed, Jul 14, 2021,

Re: [pygame] Question about sound effect playback

2021-07-14 Thread Jasper Phillips
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 ): >> raw =

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
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
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 a 'best practice way of doing

Re: [pygame] New GUI

2008-01-22 Thread Jasper
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 apps. Therefore, I've spent

Re: [pygame] .png saving

2007-10-27 Thread Jasper
= 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
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 avoid naming anything map, which Python will happily let you do! I'm still

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

2007-09-05 Thread Jasper
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] 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't a simple matter

Re: [pygame] What about python 3?

2007-09-02 Thread Jasper
, 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
). 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 want to use PyOpenGL for 2D-ness

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 twisted

Re: [pygame] pygame networking redux

2007-06-04 Thread Jasper
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] rc 3. please test windows installer.

2006-12-26 Thread Jasper
to Numeric would definitely be nice! -Jasper

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

2006-12-24 Thread Jasper
burn too much video card ram. -Jasper

Re: [pygame] map format

2006-12-18 Thread Jasper
-154851_screen1.jpg -Jasper carteString = '''\ 0 1 2 3 4 5 6 7 8 9 10 111213141516171819

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
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's line

[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] 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't think

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 in other games

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
. numpy. I've had less trouble getting crossplatform C++ code to statically compile than I'm having sorting this out for just Windows. -Jasper

Re: [pygame] Executable creation blues

2006-09-28 Thread Jasper
:\\BrassGolem\\Realms\\dist\\lib\\shared.zip\\OpenGL\\version' -Jasper

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
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 posted by Brian. Partly

[pygame] Pypack

2006-09-28 Thread Jasper
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
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 tkinter in the executable

[pygame] Executable creation blues

2006-09-26 Thread Jasper
. 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-13 Thread Jasper
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