Re: [pygame] Re: Review Pygame book

2007-10-20 Thread Will McGugan
Will McGugan wrote: I'm getting a lot of responses to this, which is great, but Apress said they have 5 copies to give away. Although I can ask them for more. I will select some people at random tomorrow (I'll write a Python script!) and send email to who ever it selects. If you don't hear

[pygame] Review Pygame book

2007-10-16 Thread Will McGugan
Hi folks, I'm looking for a few people to review my Pygame book, on their blog and perhaps Amazon or other places. The publisher has offered to give away a few free copies for this. If you are interested, then please let me know. Regards, Will McGugan

[pygame] Re: Review Pygame book

2007-10-16 Thread Will McGugan
Will McGugan wrote: Hi folks, I'm looking for a few people to review my Pygame book, on their blog and perhaps Amazon or other places. The publisher has offered to give away a few free copies for this. If you are interested, then please let me know. I'm getting a lot of responses

Re: [pygame] Partially Transparent Color-Dynamic Rectangles

2007-10-13 Thread Will McGugan
to render the bar. For efficiency you could just create a small surface and tile it across the length of the bar. Alternatively you could use numarray to do the blending, although that wouldn't be quite as intuitive. Regards, Will McGugan

Re: [pygame] Free chapter of my book

2007-10-12 Thread Will McGugan
Horst JENS wrote: I think that either the comment should say in 10 frames or the randint statement should be randint(1,10). correction: or the ranint statement should be randint(1,20) Ack! Well spotted. Never hard code values in to comments! Will

Re: [pygame] Free chapter of my book

2007-10-08 Thread Will McGugan
anything wront with this url ? i get this error: The requested URL could not be retrieved My hosting provider seems to be having issues. Perhaps I've been slashdotted or dugg or something. I'll try and get it back up... Will

Re: [pygame] Free chapter of my book

2007-10-08 Thread Will McGugan
Will McGugan wrote: anything wront with this url ? i get this error: The requested URL could not be retrieved My hosting provider seems to be having issues. Perhaps I've been slashdotted or dugg or something. I'll try and get it back up... Appears to be back up! :-) Will

[pygame] Free chapter of my book

2007-10-04 Thread Will McGugan
reviewer! Regards, Will McGugan

Re: [pygame] OpenGL in Pygame

2007-08-25 Thread Will McGugan
Bradley Johnson wrote: I recently got my computer working with OpenGL via Python, i would like to know how to use it in Pygame, any sites that might help? This may help... http://www.willmcgugan.com/2007/06/04/opengl-sample-code-for-pygame/ Will

[pygame] Pre-multiplied alpha

2007-08-03 Thread Will McGugan
Hi, Is there any way to pre-multiply a surface with its alpha channel? I guess I could to it with surfarray, but I was wondering if there was another way. Regards, Will McGugan

Re: [pygame] Pre-multiplied alpha

2007-08-03 Thread Will McGugan
Brian Fisher wrote: One ghetto way you could do it by rendering the surface to an opaque black surface, then copying the original image's alpha over the opaque black surface's alpha. Good idea! Is this for sending the pygame surface data to some other library or something? Yes, its

Re: [pygame] Particle Effects

2007-07-16 Thread Will McGugan
Giuliano Vilela wrote: I read the part about the additive blending. Interesting idea, the sum of all the values of colors in the region would indeed converge to white sometimes... Guess I'll have to use the surfarray module. You might want to look at Ping Ball (http://www.pingball.com/) for

Re: [pygame] Py2exe

2007-07-03 Thread Will McGugan
Ian Mallett wrote: My program is saved as a .pyw file; opens without a console. When I compiled it with py2exe, it runs with a console window. I don't want one. Any ideas? Thanks, Geometrian You put the .pyw script in the 'windows' section in the call to setup. Something like this...

Re: [pygame] Starting Window Position

2007-06-28 Thread Will McGugan
Ian Mallett wrote: That seems to work sometimes- the first time. Subsequent attempts to change the window position fail. I don't think it was really intended as a way of setting the window position dynamically. If you are running on Windows you could do it in a completely non-portable

Re: [pygame] Starting Window Position

2007-06-28 Thread Will McGugan
Ian Mallett wrote: import win32gui import win32con aren't modules, according to the computer. Are you on python 2.5? They're part of the win32api module, which has builds for 2.5 http://sourceforge.net/project/showfiles.php?group_id=78018 Will

[pygame] MOD files question

2007-06-20 Thread Will McGugan
Hi, The docs for pygame.mixer.music mention MOD files. What kind of MOD files can PyGame play? Does anyone still use them? I don't think I have even seen any since MP3 took over! Thanks, Will McGugan

Re: [pygame] Text-Based RPG

2007-06-18 Thread Will McGugan
Jonah Fishel wrote: I've been away from Python for several months. I just came back to it, to start working on a text-based RPG. To get started, I decided to move by rooms. I have separate text files for each major message, to conserve file space. What troubles me is that when I tested it,

[pygame] Free sound effects

2007-06-17 Thread Will McGugan
Hi, Does anyone know of any good sites for _free_ sound effects? Regards, Will

Re: [pygame] Free sound effects

2007-06-17 Thread Will McGugan
DR0ID wrote: Hello I assume you have seen that: http://www.pygame.org/wiki/resources Actualy I hadn't seen that. I should have looked there first! :-) Will

[pygame] BUG: audio channels reversed in 8-bit

2007-06-17 Thread Will McGugan
Hi, If I initialise the pygame.mixer for an 8-bit sample size, then the left / right channels are reversed - compared to 16-bit. Tested on Win2K, Python 2.4 Regards, Will McGugan

Re: [pygame] BUG: audio channels reversed in 8-bit

2007-06-17 Thread Will McGugan
René Dudfield wrote: weirdness... do you have a little example? Sure. This is the script that I discovered it in. Just change the 16 to 8 in the call to pre_init.. http://www.willmcgugan.com/files/bouncey.zip Will

[pygame] Playing mp3s

2007-06-16 Thread Will McGugan
Hi, The docs seem to imply that pygame.mix.music can play MP3s, but when I try to load any of my mp3s I get a 'Module format not recognized' error. OGGs work fine. Does PyGame not support mp3 - or is there something odd about my mp3s? Will

Re: [pygame] Playing mp3s

2007-06-16 Thread Will McGugan
Patrick Mullen wrote: Mp3 support, certain font support, and other things seem to be very platform specific with pygame recently, I'm not sure if it's always been that way, but it certainly is now. As far as I know, .ogg's don't have any issues, but I have seen a perfectly good mp3 play on

Re: [pygame] Game Objects 0.0.2

2007-06-16 Thread Will McGugan
Marius Gedminas wrote: I liked the blog entry and started looking around in the svn repository browser (no syntax highlight, *sigh*). I think there's a bug in ColorRGBA.grey: the 'a' argument (alpha?) is required, but never used. Yeah, fixed that in my local version. I'm somewhat

Re: [pygame] 3D sample code

2007-06-08 Thread Will McGugan
Kamilche wrote: Is there a way to render 3d objects out to disk only, and use the renders in a normal Pygame program? Is there any advantage to doing so, in speed, or memory, or anything? It is possible to render to a texture and grab that back, but I don't think you could do that in

Re: [pygame] 3D sample code

2007-06-08 Thread Will McGugan
Nick Moffitt wrote: Will McGugan: I don't think it would be pracitcal to render 3D models and blit them in 2D. Happy to be proven wrong though. Well, consider games like powermanga. They generated their sprites using 3-D tools and saved them to disk. I think Kamilche

Re: [pygame] 3D sample code

2007-06-07 Thread Will McGugan
[EMAIL PROTECTED] wrote: On Thu, June 7, 2007 2:45 pm, Horst JENS wrote: On Mon, 2007-06-04 at 21:19 +0100, Will McGugan wrote: I've just posted some sample code for using OpenGL with PyGame. Hope you find it interesting. http://www.willmcgugan.com/2007/06/04/opengl-sample-code

[pygame] Game Objects

