Re: [pygame] Do you support The #Python Software Foundation making a statement in support of peace?

2022-03-15 Thread BW
Don't presume to speak for me. Ever. Period. :) On 3/15/2022 11:50 AM, Al Sweigart wrote: I don't think "well that's how we've always done it" is ever a good reason for anything. Let's debate on the issue itself. If we want to argue that we shouldn't make statements on things outside of

Re: [pygame] Pygame causes ALSA underrun

2021-08-26 Thread BW
I had the same results with the Rpi architecture. They need to fix the kernel and/or audio driver. The underrun happens when you  push the CPU too hard, and the audio device (seems to) expect there is audio data but there is none in the audio buffer. I imagine it's a race condition that

Re: [pygame] Question about sound effect playback

2021-07-13 Thread BW
Hi Jasper. Try the fourth answer here , by Ted Klein Bergman. On 7/13/2021 4:24 PM, Jasper Phillips wrote: I'm working on a networked action game with rollback netcode, and so I need to

Re: [pygame] Smooth movement and set_repeat()

2021-05-13 Thread BW
In the event handler detect KEYDOWN and KEYUP for the keys you're interested in, and store the state in a variable. In the game logic handler, if the variable indicates that the key is in the pressed state, then do the action. You can also poll the state of the keys with key.get_pressed().

Re: [pygame] Clocks in pygame - Tetris lock delay

2021-05-09 Thread BW
Hi, To do this you would implement states. There are many ways to manage states, from organic to design pattern. For very simple games it's common to use a member attribute and some code (e.g. brick.state, and an if:elif:else block that's sensitive to brick.state) to handle the brick

Re: [pygame] Update Python 2.7 project to work with Python 3

