pgu-devel Mailing List for Phil's pyGame Utilities
Status: Beta
Brought to you by:
philhassey
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(23) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(3) |
Feb
(18) |
Mar
(4) |
Apr
(8) |
May
|
Jun
(1) |
Jul
(5) |
Aug
(4) |
Sep
(2) |
Oct
(6) |
Nov
(4) |
Dec
(3) |
2007 |
Jan
(2) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
(12) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(8) |
Nov
(1) |
Dec
(1) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
(6) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: karanveer s. <kar...@gm...> - 2013-01-24 11:09:32
|
http://reinodossonhos.com/wp-content/themes/reinosonhos/yahool321.php |
From: Russell S. <se...@cs...> - 2010-04-13 06:25:40
|
Here is a nice writeup of the algorithms used in the original arcade game (especially chapters 3 and 4): http://home.comcast.net/~jpittman2/pacman/pacmandossier.html -Rusty karanveer singh wrote: > I'm making a pacman clone in which I need to do collision detection > between my player, ghosts and tiles. Whenever the ghost reaches an > intersection, if he gets blocked from above (or below) I tell him to > go right or left according to where the player is. And if he gets > blocked from right or left, I tell him to go up or down depending on > where my player is. > The problem is, when there is an intersection at a right angle, the > ghost first gets blocked from, say above, and goes right and then gets > blocked again and goes back above and gets blocked again... thus > getting stuck in a cycle. Something like this: > > > player > > tile tile tile tile tile tile > ghost tile > tile > tile > > Anyway to deal with this? > > Thanks, > Karanveer Singh > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Pgu-devel mailing list > Pgu...@li... > https://lists.sourceforge.net/lists/listinfo/pgu-devel |
From: Clint H. <han...@gm...> - 2010-04-13 04:14:53
|
On Mon, Apr 12, 2010 at 9:53 PM, karanveer singh <kar...@gm...>wrote: > I'm making a pacman clone in which I need to do collision detection > between my player, ghosts and tiles. Whenever the ghost reaches an > intersection, if he gets blocked from above (or below) I tell him to > go right or left according to where the player is. And if he gets > blocked from right or left, I tell him to go up or down depending on > where my player is. > The problem is, when there is an intersection at a right angle, the > ghost first gets blocked from, say above, and goes right and then gets > blocked again and goes back above and gets blocked again... thus > getting stuck in a cycle. Something like this: > > > player > > tile tile tile tile tile tile > ghost tile > tile > tile > > Anyway to deal with this? > > Thanks, > Karanveer Singh > > The complex way would be to implement true pathfinding (such as A*). The simple way (that I would probably go for) is to just implement a random factor, that 1/4 or 1/6 of the time or something, the ghost will move in a completely random direction upon intersecting a wall -- that would eventually break the ghost out of its infinite loop, while still generally tending towards chasing the player. --clint |
From: karanveer s. <kar...@gm...> - 2010-04-13 01:53:11
|
I'm making a pacman clone in which I need to do collision detection between my player, ghosts and tiles. Whenever the ghost reaches an intersection, if he gets blocked from above (or below) I tell him to go right or left according to where the player is. And if he gets blocked from right or left, I tell him to go up or down depending on where my player is. The problem is, when there is an intersection at a right angle, the ghost first gets blocked from, say above, and goes right and then gets blocked again and goes back above and gets blocked again... thus getting stuck in a cycle. Something like this: player tile tile tile tile tile tile ghost tile tile tile Anyway to deal with this? Thanks, Karanveer Singh |
From: karanveer s. <kar...@gm...> - 2010-04-11 05:33:36
|
Is this list active right now? |
From: Claudio <cla...@ya...> - 2008-08-17 15:16:16
|
Ok, the gui9.py misbehavoir comes from a color incompatibility between pygame version 1.7.1 versus 1.8.1: >>> import pygame >>> print pygame.version.ver 1.8.1release >>> c=pygame.color.Color('#000000') >>> print c (0, 0, 0, 0) >>> >>> import pygame >>> print pygame.version.ver 1.7.1release >>> c = pygame.color.Color('#000000') >>> print c (0, 0, 0, 255) >>> A color is initialized in gui9.py to '#000000' wich was black in 1.7.1 and is transparent in 1.8.1. Besides, the color picker doenst change alpha, so any color selected will maintain the original alpha, 0 in this case. Fix: specify the alpha, in this case : '#000000FF' Pygame bug aditional impact: Seems that in pgu.gui there are no other instances of colors as '#xxyyzz', but the config.txt file in the themes\default and themes\gray directories used colors without explicit alpha. To be safe probably it would be better to specify the alpha desired ( -- untested -- ) A patch for gui9.py, against pgu from imitation pickles r38 is included. -- claxo ____________________________________________________________________________________ ¡Buscá desde tu celular! Yahoo! oneSEARCH ahora está en Claro http://ar.mobile.yahoo.com/onesearch |
From: Claudio <cla...@ya...> - 2008-08-16 12:57:05
|
Forgive me the list subscriptors, seems sourceforge mail-list or the web interfase for the archived list dont like gmail; I see my previous posts dont show correctly. So Im posting a link to the bug report and patch, on the pygame-users list: http://news.gmane.org/find-root.php?message_id=%3cf5f20e3a0808140746j22f8ea4cm3b12b171de565d9%40mail.gmail.com%3e -- claxo ____________________________________________________________________________________ ¡Buscá desde tu celular! Yahoo! oneSEARCH ahora está en Claro http://ar.mobile.yahoo.com/onesearch |
From: claudio c. <cca...@gm...> - 2008-08-14 18:54:21
|
Index: theme.py =================================================================== --- theme.py (revisi¢n: 38) +++ theme.py (copia de trabajo) @@ -396,7 +396,7 @@ if box == 0: return - if type(box) == tuple: + if not isinstance(box,pygame.Surface): s.fill(box,r) return @@ -467,7 +467,7 @@ def paint(self,s): r = pygame.Rect(0,0,s.get_width(),s.get_height()) v = self.value.style.background - if type(v) == tuple: + if not isinstance(v,pygame.Surface): s.fill(v) else: self.theme.render(s,v,r) |
From: claudio c. <cca...@gm...> - 2008-08-14 14:30:44
|
Index: theme.py =================================================================== --- theme.py (revisi¢n: 38) +++ theme.py (copia de trabajo) @@ -396,7 +396,7 @@ if box == 0: return - if type(box) == tuple: + if not isinstance(box,pygame.Surface): s.fill(box,r) return @@ -467,7 +467,7 @@ def paint(self,s): r = pygame.Rect(0,0,s.get_width(),s.get_height()) v = self.value.style.background - if type(v) == tuple: + if not isinstance(v,pygame.Surface): s.fill(v) else: self.theme.render(s,v,r) |
From: Sibtey M. <si...@in...> - 2008-08-07 07:18:23
|
Hi, How to write the resizable Notes on pygame surface similar to paste it note in Microsoft visio. I have just gone through the pgu utilities but couldn't get it properly. Any help on how to use pgu to write the resizable note is appreciated. Thanks, Sibtey |
From: atul a. <atu...@gm...> - 2008-06-25 19:19:06
|
How to change pgu's labels(text) values continuously in game loop according to current statistics.e.g in a table values of some stuffs are shown by labels and we have to update them regularly acording to current status of game... |
From: Astan C. <st...@al...> - 2008-06-19 08:22:28
|
Hi, Im having problems combining pgu with opengl using pygame and lamia. I've attached my test code. Its basically a button or event that brings up a text entry dialog. So far its fine, as soon as the dialog is closed, it wont close. Any ideas? Cheers Stan -- "Formulations of number theory: Complete, Consistent, Non-trivial. Choose two." Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. |
From: Alan T. <ala...@gm...> - 2008-03-26 19:54:10
|
Hi, I couldn't find a bug tracker for pgu so i just figured I'd post here. There are two issues I just came up with: 1) In my theme's config.txt this works: chat_input background a.png chat_input:focus background b.png But if you take out the first line the second one doesn't work. I worked around this by having both lines and the first background image was a transparent PNG. 2) Background images less that 3 pixels high crash with the following exception: File ".../pgu/gui/theme.py", line 412, in render for dest.y in xrange(y+hh,yy-hh,hh): ValueError: xrange() arg 3 must not be zero This is due to line 404 ww,hh=box.get_width()/3,box.get_height()/3 which sets hh to 0 (because of integer division) and then line 412: for dest.y in xrange(y+hh,yy-hh,hh): which gives you the exception above. Thanks, Alan Trick |
From: John C. <jp...@ho...> - 2008-03-22 23:50:17
|
Hi Is it possible and/or advisable to use both the engine and gui modules together? Basically I'm working on a sort of quiz programme, so I'll have 1 menu at the start then the same gui recycled until the end of the quiz. I'm thinking I could just forget using the state machine from the engine.py module, but it does seem a really good way to switch between screens. Does anyone have any advice? The examples are good, but they don't demonstrate using things like engine & gui together. _________________________________________________________________ In a rush? Get real-time answers with Windows Live Messenger. http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_realtime_042008 |
From: Gary B. <gb...@cs...> - 2008-03-06 17:03:47
|
I'm continuing down this road, hoping for some input. My last attempt resulted in events being delivered more than once. Now I'm trying this bit right up at the top of Container.event. def event(self,e): used = False if e.type > CLOSE: # allow user events to propagate for w in self.widgets: used = w._event(e) if used: break return used That cures my problem. At my current level of understanding (primitive at best) I think Container.event only propagates most events to objects that have focus. Seems to me some kinds of events are useful regardless. Thanks gb Gary Bishop wrote: > Further investigation shows that several types of events are propagated > in Container.event. > > Adding > for w in self.widgets: # gb > w._event(e) # gb > > just before the final return in Container.event makes my connect work > fine. Is there any downside? > > gb > > > Gary BIshop wrote: >> I've got some webcam monitoring code running in another thread. It >> passes USEREVENTs to my pygame programs. I'm trying now to integrate >> it with pgu. >> >> I figured I could derive a class from gui.Image and set things up so >> that when my webcam refreshes its image, I could post an event to object. >> >> All works but I have to connect the USEREVENT to the container object >> that holds my Webcam widget I'd like to just connect it to the widget >> itself. Don't events get passed down through the container hierarchy? >> Where do they stop? >> >> Thanks for the fine software. >> >> gb >> > |
From: Gary B. <gb...@cs...> - 2008-03-06 02:28:21
|
Further investigation shows that several types of events are propagated in Container.event. Adding for w in self.widgets: # gb w._event(e) # gb just before the final return in Container.event makes my connect work fine. Is there any downside? gb Gary BIshop wrote: > I've got some webcam monitoring code running in another thread. It > passes USEREVENTs to my pygame programs. I'm trying now to integrate it > with pgu. > > I figured I could derive a class from gui.Image and set things up so > that when my webcam refreshes its image, I could post an event to object. > > All works but I have to connect the USEREVENT to the container object > that holds my Webcam widget I'd like to just connect it to the widget > itself. Don't events get passed down through the container hierarchy? > Where do they stop? > > Thanks for the fine software. > > gb > |
From: Gary B. <gb...@cs...> - 2008-03-06 01:50:13
|
I've got some webcam monitoring code running in another thread. It passes USEREVENTs to my pygame programs. I'm trying now to integrate it with pgu. I figured I could derive a class from gui.Image and set things up so that when my webcam refreshes its image, I could post an event to object. All works but I have to connect the USEREVENT to the container object that holds my Webcam widget I'd like to just connect it to the widget itself. Don't events get passed down through the container hierarchy? Where do they stop? Thanks for the fine software. gb |
From: Andres R. <and...@gm...> - 2008-03-02 21:03:28
|
List, I have searched google for html rendering engines written in python and one of the results I found was the html section of PGU. After finding it I searched how to embed the html rendering engine in a GTK application and found [0] that basically says "don't do it". I would like to know if any of you guys have experience in including the HTML rendering module inside a GTK application, or maybe you could give me some code snippet to achieve it ? Thanks in advance! [0] http://www.pygame.org/wiki/gui#Why%20Gtk/Qt/WxWidgets...%20are%20bad Saludos, -- Andres Riancho http://w3af.sourceforge.net/ Web Application Attack and Audit Framework |
From: marta s. <p22...@uc...> - 2008-02-13 12:19:45
|
> Hi there! > > I'm trying to use pgu to make a GUI like the image there's near pgu > explanation on the pygame web (which has two places to enter the > name of two players and below has a list for choosing one option) > but I'm so newbie and I get lost on using pgu. The idea is to have > a display, where I blit a background image, and then I want to ask > for the name of several players. The number of players are variable. > > At first time I thought about drawing text "team name:" and then > having a pygame.Rect near it, so I can detect when the player > writes over it..but it seem not working :s so I tryed pgu...but I'm > not be able to do such a simple gui as the described at the > begining (http://www.pygame.org/wiki/pgu-game.png) > > Anyone can guide me? It seems to be so simple, but...right now I > have a headache because of it..ough.. > Thanks so much..! > |
From: George M. <ec...@gm...> - 2008-01-24 18:57:10
|
I've been working on some additions to the PGU GUI lib and been having some issues here and there one of which is described bellow. One of my additions is a dialog based keyboard that appears when clicking into a text field. The problem I'm having is dealing with the focus and blur of the text input area, not to mention getting the position of the field its self to position the keyboard under it. My additions to gui/dialog.py are at the link bellow. http://privatepaste.com/2c07FighVo |
From: Rob S. <ro...@tv...> - 2008-01-24 14:58:07
|
Hi, Using the HTML renderer is there a way to actually overlap elements? There doesn't seem to be. Thanks, -Rob |
From: Rob S. <ro...@tv...> - 2008-01-24 14:02:56
|
Hi, I am using html templates to layout my GUI and am having some issues with alignment. I'd like to achieve the following: +----------------+ | div1 div2| | | =2E.. div1 being centered, div2 align right, both divs aligner to the top of their container. BUT, what's happening is that I am getting a break between the elements and while div2 is aligning right its top is on the same plane as div1's bottom: +----------------+ | div1 | | div2| =2E.. This is kind of driving me crazy. I'd also like to be able to tell the HTML object what its size is supposed to be so when it's rendering it (pygame) doesn't get an out of memory error when it blows its bouds. I don't want to have to hardcode my resolution into the html (though I guess I could specify it in the theme's style config). I know I could use a table here but I'd rather stay away from them. Any suggestions are welcome. Thanks, -Rob |
From: George M. <ec...@gm...> - 2008-01-12 02:22:18
|
When adding an item to a list object with a unicode label PGU seems to throw a fit. I'm not sure why exactly but here is a copy of the error it throws when passing a unicode string. File "/usr/lib/python2.5/site-packages/pgu/gui/area.py", line 416, in _add item = _List_Item(label,image=image,value=value) File "/usr/lib/python2.5/site-packages/pgu/gui/area.py", line 327, in __init__ self.widget.add(label, image.rect.w, 0) File "/usr/lib/python2.5/site-packages/pgu/gui/container.py", line 273, in add w.style.x = x AttributeError: 'unicode' object has no attribute 'style' I've also notice some other objects in PGU dislike unicode, I don't remember off the top of my head at the moment so I'll try to get back on that. http://imitationpickles.org/pgu/docs/gui.area.html#List |
From: Rob S. <ro...@tv...> - 2008-01-11 15:42:06
|
Rob Shortt wrote: > Is there some way I can call a function from my html template img tags > to get the full path to the img src? There wasn't, but now there is. The patch is attached. :) How it works: def path_to_my_images(file): return os.path.join(path, to, my, images, file) myglobals = { 'path': path_to_my_images, } content = """<img src="path('myimage.png')">""" htmlwidget = pgu.html.HTML(content, globals=myglobals) I have my images in a separate directory which is variable based on themes / default theme (search order), plus my app runs on windows and linux. Therefore I can't hardcode the path to my images in the tamplate file (I have my html markup in .tmpl files in another directory). I hope this helps someone else. Maybe it could be included if it's not too hacky. :) -Rob |
From: Rob S. <ro...@tv...> - 2008-01-10 19:10:49
|
Hi, Is there some way I can call a function from my html template img tags to get the full path to the img src? Like: <img src=3D'get_img_path("myimg.png")'> My first instinct was to pass the get_img_path function to globals of HTML, but that did not work. Is there a way to do this now, or will I have to resort to some sort of variable substitution like: myopts =3D { 'MYIMG': get_img_path("myimg.png"), } """ <img src=3D'%(MYIMG)s'> """ % myopts The above may not work either as it hasn't been tested. Thanks a bunch, -Rob |