Programming & Blender

Hi everybody,

I’d like to try and program a (probably simple) game, maybe something like Mario-Kart. What I’m wondering about is the following:

  • how much of the program do I need to program? I know Python, C/C++ and Java and would like to program as much of the game’s logic as possible.
  • what languages can I use, and how can I attach my code to the map / characters / models?

Thanks!
Michael

You can only use Python in the GE.

You have to know that Blender GE offers to work with Logic Brick besides Python. Those bricks can be linked to create basic logic without typing a single line of code. Within Blender, you’re stuck with what is given to you (python extend possibilities) but you can modify Blender itself and create your own Logic Brick in C/C++.

Couldn’t you create a DLL in C++ and call functions from it within python?

Yeah you can do that too, add functions to current Python API.

how much of the program do I need to program?

Everything. That’s why it is called program. If you mean how much you have to program, that depends on what is already there and if it is available to you.
For the game logic it is as dJordhan said, you can use Logic Bricks and on top of that Python.

what languages can I use, and how can I attach my code to the map / characters / models?

Python.
You will find the logic in the logic buttons. To work with that, please read the manuals you can find in the forum. Also example file will help.

I hope it helps

The example I made in this thread is a good place to start.

It’s simple, relatively interesting, and shows the fundamentals of both logic bricks and python.

Good Luck.

Thanks, interesting script!