Noob: Stick with logic bricks for now, or go to python/upbge?

Free or not, which books explain the Blender game engine? I would like to find something that is comprehensive on logic bricks and which includes at least some basics on scripting the game engine.

Well there is logic - BGE logic. All you have to do as game maker is to understand how this logic works, it needs some efforts and time. I am myself begun to learn BGE not long ago (maybe couple of weeks) and i undertand almost allsensors and actuators. But still i have lot of questions and troubles, anyway basic logic of BGE for me clear. There are some things that couldn’t be created without Python so i will need to learn so basics of Python scripting to achieve these things. And i made some progress on that. So you will need some time too. Be patient and you will get how it works, believe me logic bricks are easy to learn and use, but they have their secrets you have to know. In your example i pressed three dots on always actuator to make it continously send positive signal on controller updated each logic tick. On your constraint actuator I just set up direction axis to let blender know in what direction it must constrant orientation. You are right one should know what option in what logic brick is made for. Here is link for good book with detailed examples you can download and learn if you want:

Thanks everyone for the discussion and resource links. I only have so much time in the day, so I will reply to them when I can. At the moment I’m still trying to unravel how the constraint actuator works. I guess I will start a new thread on that.

personally, i made an fps game totaly with logic brick and is work fine^^, just some python are used for some part but you can see here my game, so it’s possible to make game totaly with logic brick, it’s my second game, i think logic brick made python script so learn python is the same as logic brick, it’s like blueprint UE4.

If someone want that template you can send me an email to: [email protected]
To contact you when the template is ready.

Thank

That is impressive. What kinds of limitations have you ran into while using logic bricks? Someone in this thread or another brought up saving/loading and settings menus. Are you able to do those sorts of things with logic bricks?

saving/loading and settings menus. Are you able to do those sorts of things with logic bricks?

This is not possible without python.

In order to save that data(for the settings or the game itself) you will need python, logic bricks can not save anything.
That is the whole problem.

logic can save predefined variables into a globaldict, but python is needed to fill those variables.
same with loading, bricks can load a globaldict file, but it can not do anything with that data, to read it out and use it’s data you need python.

#edit
But to be honest, and if you are not that demanding you can find both of those already made.
just search in the resource section of the forum, you can find it there.

Ok, thanks. I think it will be a while before I need to concern myself with that sort of stuff. But it is good to know for when I go further.

Python is needed anyway for some things. But it doeasnt mean that you have to learn Python to use scripts in your projects. You can download ready script and insert in your game with some modifications. Python language is easy in comparision to other languages so it’s not hard to get what line of script doing what. I didn’t learned Python yet, but in my little game i have few simple and clear scripts. One more thing about Python scripts they can slow down your game performance, logic bricks are working faster in BGE this is one more advantage using logic bricks. Anyway there is lot of features that can be done only with Python coding. Fortunately there are lot of free to use ready script you can download and use. And you can learn from them. Cheers!

So it seems that it would be well worth learning both. Logic bricks for performance and Python scripting for flexibility.

For now I’m choosing to learn within the confines of logic bricks. I only have so much free time, and taking on too many things at once just makes me feel scattered. Just learning Blender in general is a pretty big undertaking that goes into multiple aspects. Modeling, texturing, rigging, animation, rendering, and the game engine.

It is still too early for me to tell, but I’m thinking that a good learning order might be to learn the general basics of Blender, including logic bricks, then something about the things which Monster posted about above, then Python. That seems like the order which I will be going for now. I have read Monster’s Gameloop posts, but he has lots of other interesting and related stuff to check out (thanks Monster!).

So I guess for now Upbge is a way in the future for me, after I have a good handle on the basics, have time to relearn Python, and have time to start learning to work with the Blender/Upbge api.

Maybe relative here is that the expression controller is something of a tiny language in itself. It is very simple, but it could add alot of flexibility to logic bricks. This just about covers it all:

    Variables:					sensor names, property names

Math Operators:				*  /  +  -

Comparison operators:		<  >  >=  <=  ==  !=

Boolean operators:			AND  OR  NOT

Returns:					True  False

Conditional statement:		if( expression, send positive pulse, send negative pulse )

source:  https://docs.blender.org/manual/en/dev/game_engine/logic/controllers/types/expression.html

Combined with messages and other logic bricks, I think it is more than plenty for a beginner to chew on for a while.

Yeah, i htink you’ve got right way. Finding ballance between logic bricks and Python is way to go to make game with BGE.
I agree with you that learnin blender itself is not easy task, especially if you jumped to blender from max or maya (like me). But once you’ve got blender logic thing go smooth and comfortable, but tbh there a lot of frustrations learning blender in the beggining. Same with BGE. But when you leaarned it’s real fun to mess up with logic bricks or Python scripts. ANd don’t forget to download examples people created to teach newbies like us - learning from working examples - be it logic bricks or Python is strong helping hand to understand how BGE logic is working. :slight_smile:

Don’t worry to much about python slowing things down.
Biggest cause of that is due to people scripting the wrong way, like cal a while/for loop every frame, while they could grab the data at engine start.

Once you know the basics of python, you will use less and less bricks every project you build.
i even made my player -> movevement/weapon handling/hud handling/shoot/reload/realtime ray/info/ everything to function with just a handfull sensors, that’s it. and it won’t slow down at all, it will even be faster then using tons of bricks.

the more heavy sensors you use the slower it gets
always/radar/near/collision sensors are actually quite heavy (if ran in true pulse its getting even heavier).

of course with python the same thing, if you abuse or misplace loops it can be heavy indeed, but if you do it at the start of the engine and use that trough out the game, it won’t slow you down.

Here a video to show you it in action:

(3000 object are spawned + the objects that gets libloaded, there is no LOD in this setup, the island is 550bu x 700bu, after the loading, only the bricks on the player box runs. that’s it)

Hey Cotaks, good stuff to know. Thanks. So is it safe to say that as long as good practices are followed, logic bricks vs. Python makes no appreciable difference in performance?

Yes, indeed.

This game (like many others) is made mostly with logic bricks and minimum coding. Is it complex enough? I talked to it’s designer on his social net page, he told me that he is artist not coder, so logic bricks are easier for him to set up than learning and using Python scripts right way. Problem is not learning Python, but using it. You can learn Python in few weeks but to learn how to use it right way you will spend years. That’s the problem. Logic bricks are designed and optimized special for those people who are more artists than coders in their mentality. And it’s great in my opinion. You can waste years learing program languages and won’t make any game (complex or simple), cause all your time will be wasted on digging Python. For many tasks in your game logic bricks are great.