How much do I loose for using C++ ?

In the manual it has been said -

My question to C++ users, how much do I loose feature wise for using Panda with C++ instead of python.

.

There are plenty of religious debates one way or the other about the appropriateness of either language on its own merits. I won’t attempt to enter that debate, though I will say that I respectfully disagree with atari314’s perhaps naive assessment.

But to answer the question, there are only a few high-level objects that are coded entirely in Python; and these are generally those objects whose interface is particularly Pythonic and not suited to the C++ language. Also, the required functionality is still provided by lower-level C++ objects that you have access to.

For instance, the Actor interface is Python, but you can use the lower-level Character interface in C++. The DirectGui interface is Python, but you can use the lower-level PGui interface in C++. The FSM class is only Python and doesn’t have a C++ equivalent, but it’s only a small class that relies on Python’s duck typing and wouldn’t really work in C++ anyway.

David

Personally I have a better performance using C++ instead of Python, you only loose some packages (all replaceables by your own code or third party’s ones), you loose some documentation too but translating from Python stuff is not too hard …

In the other hand, I don’t like python syntax … I don’t know why but I just hate it, specially OOP syntax. Anyway I think coding in C++ have more programmers-cache than programming in Python, If you say: “I have written a cool game with Python” they will think: “oh yeah? cool for you”, but If you say: “I have written a cool game using C++” they will say: “Oh, It’s fantastic! Can I see your code?” … XD ok this last one is poor of sense but I had to say it.

I hope that help you with my personal focus. And sorry for my bad English :smiley: Good coding.

Yes … the professional game industry only accepts C++ than any other language … that is the main reason I started with C++ and not with Python. C++ is the de-facto standard language for coding games in the professional industry. I wish C++ was as easy as BASIC. :slight_smile:

The player will give a sh… won’t care what language was used to make a game.
Use what you like. Some people even like Java…

The only thing that one can loose using C++ is time.

… true … indeed … but unfortunately … I have not heard of any largely computational intensive game like a multiplayer RTS to be built with something like Python or Java. Even if the engine core is RAW C++ power, the game logic and loops in a very massive game environment can slow the game down … and then of course … players will do give a “sh**”.

Python, Java, C# or whatever … they just do not come no where near to C/C++ if execution speed is considered. I have seen several instances on the internet where they even showed benchamark test results trying to prove that java / C# executes faster than C/C++ because their code gets optimized by the JIT compiler in real time for the machine they are running on. But that is only one side of the story. Because later at the bottom of the discussion topic they will admit that a properly written C/C++ code will beat every other language flat and square.

Oh yes … learning to write good C/C++ code is painstaking and the learning curve is steeper - even worse - coding / debugging / testing time is also much larger than other languages. But keep in in mind one thing - we are not building a desktop application here
… we are writing serious games - and in today’s industry … the coders want to leverage every computational power on the host machine’s hardware - and in that respect C/C++ wins hands down.

You can’t compare C++ with Python because they are for different purposes, i.e. Python has been created for multiplatform coding as Java and C#, C++ isn’t at all.

If you want to develop a game in Python there’s no problem, but in game professional industry you will get more “respect” if you program it on C++, and I repeat IN PROF. GAME INDUSTRY.

It doesn’t mean that Python are less than C++ … :smiley: It’s my point.

@EdmundosTown : Fair enough … :slight_smile:

I think it’s common practice that a game has a C/C++ core and a scripting language to drive the gameplay.

Just to name some games using Python:
-Mount&Blade
-Civilization IV (?)
-Metin2
-Battlefield Heroes
-EVE Online
-Pirates of the Caribbean :smiley:
There may be more that I don’t know of (this is just from the top of my head).

Many more games use Lua (but don’t ask me to name any), and even more invent their own ‘C-like’ scripts (like nwscript used in NWN, KotOR and The Witcher).

I know that (some) programmers want their applications to run as-fast-as-possible but for games it really should be as-fast-as-it-is-needed and that’s exactly 60FPS. C++ core + Python scripting can run that fast, so I for one won’t bother with C++.

…Oh, and I have to take back what I wrote about the players that don’t care - if a game is ever to be moded by player communities then it will make a difference if they can rewrite scripts in notepad or have to compile the exe anew.

But wait! Don’t shoot! I’m not saying that C++ is bad, I’m just saying that Python is good enough.

Totally agree, and I think that need to check my Python isntalling because I get a big difference between both, with C++ I get 400-500 FPS but with Python I get 10 FPS :confused: I’ll check why :smiley: