Which is faster?

Question: Are using logic bricks faster/slower and more/less resource intensive than using Python scripts? (which is better. . . .python or logicbricks?)

Basically, if I were designing a complex logic system. . . .would it be better to use Python or logic bricks?

I could be wrong, but I believe that using Python is faster than using logicbricks, but I think you’ll need to use some logicbricks in conjunction with the python script if you want to make a complex logic system.

Well, of course you would use both python and logic bricks. . . . I was meaning using ALL logicbricks or not.

I think that this question doesn’t make sense.

The way Blender is designed you should use both. You should use logic bricks to trigger python scripts, and python scripting to do something more interesting than just a mere demo.

Anyway, when you’re undecided about what method is faster, just try to implement both and look at the fps counter.

In python you can also get the time required for a script:

import time

old_time = time.time()
...
do stuff here
...
elapsed_seconds = time.time() - old_time

For a complex setup, definately python! Do you really want to try manage and update a web of hundreds of logic bricks? With python the programming is much more manageable.

As for performance, a good python setup will run just as fast if not faster than logic bricks. Just make sure to only call scripts when they are needed, and make sure your code is optimised.

Ok thanks. . . . .just wondering

BTW. . . . it’s not really a “demo”. . . . it’s more of a visualization of one object. I was planning on using python or logic bricks to control the visibility of certain parts of that one object. It will be running on a slower computer so that is why I asked which was faster.

can’t you try it?

it depends a lot on the complexitiy of both the logicbricks and the python

also, doing things like “import * from GameLogic” will make your script run significantly slower