I think I am confused about what center of a rectangle is becaue I am getting
an "odd" (to me) result.
Specifically:
#I define a rectangle:
tes =pygame.Rect(0,44,200,85)
#now i would expect the center of this rectangle to be be
((200+0)/2),(44+85)/2)) in other words (100, 64) instead I get:
te
) + 44
86.5
It divides the height by two, and then adjusts it by the y coordinate.
cu.
On Fri, Dec 5, 2008 at 11:44 AM, Lin Parkh <[EMAIL PROTECTED]> wrote:
I think I am confused about what center of a rectangle is becaue I am
getting an "odd" (to me) result.
Specifically:
#I defin
Is it possible to set where on the monitor the display will appear? For example
I would like the pygame display to appear on a second monitor I have. I see how
to control resolution and size but not this. I am using windows btw,
Thanks,
Lin
Thanks. Would not have figured this one out easily :-)
- Original Message -
From: "Kris Schnee"
To:
Sent: Thursday, December 18, 2008 7:50 AM
Subject: Re: [pygame] Controlling Display Location on screen
On Thu, 18 Dec 2008 07:44:21 -0800, "Lin Parkh"
wrote:
I
While we're on this kind of topic what is the best approach in python to
creating code macros? That is ability to write a higher level language (or
script) which translates down into python? Decorators look like they would
be part of that story. Is that the best way or is their a more general wa
of ways to change how the existing
syntax works.
Lenard
Noah Kantrowitz wrote:
Python has no such system. Boo is a python-like language that supports
hygienic macros.
--Noah
On Dec 31, 2008, at 1:20 PM, Lin Parkh wrote:
While we're on this kind of topic what is the best approach in pyth
2008, at 4:56 PM, Lin Parkh wrote:
Thanks. The game context is I would like to write a scripting language
on top of pygame/python for my game.
- Original Message - From: "Lenard Lindstrom"
To:
Sent: Wednesday, December 31, 2008 1:32 PM
Subject: Re: [pygame] @
This is getting
Hi,
I'm going to be introducing animation and want to ensure a steady frame rate.
I see two approaches to this right now from reviewing examples. One is to use a
Clock with a frame rate argument. This appears to simply do a delay any time
there are spare milliseconds till the name frame update.
This looks quite interesting. Thanks for pointing that out.
- Original Message -
From: Jake b
To: pygame-users@seul.org
Sent: Saturday, January 10, 2009 7:53 PM
Subject: Re: [pygame] Clock versus time tick checks
This may interest you, it's a tutorial on de-coupling the ga
I know this question is vaguely structured but would love insight if anyone
can manage it. I am trying to give myself an interactive debugger during
the running of my game. That is, while game is in execution I hit a
keystroke which leads to a breakpoint being reached and execution stops but
p
kes here and gives pdb console
HTH
Ulrich
Am 22.02.2009 um 23:28 schrieb Lin Parkh:
I know this question is vaguely structured but would love insight if
anyone
can manage it. I am trying to give myself an interactive debugger
during
the running of my game. That is, while ga
environment is but I usually do something like so if I
need interactive debugging:
-- pseudo code
main loop:
if key == K_whatever:
import pdb
pdb.set_trace() # <- brakes here and gives pdb console
HTH
Ulrich
Am 22.02.2009 um 23:28
I'm noticing a weird little artifact namely that I get left over fragments
of a surface i redraw on to screen where the mouse cursor moves. It appears
as if my code is interacting with whatever controls cursor redraw. I notice
that this only happens when i go to fullscreen mode and enable hardw
using the OS cursor, or blit-ing your own? (ie: hide cursor, and draw
cursor sprite )
On Sun, Mar 1, 2009 at 5:19 PM, Lin Parkh wrote:
I'm noticing a weird little artifact namely that I get left over fragments
of a surface i redraw on to screen where the mouse cursor moves. It appe
An efficient A* in python would be great! So here's a vote :-)
- Original Message -
From: "Forrest Voight"
To:
Sent: Thursday, March 26, 2009 11:48 PM
Subject: [pygame] A* module using surfaces for walkability data
A while ago I made a really efficient A* pathfinding module in C tha
Though python 2.7 was bad right? So maybe hold off on this?
-Original Message-
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On
Behalf Of Sean Wolfe
Sent: Sunday, May 01, 2011 5:27 PM
To: pygame-users@seul.org
Subject: Re: [pygame] Pygame Subset for Android 0.9.3 R
I have two surfaces. The source surface that I am blitting has a "surface
alpha" set to give me semi transparency. The destination surface has a
transparent colorkey. What I would like to have happen is that source
surface makes semi transparent any pixels on the destination surface that
are not
: [pygame] Mixing Colorkey and Surface alpha
On Wed, Feb 29, 2012 at 12:23 PM, Lin Parkh wrote:
I have two surfaces. The source surface that I am blitting has a "surface
alpha" set to give me semi transparency. The destination surface has a
transparent colorkey. What I would like to h
Please publish your final list. Thanks for compiling.
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On
Behalf Of Al Sweigart
Sent: Saturday, February 16, 2013 2:35 PM
To: pygame-users@seul.org
Subject: [pygame] Professional games made with Pygame?
Hi everyone, I'm c
Hi,
I've read the documentation but am still hazy. If have defined a surface
with specific flags (in particular pygame.HWSURFACE) should a subsurface of
that surface inherit the flags (i.e. is also a hardware accelerated
surface(i.e. in video card memory) or do I need to do an explicit 'convert'
If your sprites don't have many colours, dropping the colour depth will give
you a speedup (less memory bandwidth used). Also RLE encoding can speed up
drawing for some sprites.
All the best,
On Wed, Sep 18, 2013 at 9:11 PM, Lin Parkh wrote:
Hi,
I've read the documentati
-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On
Behalf Of Lin Parkh
Sent: Thursday, September 19, 2013 9:03 AM
To: pygame-users@seul.org
Subject: RE: [pygame] Pygame subsurface inherit surface flags?
Thank you. I suspect you are right about HWSURFACE. For example I used to be
able
ose spare processing cycles to decompress or compress data,
therefore allowing you to "transfer" more data over memory.
cu.
On Thu, Sep 19, 2013 at 6:06 PM, Lin Parkh wrote:
OK I didnt recognize the acronym RLE encoding but decompressed I do ;-)
I see how that would save memory
Hi,
I have a game running fine on pygame 1.9.1 with python 2.5.4 . I am
attempting to modernize python to 2.7.5. To that end I have installed python
2.7.5 and pygame-1.9.2a0.win32-py2.7Installation worked and the program
runs. However, now I get occasional odd graphical glitches (background f
, Lin Parkh wrote:
Hi,
I have a game running fine on pygame 1.9.1 with python 2.5.4 . I am
attempting to modernize python to 2.7.5. To that end I have installed python
2.7.5 and pygame-1.9.2a0.win32-py2.7Installation worked and the program
runs. However, now I get occasional odd graphical
25 matches
Mail list logo