Game Engine supports C++ scripts?

Hay Everyone.
i know the game engine supports scripting (and who doesn’t know about it)
but dose it work with different scripting program formants like C++?:confused:

i have C++ Express edition, so i know most of the codes from there,:cool: but i don’t know if python script uses different codes.

So dose blender support C++ format,
and if not are the codes the same as C++?

Thanks alot.:slight_smile:

Python is diferent from C but to learn python once you have learned C++ i think that isn t is that hard.
blender read filters on c++ because of the openl GL, but to program the game with the C i think that isnt is possible, i dont know sorry if im saying something wrong

I’m pretty sure you can’t use C++ scripts in the game engine. Python isn’t hard to learn, though. It’s used very often as a beginner programmer’s language. If you know C++, you can probably be proficient with Python in a month, but I’m not 100% sure.

You can’t directly use C++ as Python is the only supported scripting language (a compiled script would suck though).

You can however extend python with C/C++.

I don’t know of any way to use a C++ script in the GE. Even if there was a way to do it (which I doubt), it wouldn’t be worth doing.

I suggest learning Python because its super easy. Trust me, I’ve learned Python very easily. I’ve tried learning C++, and I thought it took too much effort to learn so I gave up.

You could probably learn how to use Python for the GE in a couple weeks. Its the first programming language I learned, and it didn’t take me very long. Since you already know how to program, it will be really quick :slight_smile:

There’s not really a way to use C++ in the BGE, but if you know the language you can actually download the source code and develop new features as a patch for this part of Blender because of it being in C++.

Just for info, you can use C++.

But not for scripting. You can program the GameEngine directly by building your own version of Blender. Regarding your previous statements, I’m pretty sure you don’t want to do that.

I agree with everyone else, learn Python. It is not that difficult.

An example of a C module used in python is cPickle. Its best to use C/C++ in python when you have identified your script draining the frame rate. The link I posted above explains the process of creating a .pyd file, which is C/C++ code importable from within python.

As andrew-101 mentioned:

It is possible to run C/C++ code via Python (but not via the BGE directly). Ways to interact with C/C++ code via Python:

  • Building modules using the Python C API
  • Building modules using Boost.Python
  • Building a DLL and Python’s ctypes module.

While C scripts can give you a speed boost to logic, only port your scripts to C/C++ if you’re having speed issues! C Python modules have to be built for each platform, which makes it a lot harder to support multiple platforms. Also, you introduce the need to recompile the module every time you make a change, which will slow down development time.

So, I’d still say to learn Python.


i also had similar problems like that of u
What i managed to study was the print command

Blender python scripting needs more documentation…

It took me six months to get a good grasp of c++, less than a week for python, enough said