Re: [pygame] Linux binaries

2008-11-04 Thread Greg Ewing

yanom @linuxmail.org wrote:


I understand you can use py2exe to make your python program into
a Windows executable, but is there a tool for making them into a
Linux binary? I want my game to run faster.


If you're thinking that py2exe makes Python programs run faster
on Windows, you're assuming wrongly. All it does is bundle up
the bytecode files with a copy of the interpreter into a
convenient package.

There's a tool called freeze that allows you to do something
similar on unix systems, but it won't make anything run faster
either.

The only way to improve speed is to re-code the cpu-intensive
parts using something more efficent, such as C or Pyrex.

--
Greg



Re: [pygame] Linux binaries

2008-11-04 Thread Patrick Mullen
On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote:

 The only way to improve speed is to re-code the cpu-intensive
 parts using something more efficent, such as C or Pyrex.

 --
 Greg



Or, of course, write better python code if possible in those parts.


Re: [pygame] No alpha-blending for Surface.fill?

2008-11-04 Thread Jørgen P. Tjernø

claudio canepa wrote:
On Mon, Nov 3, 2008 at 11:02 AM, Jørgen P. Tjernø [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Is there no alpha-blending for Surface.fill? The blendmodes are
poorly documented, but AFAICT from the source, the blend modes only
do channel-channel operations (dst_r = ra+rb, dst_g = ga+gb, etc) -
nothing to do alpha blending?
pygame 1.8.1release has a bug relating to fill, maybe fixed in svn. Look 
at this thread for details:
 
http://thread.gmane.org/gmane.comp.python.pygame/15808/focus=15869


Yes, but the fill methods use the macros BLEND_RGBA_ADD etc in 
surface.h, and as I read the code on SVN (
http://www.google.com/codesearch?hl=enq=show:DGxKpdtiC9g:ZCP0OBviero:DGxKpdtiC9gsa=Nct=rdcs_p=svn://seul.org/svn/pygame/trunkcs_f=src/surface.h) 
it does not do anything other than per-channel blending.


The bug might break intended behaviour, but I don't think the intended 
behaviour is what I'm looking for. :)


--
Kindest regards, Jørgen P. Tjernø


Re: [pygame] Shaders and Examples not Working

2008-11-04 Thread Charlie Nolan
Looks like you need to make a call to glutInit() at the start of
InitGL.  Won't run here without it.
-FM

On Thu, Oct 23, 2008 at 5:31 PM, Ian Mallett [EMAIL PROTECTED] wrote:
 I've condensed it down and ported it to pygame.
 http://www.geometrian.com/Programs/Tutorials/pygameshaders.zip
 Ian



Re: [pygame] No alpha-blending for Surface.fill?

2008-11-04 Thread Matt Pearson
Im having problems with Geany using pygame.
The same script worked with IDLE..

Its a keycommand thats throwing an error or exception.
its  giving me an Assertion error? to my movement lines
Assertion error: must be a float
idk what this means im using Vector2 for key direction

On Mon, Nov 3, 2008 at 5:34 PM, claudio canepa [EMAIL PROTECTED] wrote:



   On Mon, Nov 3, 2008 at 11:02 AM, Jørgen P. Tjernø [EMAIL 
 PROTECTED]wrote:

 Is there no alpha-blending for Surface.fill? The blendmodes are poorly
 documented, but AFAICT from the source, the blend modes only do
 channel-channel operations (dst_r = ra+rb, dst_g = ga+gb, etc) - nothing to
 do alpha blending?

 If not, are there plans to add new modes to fill? :)

 --
 Kindest regards, Jørgen P. Tjernø

  pygame 1.8.1release has a bug relating to fill, maybe fixed in svn. Look
 at this thread for details:

 http://thread.gmane.org/gmane.comp.python.pygame/15808/focus=15869

 --
 claxo



Re: [pygame] Linux binaries

2008-11-04 Thread yanom @linuxmail.org

 - Original Message -
 From: Greg Ewing [EMAIL PROTECTED]
 To: pygame-users@seul.org
 Subject: Re: [pygame] Linux binaries
 Date: Tue, 04 Nov 2008 21:55:45 +1300
 
 
 yanom @linuxmail.org wrote:
 
  I understand you can use py2exe to make your python program into
  a Windows executable, but is there a tool for making them into a
  Linux binary? I want my game to run faster.
 
 If you're thinking that py2exe makes Python programs run faster
 on Windows, you're assuming wrongly. All it does is bundle up
 the bytecode files with a copy of the interpreter into a
 convenient package.
 
 There's a tool called freeze that allows you to do something
 similar on unix systems, but it won't make anything run faster
 either.
 
 The only way to improve speed is to re-code the cpu-intensive
 parts using something more efficent, such as C or Pyrex.
 
 -- Greg


Speed isn't a problem, because I plan on making my game 2d.

=
Fruit and Apple Presses for Sale
Happy Valley Ranch sells apple and fruit presses, grinders and accessories. 
Apple pickers, apple bags, small Yakima fruit presses and much more.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=5f4704b5238de55c6a463af91671f85d


-- 
Powered by Outblaze


Re: [pygame] Shaders and Examples not Working

2008-11-04 Thread Ian Mallett
Hi, yes,
I noticed that for some reason my computer doesn't require this, but nearly
everyone I've talked to seems to need it.  Is there a reason why glutInit()
is required on some computers and not on others?

Ian


Re: [pygame] Linux binaries

2008-11-04 Thread Greg Ewing

Patrick Mullen wrote:

On Tue, Nov 4, 2008 at 12:55 AM, Greg Ewing [EMAIL PROTECTED] wrote:


The only way to improve speed is to re-code the cpu-intensive
parts using something more efficent, such as C or Pyrex.


Or, of course, write better python code if possible in those parts.


Yes, certainly -- finding a better algorithm is always
the best form of optimization!

--
Greg


Re: [pygame] Shaders and Examples not Working

2008-11-04 Thread Mike C. Fletcher

Ian Mallett wrote:

Hi, yes,

I noticed that for some reason my computer doesn't require this, but 
nearly everyone I've talked to seems to need it.  Is there a reason 
why glutInit() is required on some computers and not on others?


Ian
GLUT has some book-keeping stuff that it needs initialized, and IIRC it 
needs some help with shutting down that we set up in glutInit.  
Basically if you are calling *any* glut function you need to have 
glutInit called to be sure it will work.


HTH,
Mike

--

 Mike C. Fletcher
 Designer, VR Plumber, Coder
 http://www.vrplumber.com
 http://blog.vrplumber.com



Re: [pygame] Linux binaries

2008-11-04 Thread Charlie Nolan
 Yes, certainly -- finding a better algorithm is always
 the best form of optimization!

Yup.  Even a supercomputer is going to choke if you feed it Bogosort.


Re: [pygame] Linux binaries

2008-11-04 Thread bhaaluu
On Mon, Nov 3, 2008 at 5:10 PM, yanom @linuxmail.org
[EMAIL PROTECTED] wrote:
 I understand you can use py2exe to make your python program into a Windows 
 executable, but is there a tool for making them into a Linux binary? I want 
 my game to run faster.


Your game will run faster on GNU/Linux anyway.

The important thing is to make your source code
available, so many eyes can see it. You'll find out
soon enough where the knotholes are! Use the
Source Luke!

Now, if the real reason you want to distribute a
Binary Blob to GNU/Linux users is because you want
to generate some sort of income, your game probably
isn't worth the few cents you want to charge for it.

As if! Why do you even think GNU/linux users would want
a Binary Blob of your little game on their disk?
Think about it!

I don't even know what thought process caused you to
even ask this question?

The best thing about GNU/Linux is the people who USE it!
-- 
b h a a l u u at g m a i l dot c o m
Kid on Bus: What are you gonna do today, Napoleon?
Napoleon Dynamite: Whatever I feel like I wanna do. Gosh!


Re: [pygame] my rpg game (so far)

2008-11-04 Thread Michael Fiano
On Sat, 1 Nov 2008 05:06:08 -0400
Michael Fiano [EMAIL PROTECTED] wrote:

I am stuck. I realized I need to blit the player the the map surface
instead of the screen so that I can position the player at a given map
position. The problem is if i change line 66 of player.py from:

self.screen.blit(self.playerimgs[self.frame], (self.x,self.y))

to:

self.background.blit(self.playerimgs[self.frame], (self.x,self.y))

The map (also on the background surface) does not get repainted
properly. The player leaves trails when he moves. I'm not sure how to
fix this, or why it even occurs. Somebody enlighten me?