i learnd logic bricks for now,is this realy practical? can i build something “big” with it.
what about oop? how dose this implement?
how do i pass variables(props) between objects? like passing object hp to text object(or pass damage value of a bullet to an object so i can reduce its hp).
i remember i tried using python once,didnt even trace hello world from some reason where are the good blender python api tuts?
The game engine is limited to the complexity of your scenes (rasterizer and scenegraph being the biggest drain on framerate from my experience), with careful planning and clever use you can push the bge to get some great results. Some examples are Necrosis and Fear the Dark (another video, showing large open world).
Here are the docs for the api: http://www.blender.org/documentation/blender_python_api_2_61_4/contents.html#game-engine-modules
Unfortunately I don’t know of any tutorials for getting started with python in the bge, but basically the python controller in the logic brick editor is the access point for python. The code Fear the Dark is somewhat based off the code from another game, called Novus Terra, you can browse the source code for that on google code. We used a OOP approach for the game logic, it may be a little difficult to follow but the execution stack starts in game.py, have a look at the update() method and see if you can trace the execution from there to get an idea of how we did it.
You can build something large and complex with logic bricks, but you’ll only make it more difficult for yourself to continue - it’s best to learn Python. I have some tutorials available on my site at Game Up!, and there are other tutorials available, as well. Goran’s got a lot of good video tutorials available, and there are other resources around.
Python handles OOP fine, though I don’t really find it to be that useful in the BGE, since all objects already run their own scripts. Since each object just runs a function, you can easily just make it ‘OOP’ in that you write functions that call on other, ‘parent’ functions, like an initialization script for the player that initializes it as a game object first.
You pass variables by grabbing a reference to the object, and then setting its variable. For example,
from bge import logic # Import the logic module, which is for the BGE
cont = logic.getCurrentController() # Get the Python controller running this script
obj = cont.owner # Get the object running this script
obj['health'] = 10 # Set the health variable of the object running the script (initializing it if the health variable doesn't exist first)
sce = logic.getCurrentScene() # Get the current game scene
other = sce.objects['Other'] # Get another object
other['health'] = obj['health'] # Set its value
And so forth. As a side note, using Module mode in the Python controller (where it executes a Python function name rather than a script) allows you to use external Python files, rather than internal files. Check it out here and here. The 2.6 API can be found here.