[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Lousy FPS



Brian Fisher wrote:
On 9/12/06, Kris Schnee <kschnee@xxxxxxxxxx> wrote:
So I tested the isometric version. 6 FPS, even with the logo and
interface turned off. Not good. How can my pasting tiles on a 2D surface
be slower than calling an OpenGL list of lists of 3D cube-drawing
instructions?

How can OpenGL textured poly rendering be faster than software? well...

[Long, erudite explanation omitted.]

... so lots of reasons... honestly, I'm really just suprised you are
only getting 12 fps for what's drawn on the opengl screenshot,
especially if you are using display lists and already have all your
textures loaded... (mobo with integrated gfx in the chipset?)

Laptop with an ATI Radeon 320M IGP, which runs Unreal Tournament 2004 pretty well. Much better than it runs my awesome graphics demo!


> So what's the details on the SW guy?

OK. I've put together a stand-alone demo of Pearl, the isometric Pygame-only engine. It's about 58KB with the included graphics.
http://kschnee.xepher.net/code/Pearl060913.zip
For what it's worth, you can use the code if you want.


I'm drawing tiles every frame to the screen, which is inefficient. (And Psyco doesn't seem to help.) I've got a few lines of code meant to skip drawing a tile if it's obviously going to be offscreen, but that's probably not very useful. When I was using my purely 2D tile engine, I drew everything to a big offscreen buffer and then blitted a piece of that to the screen each frame rather than recalculating the tiles, but I don't think I can safely do that in isometric mode because sprites might go "behind" a tall tile; the landscape can't be drawn all at once. And it's likely I'm doing something massively stupid with the settings for the surface itself.

(PS. Aesthetically, I like the isometric i.e. no perspective transform
look a lot better... you can tell openGL to do that, if you want)

Aesthetically, I like the look of the isometric tiles more than anything I've done with OpenGL tiles. Maybe it's just my lack of skill with OpenGL, eg. the lack of fancy lighting, but the GL stuff looks washed-out and fake while the pure Pygame stuff is more vibrant, like a cartoon. Drawing these diagonal tiles is awkward, though, and I can't rotate the landscape except (if I work at it) in 90-degree increments.


What I'd really like to have is an isometric-or-3D tiled engine resembling the Nippon Ichi tactical RPGs, such as "Disgaea: Hour of Darkness." Screenshots and descriptions of these great games are at:
http://hg101.classicgaming.gamespy.com/nipponichi/nipponichi.htm
I know "GalaxyMage" is out there for Python, but it seems to have a license such that if I use its engine at all, I have to release all of my source code for everything else, which I'd rather not do.


Uh, in looking for info about OpenGL's isometric capabilities, I immediately saw this:
http://nehe.gamedev.net/data/downloads/download.asp?letter=I
This site, I already knew, has many OpenGL tutorials, including some that've been translated to Python. On that link is a set of code for doing an isometric landscape, which seems to defeat the purpose of everything I've done on this part of the project... except that it's presumably in C only, so that I can't use it.


Advice?

Kris