2021-04-27 Thread BW
Hi Jeff. Do a web search for "python 2to3" code convertor. On 4/26/2021 10:26 PM, Jeff Mitchell wrote: Is there an easy way to update an old project (https://sourceforge.net/projects/twodracing/ ) to work with the latest Python/Pygame? I'd like

Re: [pygame] Re: Starting the pygame 2 series

2020-10-23 Thread BW
You fixed my blending bug before I could report it. Thank you. :) On 10/23/2020 2:09 PM, Andrew Baker wrote: Very nice work, René On Fri, Oct 23, 2020, 12:49 René Dudfield > wrote: / / /*5 more sleeps* (not including extra naps) until the 20th & 2.0

Re: [pygame] Can the pygame infrastructure be used for non-graphical text-mode games?

2020-07-11 Thread BW
You got some good feedback so far for choosing the right tool for the job. I'd like to close the gap regarding Python and pygame, in case you're interest is in using them even if they aren't what might be considered the best tools for the job. The audiovisual functions and event handling in

Re: [pygame] Needing help with 2-axes scrolling

2019-08-12 Thread BW
Hi, It would help if you could put your code up so we can take a look, and instructions for reproducing the undesired behavior. Reducing the problem to a small mockup of the problem would be even better. On 8/11/2019 12:35 AM, Liquid - Banana wrote: Hey Pygame Champions, I am working on

Re: [pygame] Delay in MOUSEBUTTONUP after application start

2017-11-19 Thread bw
Interesting notion, event.clear(). Or perhaps try an event.pump() in the game loop. On 11/18/2017 11:28 PM, Ian Mallett wrote: ​Hi, FWIW I am unable to reproduce on Win 7 Pro, Py 3.5.1, PyGame 1.9.2a0 (to print the latter, `print(pygame.ver)`). The event system, like everything else, is

Re: [pygame] Line Collision

2017-11-18 Thread bw
It seems so simple a problem to our eyes. But it's computationally a non-trivial problem. You can find algorithms on the web mostly in other languages and convert them to Python, like I did here.

[pygame] Re: Upcoming pyweek 24

2017-07-10 Thread bw
Here is a voting form to pick the next pyweek. Go ppls. https://pyweek.org/d/6232/#comment-13365 On 7/1/2017 11:17 AM, bw wrote: Informal discussion here: https://pyweek.org/d/6232/

[pygame] Upcoming pyweek 24

2017-07-01 Thread bw
Informal discussion here: https://pyweek.org/d/6232/

Re: [pygame] How much blit costs?

2017-06-15 Thread bw
Hi. If you have 14996 sprites that are not visible, and do not need to be processed every frame, the greatest performance improvement you will get is by using a spatial hash instead of a flat container such as a sprite group, list, or dict. Even if off-screen sprites need some processing near

[pygame] calling Richard Jones

2017-04-27 Thread bw
The pyweek.org SSL cert is expired or broke. Could you fix it please, kind sir? I would fix it but somebody once said "You can't let him in here!" Gumm

Re: [pygame] pygame.org not displaying release descriptions

2017-04-26 Thread bw
an issue. Gumm On 4/26/2017 2:28 AM, Thomas Kluyver wrote: On 26 April 2017 at 00:54, bw <stabbingfin...@gmail.com <mailto:stabbingfin...@gmail.com>> wrote: Is this in the works, by any chance? I have no idea, but the website code is here, if you can work out how to fi

Re: [pygame] No confirm instructions sent?

2017-03-19 Thread bw
Woot. Whatever you did in the last 24 hours, it worked. Now don't touch nothin'. :) Thanks, René. On 3/18/2017 9:39 PM, bw wrote: Hi, again. 4:35 AM UTC, Internal Server Error I filled in every field, and selected the image. I tried to click that Continue button just right...but alas

Re: [pygame] pygame with SDL2 proposal

2017-03-18 Thread bw
Hi, thanks for inviting me to opine. :) I like it. But "import pygumm" looks a lot more handsome than "import pygame2". Seriously. Having had much recent experience with a SDL2 implementation (pypy, CFFI, plus all the SDL2 libs), I found that I would really like to see in the next

Re: [pygame] No confirm instructions sent?

2017-03-18 Thread bw
Hi, again. 4:35 AM UTC, Internal Server Error I filled in every field, and selected the image. I tried to click that Continue button just right...but alas. :) On 3/17/2017 10:31 PM, René Dudfield wrote: Hi again, that's fixed now. cheers, On Fri, Mar 17, 2017 at 4:30 AM, bw <stabbing

Re: [pygame] No confirm instructions sent?

2017-03-16 Thread bw
error in the logs, and I just made a new project myself with no troubles. Can you give me any other info? cheers, On Thu, Mar 16, 2017 at 5:48 AM, bw <stabbingfin...@gmail.com <mailto:stabbingfin...@gmail.com>> wrote: It worked! Thanks.

Re: [pygame] No confirm instructions sent?

2017-03-15 Thread bw
It worked! Thanks. Now I am getting Internal Server Error when I try to create a new project. =) On 3/15/2017 4:49 AM, René Dudfield wrote: Sorry about that. Yes, that's fixed now. cheers, On Wed, Mar 15, 2017 at 5:12 AM, bw <stabbingfin...@gmail.com <mailto:stabbingfin...@gma

Re: [pygame] No confirm instructions sent?

2017-03-14 Thread bw
Hi, René. I am getting Internal Server Error when clicking the Resend Confirmation button. No other details are provided, and I'm not receiving a confirmation email. Dunno if you are looking into this. On 3/12/2017 1:34 AM, René Dudfield wrote: Hi, hopefully a confirmation email arrived for

Re: [pygame] timer callback into object?

2017-02-11 Thread bw
I like clocks, timers and callbacks, Irv. I would not like to make a game without them. :) Here's a game clock. It's a little dated, but solid. https://bitbucket.org/gummbum/gummworld2/src/e7dc9eaf45f3f6809d097968c0cb32edf6ea3bb9/gamelib/gummworld2/gameclock.py Here's a newer game clock. It's

Re: [pygame] Faster blitting

2016-03-14 Thread bw
The request for SDL_LowerBlit makes sense to me if it opens an alternative avenue to optimize a game's renderer that works better on an under-powered platform. Some checks done in advance do not have to be recalculated repeatedly. That pygame, by its compiled nature, limits extensibility has

[pygame] gsdl2_shooter available

2015-12-10 Thread bw
Somebody said in #pygame... (10:46:53 PM) Gummbum: alert alert alert (10:47:01 PM) Gummbum: gsdl2_shooter is ready for players. (10:53:17 PM) Gummbum: https://bitbucket.org/gummbum/gsdl2/downloads If you are so inclined, please let me know what you think. Gumm

Re: [pygame] Function for keyboard movement

2015-10-06 Thread bw
of pressing and releasing a key. It treats what happens in the interim game loops between the time a key was pressed and later released. I expect most learn this distinction early on, so it provides a good example of higher abstractions becoming your friend. Gumm On 10/6/2015 4:49 PM, bw wrote

Re: [pygame] Function for keyboard movement

2015-10-06 Thread bw
Hi, Bob, As Noel said, there are many ways to do what you want. The attached program uses a class abstraction to handle events, and two sprite types for the game objects. These are extremely basic. They may not fit all your use cases. But the more general purpose you try to get, the more

Re: [pygame] what is the use of Rect.move(offsetX, offsetY) for moving an image?

2015-09-05 Thread bw
converting the objects from real space to screen space. On 9/5/2015 6:29 PM, tom arnall wrote: you mean by manipulating Rect.x etc? yep that works fine and that's how i handle the problem. but why have the move() method in pygame at all? i mean, what do people use it for typically? On

Re: [pygame] what is the use of Rect.move(offsetX, offsetY) for moving an image?

2015-09-05 Thread bw
You are correct, sir. The Rect methods convert your inputs to int, at which point precision is lost. If we want finer spatial calculations we must keep them in forms that don't lose precision, and apply them to the Rect object as needed. On 9/5/2015 2:52 PM, tom arnall wrote: The docs say

Re: [pygame] what is the use of Rect.move(offsetX, offsetY) for moving an image?

2015-09-05 Thread bw
still very much in learning mode with pygame. with python too actually. On 9/5/15, bw <stabbingfin...@gmail.com> wrote: It's convenient. Also, in my experience move() is faster than "rect.x += 1; rect.y += 1" even though it creates a new Rect object. I use it in the case wh

Re: [pygame] Gracefully exiting with errors

2015-08-26 Thread bw
. bw On 8/26/2015 10:55 AM, Ian Mallett wrote: On Wed, Aug 26, 2015 at 11:38 AM, Bob Irving bob...@gmail.com mailto:bob...@gmail.com wrote: Is there a way to exit your game gracefully when there are errors? We have found with both IDLE and WingIDE that the game hangs, requiring

Re: [pygame] Difference between flip and update?

2015-08-26 Thread bw
Hi again, Bob. From a teaching standpoint... flip updates the entire screen by swapping display buffers each game loop. update uses dirty rects to define the regions that need to be drawn each game loop. update is harder to learn and use. You have to track the areas of the screen that were

Re: [pygame] possible to get rid of ghost image after rotating a line?

2015-08-26 Thread bw
Hi, Tom, Have you considered dealing with space mathematically, and rendering the results to screen? https://pypi.python.org/pypi/euclid Here is a different collection of spatial algorithms.

[pygame] Re: SOLVED good build for Windows 7 + Python 3 + pygame + numpy?

2015-04-03 Thread bw
. Install pip if necessary. 4. Install pygame 1.9.2 for Windows and Python32. 5. Install Microsoft Visual C++ 2010 SP 1 redistributable http://www.microsoft.com/en-us/download/confirmation.aspx?id=26999. 6. pip install numpy Gumm On 4/3/2015 7:43 AM, bw wrote: Hi, all, I cannot find a compatible

[pygame] Re: REALLY SOLVED good build for Windows 7 + Python 3 + pygame + numpy?

2015-04-03 Thread bw
Ugh, I gave bad info. Here is the correct Microsoft thing. The vcredist link is a dead end. Microsoft Visual C++ Compiler for Python 2.7 http://www.microsoft.com/en-us/download/details.aspx?id=44266 I know it says Python 2.7, but it worked for 3.2. Gumm On 4/3/2015 8:23 AM, bw wrote

[pygame] good build for Windows 7 + Python 3 + pygame + numpy?

2015-04-03 Thread bw
Hi, all, I cannot find a compatible version combo for these three packages. At one time I had Python 3.2 installed w/o numpy. It was the best I could do, cause I'd been unsuccessful in hacking together a build environment for anything in Windows and the years have taught me to consider up

Re: [pygame] Module I made for drawing text with pygame

2015-03-22 Thread bw
gummo.py Do with it as ya like. But ya probably would like it best in the ptext demo directory. :) Gumm On 3/16/2015 11:01 PM, bw wrote: Yes...I have acquired clunx capacitor 518400. No one can stop me now. And with this new font module I will win the Pyweek! Oh, uh. Sorry, got a little

Re: [pygame] Module I made for drawing text with pygame

2015-03-17 Thread bw
Yes...I have acquired clunx capacitor 518400. No one can stop me now. And with this new font module I will win the Pyweek! Oh, uh. Sorry, got a little excited. :) I really like the convenience of this module, Christopher. I look forward to playing with it some. Some of those effects and

Re: [pygame] made a game

2015-03-13 Thread bw
Works on Windows 7, Python 2.7. I like it. :) Gumm On 3/13/2015 2:19 AM, jcup...@gmail.com wrote: Thank you for you kind words, Dillup and Bartosz! You're right, some sound effects would be nice. Does it work OK on Windows? Hold down 'I' on the start screen to see an FPS counter. I've tried

Re: [pygame] Slow rendering speed - sprites

2015-03-07 Thread bw
Hi, See the attached for some tweaks. I bumped the number of sprites up to 200. When I used my own 100x100-pixels png that has an alpha layer I get a bit more than 100 fps. Alpha layers take extra CPU to render. When I use same-size filled rects of the same dimensions I get a little over

Re: [pygame] Can I download all game source files easily?

2015-02-17 Thread bw
Hey there. Unfortunately the projects on pygame.org are only informational. They link to offsite hosting services for the game files. And the project pages fall out of maintenance because the authors move on, and as you've seen hosting services come and go. You could try Firefox web browser

Re: [pygame] Can I download all game source files easily?

2015-02-17 Thread bw
Also, you've probably seen this guy come up. He is in the spotlight, so some folks have called it out as an exceptional tutorial. http://www.pygame.org/project-Program+Arcade+Games+With+Python+and+Pygame-2843-4584.html Gumm On 2/17/2015 8:03 AM, shibbiddyd wrote: I am teaching a workshop to

Re: [pygame] registration

2015-02-06 Thread bw
Howdy, folks, The pygame.org site maintainers read this list. They will hook you up with web site accounts when they see your request here. Have patience, it may take more than a day. It is this way because auto-registration enabled an amount of commercial spam on the web site that was

Re: [pygame] PYGGEL reboot

2015-01-24 Thread bw
The pyglet author remade the pyopengl interface in ctypes, which I seem to recall performs noticably faster than the wrapper that comes with pyopengl. This may be a valuable consideration in your choice of wrapper. pyglet's batching is designed for 2D rendering, and was wasted on the

Re: [pygame] IRC Moderation

2015-01-09 Thread bw
Lief and wkmanire are good eggs in my opinion. I've spent considerable time in channel with them. Gumm On 1/9/2015 5:34 PM, Devin Jeanpierre wrote: Talk to Marien Zwart (marienz on freenode). You will have to get someone from the pygame project to obtain ownership over the channel and give

Re: [pygame] Is it safe to subclass Pygame Channels and Sound classes?

2015-01-05 Thread bw
I have built classes for custom purposes and put the sound and channel objects in an attribute, then exposed the methods I needed. This may work for you. If I recall correctly, there is a jukebox recipe under Cookbook on the pygame.org website that does this. Gumm On 1/5/2015 9:59 PM,

Re: [pygame] This program breaks on my Linux

2014-06-29 Thread bw
Hi, Jake, This is not true. A process's default action for an unhandled event is to abort. During normal execution, when the problem is not occurring, an unhandled SIGTERM aborts the process just fine. Gumm On 6/29/2014 00:48, Jake b wrote: SIGTERM (15) does not kill the program. SIGKILL

Re: [pygame] This program breaks on my Linux

2014-06-29 Thread bw
would have to dig well beneath the Python code. I lack the requisites, unfortunately. Gumm On 6/29/2014 02:10, DR0ID wrote: On 2014-06-28 19:14, bw wrote: if e.key == K_ESCAPE: print(1) pygame.display.get_init() print(2

Re: [pygame] This program breaks on my Linux

2014-06-28 Thread bw
statement hangs, I presume because pygame's cleanup is called. Gumm On 6/28/2014 05:29, Sam Bull wrote: On ven, 2014-06-27 at 22:35 -0700, bw wrote: I attached the small program. I'm curious if anyone can run it and reproduce the problem. I plan on upgrading Ubuntu soon, when I am ready to risk

Re: [pygame] Re: Pygame not handling keyboard tracking correctly

2014-06-23 Thread bw
Try: id(a), id(b) In some cases they are different objects, and a is b rightly evaluates to False. Gumm On 6/23/2014 00:39, diliup gabadamudalige wrote: when you say a=100 and b=100 it is understood that a and b are both given TWO values and that both are the same is a coincidence. BUT if

Re: [pygame] Scaling the hitbox/rect of a sprite

2014-05-23 Thread bw
Example attached. This might get you going. Gumm On 5/23/2014 07:02, Skorpio wrote: Thanks for the help everybody, but it still doesn't work. I've tried these functions as collided values (as Jeffrey Kleykamp suggested): pygame.sprite.collide_rect() takes only sprites as values and then uses

[pygame] Re: Strange performance in blit

2014-04-27 Thread bw
to show rendering off screen has no impact. Gumm On 4/26/2014 20:47, bw wrote: Whoops. Forgive my haste and loss of focus right before sending that. There is a mistake. Change line 89: costs = [] to costs_per_screen = [] Gumm On 4/26/2014 18:01, bw wrote: Howdy, folks, I am getting some

Re: [pygame] Re: Strange performance in blit

2014-04-27 Thread bw
On 4/27/2014 01:35, diliup gabadamudalige wrote: could this be due to the fact operations are done in multiples of 8 bits? (16 bit, 32 bit, 64 bit etc.) On Sun, Apr 27, 2014 at 12:52 PM, bw stabbingfin...@gmail.com mailto:stabbingfin...@gmail.com wrote: After some more study I have refined

[pygame] Strange performance in blit

2014-04-26 Thread bw
Howdy, folks, I am getting some strange behavior in Surface.blit(). This is a mystery. I blit a collection of images to to fill the screen. If I pan left or right even one pixel, blit consumes nearly 4x the CPU. It is only left or right: if I pan up or down performance is not impacted. I've

[pygame] Re: Strange performance in blit

2014-04-26 Thread bw
Whoops. Forgive my haste and loss of focus right before sending that. There is a mistake. Change line 89: costs = [] to costs_per_screen = [] Gumm On 4/26/2014 18:01, bw wrote: Howdy, folks, I am getting some strange behavior in Surface.blit(). This is a mystery. I blit a collection

Re: [pygame] IDE ?

2014-04-16 Thread bw
liked about DrPython. It could not have been any easier. I am happy again. Hope this helps. :) Gumm On 4/7/2014 20:54, bw wrote: DrPython editor in Windows and Linux. If I need to debug I use pdb. I like Netbeans but it's gargantuan, way more than I need. On 4/7/2014 17:02, David wrote

Re: [pygame] IDE ?

2014-04-07 Thread bw
DrPython editor in Windows and Linux. If I need to debug I use pdb. I like Netbeans but it's gargantuan, way more than I need. On 4/7/2014 17:02, David wrote: This must have been asked before Which IDE do you like? I'd want Free and Cross-Platform (Win/Linux). A debugger would be very

Re: [pygame] preview of new pygame website... HiFi part

2014-04-05 Thread bw
Hi, René, Thanks for the early peek. At first I thought the page was way too busy, and horizontal scrolling would be tedious. Then I saw the category widgets and my worry went away, this is nice. A choice between scripted sliding and a CPU-friendly presentation would be ideal, if that is

Re: [pygame] Old projects with bad links

2013-11-03 Thread bw
I vote yes. Dead projects provide no significant value to the site and its active users. On 11/3/2013 04:16, Jason Marshall wrote: Should we delete old projects if the user is inactive and the links are dead? The existence of so many dead projects is not friendly to newbies. Jason