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


[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