Food for Thought - Panda3D's Performance vs the Comp

Just wondering how others would view this…

If someone built a well made action game with Panda3D… I’m talking not a lot of excess code, attractive low polygon models for everything, minimum shader usage, larges texture sizes being 256 to 512 mostly (jpegs)…

Fps wise (frames per second), how should a Panda3D made game perform on a PC with 4 processors (quad) and a decent graphic card?

Lets say the P3D game created has just as much geometry on screen as a game like “Dark Siders.”

Would you expect the Panda3D game to fall closer to 30 fps because of the Panda Engine vs Other commercial engines or would you expect a P3D made game to run closer to 60 fps?

A question like this is pure opinion because some Panda users would take into account rather or not the game was scripted with C++ or Python. Personally I would not, because CPUs are much faster now than back in the days. I even read an article that talk about how Python was becoming more and more popular because PCs are faster now and developers don’t have to worry about a major speed difference resulting from the language used.

Besides, Panda3D executes in C++ from what I can tell, so I would conclude, Python wouldn’t be a major factor in fps loss unless it was over used, but I’ve already stated at the top, we’re imagining a well coded Panda3D game without a lot of unnecessary code.

I’ve seen on the internet that a couple of none MMO commercial games were made with P3D, but I do not know the names of these games or rather or not they are still obtainable. Besides, those games were probably written with some older form of P3D and I’m talking Panda 1.7.0 here.

I guess a topic like this would go unknown until someone from the Panda Community creates a true commercial quality title. I’ve been comparing performance lately…my P3D demo with other commercial games and found the difference in fps “thrown up in the air” so to say.

I ran my P3D game file that had a normal amount of geometry in it similar to that of the typical hardcore, commercial action game and found that the P3D engine out performed several games I tested it against. “Beyond Good and Evil”, “Dark Siders”, “DeadSpace” and “Tomb Raider Ann”, just to name some of them. “Beyond Good and Evil” was made some time ago, so seeing the fps of that game way lower than my P3D running app was no surprise, but Dark Siders and Dead Space really raised some questions.

Was P3D out performing those games because the engine is better written or was it because those games abused the use of shaders? Even when turning the shader input for Dead Space almost to none, the fps did not improve.

The difference with Tom Raider Ann is the fact, Laura Croft is like the only character you’ll be seeing on the screen most of the time. Tomb Raider is an environmental intense game more than anything and the visuals are really high polygon looking (which is probably due to some darn good shaders).

Tomb Raider Ann broke even with my P3D application. Since P3D seems to pull all the multisampling capabilities of your Graphic Card, I turned up the graphical quality of Tomb Raider Ann to get a better performance measurement.

I am currently building a commercial title myself, but it won’t get finished until the end of this year or sometime early next year. So far, I like what I see from P3D in terms of performance. I guess it will depend on what resolution P3D is ran on as well. I’ve noticed that P3D seems to drop fps more on higher resolution vs Tomb Raider Ann…which seemed to run fine even at high resolution.

Of course higher res mean more draw time for graphic cards…

I noticed this… When disabling the P3D controlled multisampling and manually moving the Nvidia quality sider to max quality…my P3D test application ran just as well as the Tomb Raider Ann at high resolution, but not while controlled by P3D itself.

I’m finding the wide screen resolution of 1280 x 768 is a good one and 1024 x 768 for a none wide screen. P3D’s fps is at max with these resolutions, even with 16xAA sampling.

Most other PC game applications I’ve played either seem to not be effected by resolution much or the fps is destroyed by higher resolution.

I wonder will developing something commercial with Panda 1.7.0 be worth it in the end? The worst thing to have happen is finish a game that only runs well with a Quad PC. I know, because I’ve done that before but then again, the engine I used was poor as hell; didn’t even have a global clock sync logic. Lol.

I don’t know why I’m getting that gut feeling… The one that says, “Panda will perform good while you develop and finish your project, but in the end…it’s going to leave you hanging.”

Would be awesome as hell if one day P3D apps were able to run on a console like Playstation 15. Lol, I’m going far in the future there.

Interesting post. While I doubt you will be getting much of a boost from a quadcore vs a dualcore (don’t know anything about your game or if you’ve taken steps to maximize the use of extra cores), you can easily test this by disabling cores for your application. For example, in Windows you should be able to do this by accessing Task Manager and changing the CPU Affinity for the app you desire.

As for existing commercial use of Panda3D, look no further than the Panda3D Wikipedia article :smiley:

[size=100]Edit: rdb pointed out to me that you can also set the default CPU affinity in config.prc.[/size]

i don’t really get your question as you jumped around a lot in your text.

long story short. it is not panda running your game. it is your hardware.

all you need to do is not to break the performance given by the hardware. pstats does a great job helping with that.

ps: panda never let me down.

You should care about the C++/Python issue for the operations that are executed many times a frame. If you’ve some code that is executed few times a frame then the difference between Python and C++ should be impercettible.

Exactly. However, you can verify this with pstats: you can view how many millisecs you’re spending for the graphics and for the code. You’ll obtain numbers, not hypothesis. You’ll see how many millisecs you’re spending for your Python stuff, and decide if it is worth to rewrite some parts in C++ (and typically it’s not necessary). So you don’t waste your time rewriting stuff which already has low impact.

