Games without Logic bricks

After a while since working with the engine I was thinking I could continue as long as I knew how to use 100% python for the coding of the game. The only problem is is that i’m not sure there is a way to use only python without any logic blocks. Anyway I can use the game engine using only python for game logic without logic blocks.

Looking at the reference, no. The python scripts just act as a controller, controlling the input signals from the sensors and the output signals to the actuators. You can change some properties of actuators and sensors, so you might need a few less. I don’t know why this would bother you, it makes threading much easier. Maybe someone told you this isn’t “real” programming, but it’s no different than using a premade class.

So basically you can’t really do it directly then, so say would it be possible however to have just 1 always sensor in a controller object to control all the actions and events of all objects and all game logic in a single python script activated by the next block and stop the bricks there?

Or is it not possible to control other objects from another object in the game engine?

so say would it be possible however to have just 1 always sensor in a controller object to control all the actions and events of all objects and all game logic in a single python script activated by the next block and stop the bricks there?

I could be wrong, but I don’t think you can change the type of sensor or the type of actuator in python, so you would need a least one of each type that was needed in the game. However, it might tend to slow down the game having that few because you would have to have python, which is a scripting language, doing all the switching of inputs. It’s part of what I mentioned about threads. You want a camera tracking a player at the same time a player is tracking an enemy. You could do frame or pulse loops, but it would be the scripting language doing that looping instead of the c++ in the game engine. Normally, you want the scripting language to make real time decisions , such as A.I., and you want c++ to do base level calculations.

The reason they built this engine into Blender is that it would be nearly impossible for one person to write a game at that low of a level. You might could write a 2d tetris game or something, but that’s about it.

I need something more specific then an answer going into a bit of background history. Then again I can see you’re trying to get your answers from refrences as you said. Perhaps someone who’s experienced with the engine can take a whack at this. :wink:

The short answer is yes, you could have a single always sensor connected to a single Python controller, and control your whole game from that. However, you would be pretty limited, since Blender does not give access to physics, collision detection, or mesh information in the game engine with Python.

If you’re so keen on coding your game’s behavior completely from scratch, why don’t you grab an open source game engine and code it in directly, instead of trying to make Blender do something it really wasn’t designed for.

Perhaps someone who’s experienced with the engine can take a whack at this.

Got to agree with you there, I’ve only been playing around with it for about 3 weeks. I’ve already gotten to a place where I can model and texture and I’ve written a few python scripts. I’m happy! I think you can program Ogre almost completely in python. Good Luck!

The short answer is yes, you could have a single always sensor connected to a single Python controller, and control your whole game from that. However, you would be pretty limited, since Blender does not give access to physics, collision detection, or mesh information in the game engine with Python.

If you’re so keen on coding your game’s behavior completely from scratch, why don’t you grab an open source game engine and code it in directly, instead of trying to make Blender do something it really wasn’t designed for.[/quote]
About open source, isn’t blender’s game engine open source like program?

Now about the collision and stuff with python, are you meaning python controlling other objects or python overall. Meaning you can’t do say…collisions in python nomatter how you do it or whether it’s in a controller object or the object itself?