Okay, over the years I’ve heard of arguments in support of both logic bricks and Python, some here say that using the logic bricks more can be a good thing because it makes the game run faster (which in the case of benchmarks is true). However, I would hazard to guess that one reason why Python is still by and large the most flexible option is due to some of the limitations within the brick system that make them less practical than they could be.
If I and others were to use logic bricks more, they should have options and functionality that would make them far more flexible than what they are now, there’s a number of things missing or could be added that could increase their usefulness by several-fold and allow one to make more use of the native-C++ code that they run, including, but not limited to…
-
-Logic bricks as a datablock type, this is a big one, and the fact they aren’t put them at a bit of a disadvantage compared to Python when changing game logic. If you have dozens of scenes already with common objects then you know it’s a bit of work to copy the new logic brick setup to all of them. (and as far as I know, there’s no addon out there that spiders through the entire game looking for objects of a certain type and changing their logic).
-
-Ray sensor: Any reason why we can’t fire any in a global axis yet, RayCast() is currently more convenient because you don’t have to rely on a vertex-parented empty.
-
-Motion sensor: The ability to type in properties for the speed instead of just numbers, there are many cases where fixed numbers just won’t cut it. The use can be increased by allowing the typing of equations.
-
-Property actuator: Allow the use of object attributes and also allow properties to have a value equal to another object’s attribute, so if I want to assign propSpeed to the executing object’s Z-speed I can, same with perhaps assigning three properties to myObject.worldPosition[0,1 and 2]
-
-A lot of input fields throughout the whole brick system: Functionality where it will accept attribute data endemic to the sensor or another object rather than a fixed number or object. Say I want to use the parent actuator to parent the object to Ray.hitObject or I want to rotate an object based on objectB.worldOrientation.
-
-Allow property sensors and the bricks in general to work with global variables stored in bge.logic, currently, the only way to access them is Python and greatly reduces the usefulness of bricks in terms of maintaining game-wide data.
-
-POSSIBLY: Add functionality to allow the use of lists and dictionaries within the logic bricks (which would include new property types like ‘list’ and ‘dictionary’ to go along with that).
That’s all I can think of for now, it will be interesting to hear some of your replies (I’m looking at you Monster since you often promote brick use). The purpose really is not necessarily allow one to not need Python in all cases, but allow the logic brick system to become far more powerful and thus creating a lot more cases where one can easily use them to do the heavy lifting in order to speed up a game. Now I am aware that some of this may already be covered through the actuator attributes editable through Python, but this would reduce the number of little scripts needed for small logic setups and also make it a lot easier for beginners to make some truly complex game mechanics.