Re: [pygame] Pygame 2.0

2012-02-13 Thread Lenard Lindstrom

On 13/02/12 06:57 PM, James Paige wrote:

On Mon, Feb 13, 2012 at 05:57:46PM -0800, Keith Nemitz wrote:

I'm happy with the 1.9.2 designation. Though, we all owe a lot of respect to 
those who added cool new features to pygame.

It'd be nice to sync up pygame with sdl 2.0.  But that's just the romantic in 
me.

If the next major release of pygame is ready and SDL 2.0 is not out yet,
we should be calling it pygame 1.10.0

(but hopefully SDL 2.0 WILL be out by then)

---
James Paige
I like that, reserving Pygame 2.0 for SDL 2.0. Otherwise, I'm unsure 
what constitutes a major Pygame release. Sections of Pygame 1.9.2 
underwent significant rewriting, for instance.


Lenard Lindstrom



Re: [pygame] Pygame 2.0

2012-02-13 Thread James Paige
On Mon, Feb 13, 2012 at 05:57:46PM -0800, Keith Nemitz wrote:
> 
> I'm happy with the 1.9.2 designation. Though, we all owe a lot of respect to 
> those who added cool new features to pygame. 
> 
> It'd be nice to sync up pygame with sdl 2.0.  But that's just the romantic in 
> me.

If the next major release of pygame is ready and SDL 2.0 is not out yet, 
we should be calling it pygame 1.10.0

(but hopefully SDL 2.0 WILL be out by then)

---
James Paige


Re: [pygame] Pygame 2.0

2012-02-13 Thread Keith Nemitz

I'm happy with the 1.9.2 designation. Though, we all owe a lot of respect to 
those who added cool new features to pygame. 

It'd be nice to sync up pygame with sdl 2.0.  But that's just the romantic in 
me.




--- On Mon, 2/13/12, Lenard Lindstrom  wrote:

> From: Lenard Lindstrom 
> Subject: Re: [pygame] Pygame 2.0
> To: pygame-users@seul.org
> Date: Monday, February 13, 2012, 5:28 PM
> On 12/02/12 05:21 PM, Zack Baker
> wrote:
> > I've only been on the mailing list for a few months now
> so forgive me but is pygame 2.0 anywhere on the horizon? I
> would be very willing to do tests on I with Mac sox lion
> because my dream would be Mac with pygame on python 3.0
> sigh
> > 
> > 
> > Zack
> Hi Everyone,
> 
> I don't know what this Pygame 2.0 is supposed to be. The
> upcoming Pygame 1.9.2 could be released as Pygame 2.0 if
> that would make users happy. There is a pgreloaded (Pygame2)
> 
> , that was spun off from Pygame by Marcus von Appen. But it
> is an independently maintained project that is incompatible
> with Pygame. For Pygame 1.9.2 pre-alpha, there is a new text
> rendering module, improved Unicode support, good integration
> with Python 3.2, generic array support (used with NumPy),
> and a reworked PixelArray that slicing operations consistent
> with other array types.
> 
> As for SDL 2.0 support, that will wait until SDL 2.0 is
> ready.
> 
> Lenard Lindstrom
> 
> 


Re: [pygame] Pygame 2.0

2012-02-13 Thread Lenard Lindstrom

On 12/02/12 05:21 PM, Zack Baker wrote:

I've only been on the mailing list for a few months now so forgive me but is 
pygame 2.0 anywhere on the horizon? I would be very willing to do tests on I 
with Mac sox lion because my dream would be Mac with pygame on python 3.0 
sigh


Zack

Hi Everyone,

I don't know what this Pygame 2.0 is supposed to be. The upcoming Pygame 
1.9.2 could be released as Pygame 2.0 if that would make users happy. 
There is a pgreloaded (Pygame2)  , 
that was spun off from Pygame by Marcus von Appen. But it is an 
independently maintained project that is incompatible with Pygame. For 
Pygame 1.9.2 pre-alpha, there is a new text rendering module, improved 
Unicode support, good integration with Python 3.2, generic array support 
(used with NumPy), and a reworked PixelArray that slicing operations 
consistent with other array types.


As for SDL 2.0 support, that will wait until SDL 2.0 is ready.

Lenard Lindstrom



Re: [pygame] Re: Pygame, pyglet, 2d, 3d, and performance (reflexions/discussion)

2012-02-13 Thread Zack Baker
My quote about pygame 2.0 was just general I actually have no ideas what the 
features will be but I guide your issue will be fixed

-Zack

On Feb 13, 2012, at 12:08 PM, René Dudfield  wrote:

> Hello,
> 
> Just a note, that SDL on some ARM platforms uses a video backend based on 
> opengles.  So it does the blits in hardware somewhat.
> 
> SDL 2.0 has hardware accelerated blits (direct3d, opengl etc).  SDL 2 finally 
> looks like it will get released, and is in fact now able to be installed 
> alongside SDL 1.2.  This is a major step which means that way more people can 
> contribute to it, and actually package it for operating systems (which then 
> increases development efforts).  The todo list is also getting smaller, so 
> I'm hopeful.  BUT, it is not released still after many years.
> 
> If you want to actually release a small _game_, then pygame will probably 
> work ok for you.  If you want to spend your time making or researching 
> amazing graphics engines, then it's best to go the route of something else 
> (probably C++/opengl/direct3d).
> 
> Pygame on android is faster than a javascript web game for older android 
> versions.  I've heard android 4.0 might speed up js canvas speed, but don't 
> know of anyone with a 4.x device yet (apparently 1% of so of people).  But 
> you will to optimize, it won't be super easy to get acceptable speed.  
> However, note that Webkit has exponentially more development going into it at 
> the moment - so it looks to improve a lot in the next 1-2 years.
> 
> I hope that gives you some realistic expectations, or helps in some way.  My 
> personal & biased take is don't worry about performance, relax and make a 
> pygame(or what ever will get your game finished).  Perhaps if it is 
> successful, then you can redo it in a more performant way (if needed).
> 
> 
> cu.


Re: [pygame] Re: Pygame, pyglet, 2d, 3d, and performance (reflexions/discussion)

2012-02-13 Thread René Dudfield
Hello,

Just a note, that SDL on some ARM platforms uses a video backend based on
opengles.  So it does the blits in hardware somewhat.

SDL 2.0 has hardware accelerated blits (direct3d, opengl etc).  SDL 2
finally looks like it will get released, and is in fact now able to be
installed alongside SDL 1.2.  This is a major step which means that way
more people can contribute to it, and actually package it for operating
systems (which then increases development efforts).  The todo list is also
getting smaller, so I'm hopeful.  BUT, it is not released still after many
years.

If you want to actually release a small _game_, then pygame will probably
work ok for you.  If you want to spend your time making or researching
amazing graphics engines, then it's best to go the route of something else
(probably C++/opengl/direct3d).

Pygame on android is faster than a javascript web game for older android
versions.  I've heard android 4.0 might speed up js canvas speed, but don't
know of anyone with a 4.x device yet (apparently 1% of so of people).  But
you will to optimize, it won't be super easy to get acceptable speed.
However, note that Webkit has exponentially more development going into it
at the moment - so it looks to improve a lot in the next 1-2 years.

I hope that gives you some realistic expectations, or helps in some way.
My personal & biased take is don't worry about performance, relax and make
a pygame(or what ever will get your game finished).  Perhaps if it is
successful, then you can redo it in a more performant way (if needed).


cu.


Re: [pygame] Re: Pygame, pyglet, 2d, 3d, and performance (reflexions/discussion)

2012-02-13 Thread Santiago Romero
> I have to say, performance seems to be a really high priority for you,
compared
> with most people on this list. If you're always going to want great
performance
> from the weakest devices available, python and Pygame are clearly at a
disadvantage.

 No, no, performance is not a priority, it's just that I would like it not
be a drawback for pygame, or a reason for not to choose it.

 The fact is that I prefer python to C, a lot (although I still write C
code with the z88dk compiler for the Sinclair Spectrum), and would like to
continue using python.

> Incidentally, I'd love to see the SDL game you ported to HTML5 if you
feel like sharing!

It's a simple remake of a Sinclair ZX Spectrum game called Maziacs that I
wrote ¿10? years ago to learn SDL. And I was porting it to HTML5/JS with
gamejs just to learn it.