I think they use the updated versions (otherwise I see no reasons to work on Panda).

I believe Panda3D is executing in C or C++ and Python is just acting as a scripting language.

That’s when you know people don’t keep up with the times. Ask anyone about C++ vs Python and they’ll tell you what has been a truth for years back in the days and that is C++ is faster.

I think anyone who knows the basic about programming would know C++ is object oriented and non interpreted vs Python being object oriented and interpreted.

That non interpreted factor with C++ is the reason so many still think C++ will make a super “duper” speed difference over a language like Python or any other interpreted language. Back in the days, that would of been true. As I thought I stated in my opening post, processors are faster now and that’s why more and more applications are being written in a variety of languages now and not just C++. C++ is a time consuming language to write in.

The C language is the Universal Language and at some point in your programming career you would want to get that under your belt, but it truly isn’t a “die hard” must to write programs in the C language anymore (depending on the program). Although I would always recommend writing Graphic Engines in C…always. Other then the “C” language, I would recommend Delphi, which is a very high level language.

Processors speeds makes up for anything lost now and days when it comes to code execution. It really does come down to how well you construct your application. Even if you wrote a program in C++, it won’t matter if you have a lot of unnecessary code executions or you failed to dump resource that are not needed and those resources are just stuffing up the pipeline for no reason. Too many shader instructions will do that as well.

I believe that’s the reason my current project is out performing all the commercial games I’m running it against; my project is being constructed better! One of the things I like to do is keep the collision system simplified. Not only are my collisions cheap detections, but I clean out any collision detections that have no chance of being detected to begin with, thus speeding up the entire collision check loop.

The other thing I like to do is clean out all visible geometry that has no chance of being viewed.

Another thing I like to do is make sure I’m writing just enough Python code to get the effect I need.

Models… You should determine at the beginning of a project the playback requirements you’re aiming for. With that said, you really have to watch the number of polygons in your models. It’s easy to become tempted with super good looking high polygon characters and awesome environmental detailing, but what good is it if a person with an old single core PC can’t play your game?

With all that in mind, keep in mind all the commercial titles I’ve been running my title against are most likely scripted with C or C++. So how come my fps is doing so much better if I’m writing in Python?

That’s why I’m a knowledge hound when it comes to game development. That is, I like to learn all I can from people, would prefer professionals, about design techniques. You can’t depend on one thing when game designing.

You can’t depend on the programming language alone to give you that hit. You can’t depend on the graphic engine alone to give you that hit. You can’t depend on game graphics alone to give you that hit.

Instead, you have to incorporate everything you know into it.


Because you’re only going to get out of something what you put into it.

That’s fact.

I don’t consider P3D the perfect engine because it’s not. I feel my design knowledge, creativity and artistic ability will be the things that get the job done for me. Of course, I still have a lot to learn about the P3D engine. As I continue to use it, I’m sure my design technique will get even better.

I have used Pstats to view the time spend in the Python loop before. Given what I saw, Python isn’t really doing any damage to my fps. If I really get sloppy with design, that will.

PS, someone stated that it’s not Panda running the game, it’s your hardware. Not totally true. Graphic Engines are for play back of your arts, sounds and so on. If those applications are written poorly, you’ll get a bad fps regardless of your hardware. I’ve used poorly written Engines on the same hardware and I can tell you…I couldn’t do a thing with those engines; their 3D support was just poorly written and the games I tried to make were always bad in fps.

On the other hand, I’ve played commercial games who’s engines were written so well, cheap screens like the title screen reported an fps of almost 100,000 fps! Most of the commercial games I run would get up to 10,000 or lower on the title screen. It really does make a difference of how well the graphic engine executes its operations.

without any further explanation. c++ executes a lot faster than an interpreted language. given the same code the difference is big, even on modern hardware. it may not make much of a difference for you as you are using it for scripting purpose running c++ below anyway. but the difference is still there.

of course there are engine that make your hardware crawl. hardware still cant fix terrible code. but good code wont make your hardware magically go faster.

Um… C++ is non interpreted… Of course there’s a speed difference. I believe what I expressed in my writing was… Even with a language like Python, that’s losing what ever speed it’s suppose to be losing, does not mean you’ll have a slow running application because it’s not scripted with C. Application Design is the ultimate determining factor.
Wow… Really people… :laughing:

No, it’s not. If Panda was, internally and entirely, written in Python it would be slow as hell in some areas.

There REALLY is a difference in speed between C/C++ and Python. And a big one, too.

This is why you need both – C/C++ for low level stuff and Python for high level, where you can sacrifice speed for stability and ease of programming and prototyping. That’s also why it’s sometimes a good idea to prototype new stuff in clear Python and then, if it proves too slow, either rewrite it in C++ or in something like Cython.

I have to agree with ThomasEgi about it being mostly hardware. My cpu is a duel core Athlon2 and i can run most games with full graphics, shaders, etc because my gpu is good. Also I have not seen anything made in panda run slow on my machine so I do not think that you will have much concern with it runner on other processors besides a quad core

Sure think you enjoy walls of text… but lets make it clear here, as many said, if you spot a performance issue in a specific zone of your application, rewrite that part in C++, and if your project is big enough to REALY worry about performance, use C++ for everything, obiviously there will be a performance issue with python if you make an mmorpg with 2k player on the same map, but, is your project that big?