2007-05-20 Thread Will McGugan
Hi folks, I've just uploaded a new version of my 'Game Objects' library. The 3D math classes have been updated, and I was hoping for some feedback. Let me know if you have any suggestions for ways to improve it... http://www.willmcgugan.com/2007/05/20/game-objects-3d-math/ Regards, Will

[pygame] Fixed width font

2007-05-19 Thread Will McGugan
Hi, Is there any way I can get a fixed width font accross all platforms, without bundling the script with a ttf? I'm using 'courier new' on Windows, but the exact look of the font is not too important. Regards, Will

Re: [pygame] Fixed width font

2007-05-19 Thread Will McGugan
Alex Holkner wrote: Courier New is installed on all platforms: it is one of Microsoft's core web fonts, and is required by PDF applications. Good to know. Thanks. Will

[pygame] Langton Ants

2007-05-18 Thread Will McGugan
Hi folks, Blogged about a PyGame script I wrote to simulate Langton Ants. Hope you find it interesting! http://www.willmcgugan.com/2007/05/18/langton-ants-in-pygame/ Regards, Will

Re: [pygame]

2007-05-08 Thread Will McGugan
Rikard Bosnjakovic wrote: On 5/8/07, João Matos [EMAIL PROTECTED] wrote: help Help is on the way! Have no fear! *dons cape*

[pygame] Making videos

2007-05-08 Thread Will McGugan
Hi, Does anyone have a solution for recording video of a PyGame app? I've tried Fraps, but that doesn't seem to work. Will

Re: [pygame] PyGame Runtime

2007-05-06 Thread Will McGugan
Brian Fisher wrote: Will, first off I think it's wonderful that you're thinking so much of distribution. When it comes to the majorty of the downloadable game audience (the less technical part) I think having reasonable end-user distribution is a pre-requisite to the success of any game

[pygame] Infinite sprites

2007-05-02 Thread Will McGugan
Hi folks, Ive just posted a demo of how to render an infinite number of sprites in PyGame. http://www.willmcgugan.com/2007/05/02/infinite-sprites-with-pygame/ Regards, Will McGugan

Re: [pygame] Fugu's Friend

2007-04-27 Thread Will McGugan
Kamilche wrote: Well, I was inspired by Fugu, so I wrote a variation of it called Fugu's Friend that displays an animated turtle that rotates to face the correct direction for movement, toggles fullscreen mode on alt-enter, displays info such as FPS and current mouse position, lets you

[pygame] Sub-pixel rendering

2007-04-25 Thread Will McGugan
Hi folks, I've just posted a module to do sub-pixel blitting with 2D PyGame. Hopefuly someone will find it useful! http://www.willmcgugan.com/2007/04/25/going-sub-pixel-with-pygame/ Regards, Will McGugan

Re: [pygame] Sub-pixel rendering

2007-04-25 Thread Will McGugan
Kamilche wrote: Wow. That's really beautiful, thanks for posting it! That is such a complex particle effect you got going there... I went looking for the pages of code it took to create it, and found the few paltry lines. :-D Glad you like it. Have you ever considered working up a

Re: [pygame] Path finding demo, now with more fugu

2007-04-23 Thread Will McGugan
Brian Fisher wrote: The point I was trying to make was that not all frames take the same amount of time to do the work to get to the screen. Like lets say a comp can only manage an average of 20 fps, or on average it takes 50ms per frame. Well it won't come out as 50ms per frame. It's likely to

Re: [pygame] Path finding demo, now with more fugu

2007-04-23 Thread Will McGugan
Simon Oberhammer wrote: Hm, haven't thaught about this too much and always did my own busy wait and a fixed frame rate (of course game adjusts to slower fps). Would someone care show pseudo code for decoupled update/draw and non-busy wait stuff? Or maybe a real game and point me to the

Re: [pygame] Path finding demo, now with more fugu

2007-04-21 Thread Will McGugan
R. Alan Monroe wrote: Just put a path finding demo on my website, that you may find interesting. http://www.willmcgugan.com/2007/04/20/swim-fugu-swim/ Works great, although it pegs the cpu at 100% :) Did you want to do something else at the same time?! :-P Will