I stopped porting it after a couple of days when I tested it on Android and
iPad and run a 0.1 fps :-( . After asking in gamejs's mailing list, I
was told that nowadays, mobile (and tablet) browsers do not support 2D
accelerated canvas :-(

I have a simple test online, IIRC:

http://www.sromero.org/ext/code/maziacsjs/

And this is the (old) webpage of the SDL version:

http://www.sromero.org/wiki/spectrum/proyectos/pcmaziacs

 Thanks for answering!

-- 
Santiago Romero
Ubuntu GNU/Linux
http://www.sromero.org


Re: [pygame] Re: Pygame, pyglet, 2d, 3d, and performance (reflexions/discussion)

2012-02-13 Thread Christopher Night
On Mon, Feb 13, 2012 at 6:04 AM, Santiago Romero wrote:

>
> > Some do have used OpenGL with Pygame for ever, with PyOpenGL etc. I
> think ..
>
> Can pygame (event system, "game loop", etc) can be used among with
> PyOpenGl, using the last one just for "the blitting"?
>
> I mean: can an already working pygame game be modified only in the
> "blitting" part to render the sprites with OpenGL (modifying only the
> blit()?


Yeah that's pretty much how it works. It's the same as you would do for an
SDL/OpenGL game, if I understand correctly.

But I don't think anyone's gotten PyOpenGL working on Android, so if you
need to deploy to mobile devices, that would seem to be a dealbreaker.

I have to say, performance seems to be a really high priority for you,
compared with most people on this list. If you're always going to want
great performance from the weakest devices available, python and Pygame are
clearly at a disadvantage.

Incidentally, I'd love to see the SDL game you ported to HTML5 if you feel
like sharing!

-Christopher


Re: [pygame] Pygame, pyglet, 2d, 3d, and performance (reflexions/discussion)

2012-02-13 Thread Christopher Arndt
Hi Santiago,,

without going into to your remarks in detail, I want to give these
general observations on the matter: there are two main issues here a)
programming style and graphics access and b) graphics technologies and
accelaration.

Even Pygame if allows one to do "pixel pushing", I prefer to write
programs in an object oriented fashion with Pygame as well and
encapsulate drawing in scenes, actor and widget objects. If you do that
right, it will as fast as other approaches. When I looked at pyglet, I
was at first impressed by it's API because it already provides many of
these abstractions for you, at least if you're concerned mainly with
animated image sprites. But when it comes to simple drawing primitives
like boxes, lines, simple shapes and so on, you'll have to dig into
OpenGL, and I find OpenGL one of the most confusing APIs I have ever
encountered. And when you ask for help on writing traditional OpenGL
with pyglet; you'll usually get an answer like "nobody uses this
anymore, learn to use shaders!". Also, many of the nice auxiliary
libraries Pygame provides are missing in pyglet and there seems to be no
current development.

The problem with shaders and libraries (like Kivy) that rely on OpenGL
ES 2.0 is that there are still millions of devices that do not support
ES properly, like for example Atom netbooks with integrated Intel
graphic chips. My three year old EeePC will run a Pygame-based game
happily at good framerates but does not support many OpenGL-based games
and applications.

On the other hand, I am currently checking out the Pygame subset for
Android on my Odys Loox tablet (1.2 Ghz single core)  and while it runs
without problems, my moderately complex test programs, which run with
>100 fps on the EeePC, run at around 15-17 fps on the tablet. While I
think there's room for improvement, after all pgs4 is still new, using
OpenGL seems to be the way to go on Android. I still have to try out
Kivy for Android and see how it performs...


Chris



[pygame] Re: Pygame, pyglet, 2d, 3d, and performance (reflexions/discussion)

2012-02-13 Thread Santiago Romero
I'm answering to all in a single message:


I was asking to all you because I'm trying to select the technology to work
on for the next years (for coding 2D stuff), and I don't want to select one
that forces me to stick to powerful computers (discarding tablets/phones)
or low-res modes (640x480 / 800x600) that does not look nice in nowadays
native-hires monitors (and that show pixels-like-fists in fullscreen mode).


[Zack Baker]
> Pygame 2.0

What is supposed to give us Pygame 2.0? maybe the option to use opengl as a
backend for the blitting (rendering)?


[Ian Mallet]
> But, in fact, CPUs are fast enough to run 2D graphics.

Yes, I know that CPU-power nowadays is OK. I wrote lots of 2D stuff in my
old 486DX 33Mhz that ran at 30 or even 60 fps... and today the simplest
computer has > 1 Ghz of CPU and 2D-accelerated cards... Yes, I agree that
CPU power *on computers* is OK.

But I don't want to be asking for a 3Ghz-quad-core computing so that the
player can run a simple game in his TV in FullHD, not to mention that
tablets and mobile phones have 3D acceleration but poor 2D performance and
<= 1 Ghz ARM processors...


[Toni Alatalo]
> So with old style, do you mean pushing pixels to an display surface?

Not really, but it's nice to have the chance to do it. I don't mean also
that I write functions to draw primitives (nowadays, a few years ago I
prefer to do it instead of using libraries like SDL_gfx). I really meant
that I like to deal "manually" with things.

> Some do have used OpenGL with Pygame for ever, with PyOpenGL etc. I think
..

Can pygame (event system, "game loop", etc) can be used among with
PyOpenGl, using the last one just for "the blitting"?

I mean: can an already working pygame game be modified only in the
"blitting" part to render the sprites with OpenGL (modifying only the
blit()?

> Some people are enthusiastic about WebGL as it allows them to make *2d*
games powerfully with the browser techs.

 I've tested HTML5 / javascript and got very disappointed with the results.
I ported an old sdl game I wrote and it worked perfectly in desktop
browsers but performance was ridiculous in iPad and Android dual-1Ghz
tablets, because canvas is not 2D-accelerated... I hope WebGL works
diferently ...


[Carlos Zuniga]
> Another nice library you can use is PySFML, programming in it is
> somewhat similar to pygame (compared to pyglet which I have tried just
> a little, no idea about cocos) but with opengl behind it.
>
> www.sfml-dev.org

 I'll take a look, thanks.


-- 
Santiago Romero
Ubuntu GNU/Linux
http://www.sromero.org


Re: [pygame] Substantial Lag

2012-02-13 Thread Vovk Donets
Try clock.tick(fps)

2012/2/13 Ryan Strunk 

> *From:* owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] *On
> Behalf Of *Santiago Romero
> *Sent:* Monday, February 13, 2012 2:16 AM
>
> *To:* pygame-users@seul.org
> *Subject:* Re: [pygame] Substantial Lag
>
> ** **
>
> > > In order to save CPU power, do I need to put in a
> pygame.time.delay(10) at the end of my event loop?
>
> > No.
> > clock() does already that, forcing your program to run at N fps by
> "idle-ing" it enough time to run it at the desired speed. 
>
> I really apologize for all these posts, but I’m trying to get a handle on
> this, and I’m not finding what I need on Google.
>
> What sort of syntax do I need to use to get the clock to handle all of
> this for me? I tried using pygame.clock.tick with no parameters, and my CPU
> useage jumped 30%. I tried just instantiating the clock and got the same
> result. The only thing that kept the CPU useage minimal was to throw in a
> pygame.time.wait(10) at the end of each iteration of the event loop.
>
> If clock can force my program to run at a desired speed, how do I program
> it to do so? Do I use clock.tick at a certain framerate, for instance?
>
> Thanks, really, for all the help.
>
> Best,
>
> Ryan
>



-- 
*Vovk Donets*
 python developer


RE: [pygame] Substantial Lag

2012-02-13 Thread Ryan Strunk
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On
Behalf Of Santiago Romero
Sent: Monday, February 13, 2012 2:16 AM
To: pygame-users@seul.org
Subject: Re: [pygame] Substantial Lag

 

> > In order to save CPU power, do I need to put in a pygame.time.delay(10)
at the end of my event loop?

> No.
> clock() does already that, forcing your program to run at N fps by
"idle-ing" it enough time to run it at the desired speed. 

I really apologize for all these posts, but I'm trying to get a handle on
this, and I'm not finding what I need on Google.

What sort of syntax do I need to use to get the clock to handle all of this
for me? I tried using pygame.clock.tick with no parameters, and my CPU
useage jumped 30%. I tried just instantiating the clock and got the same
result. The only thing that kept the CPU useage minimal was to throw in a
pygame.time.wait(10) at the end of each iteration of the event loop.

If clock can force my program to run at a desired speed, how do I program it
to do so? Do I use clock.tick at a certain framerate, for instance?

Thanks, really, for all the help.

Best,

Ryan



Re: [pygame] Substantial Lag

2012-02-13 Thread Vovk Donets
No need for this!

2012/2/13 Ryan Strunk 

> *From:* owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] *On
> Behalf Of *Vovk Donets
> *Sent:* Monday, February 13, 2012 1:48 AM
>
> *To:* pygame-users@seul.org
> *Subject:* Re: [pygame] Substantial Lag
>
> ** **
>
> > I would use builtin pygame clock, coz' no need for manual control of
> the frame rate. 
>
> I looked at the documentation, and it said that tick was used to manually
> slow down the game. I don’t need to do that, so I can leave that out.
> Thanks for setting me straight on that.
>
> In order to save CPU power, do I need to put in a pygame.time.delay(10) at
> the end of my event loop?
>



-- 
*Vovk Donets*
 python developer


Re: [pygame] Substantial Lag

2012-02-13 Thread Santiago Romero
>
> In order to save CPU power, do I need to put in a pygame.time.delay(10) at
> the end of my event loop?
>

 No.

 clock() does already that, forcing your program to run at N fps by
"idle-ing" it enough time to run it at the desired speed.



-- 
Santiago Romero
Ubuntu GNU/Linux
http://www.sromero.org


RE: [pygame] Substantial Lag

2012-02-13 Thread Ryan Strunk
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On
Behalf Of Vovk Donets
Sent: Monday, February 13, 2012 1:48 AM
To: pygame-users@seul.org
Subject: Re: [pygame] Substantial Lag

 

> I would use builtin pygame clock, coz' no need for manual control of the
frame rate. 

I looked at the documentation, and it said that tick was used to manually
slow down the game. I don't need to do that, so I can leave that out. Thanks
for setting me straight on that.

In order to save CPU power, do I need to put in a pygame.time.delay(10) at
the end of my event loop?