BGE dev tutorial

Hi all,

I’m not sure if this is the right place for this, I just thought more BGE developers might pass through here. Mods please move it if it’s not.

I’ve just started getting into Blender development lately and I’ve been learning about adding new actuators to the BGE. I’ve put together a tutorial on adding a blank actuator to the BGE for a number of reasons. Firstly, I find writing things down a good way to go over and consolidate my learning. By doing a tutorial I can do this and share it with others as there’s not much out there on BGE development. Secondly, I can show more experienced devs what I’m doing and how I understand things.

Which brings me to my question/request: would any experienced BGE developers mind having a look and providing some feedback along these lines:

  • Have I got the process of creating a new actuator right?
  • I’ve not understood all the concepts behind it, but what little I have explained, have I got it right?
  • Is there anything missing?
    Also, for the steps where I’ve not been able to explain what’s going on and why that step exists I’d really appreciate it if someone could explain them so I can fill in the gaps. There are some functions that I do not understand yet.

Finally, for those starting out in BGE development that are playing along at home, let me know how you get on and what I can do to improve this tutorial (it’s my first attempt at a tutorial).

Heres the link:

All feedback is greatly appreciated. Thanks :smiley:

They idea is good.
As I’m no developer I can’t tell if your tutorial fits the actuators concept. I think you need to mention how long your actuator should run (auto-deactivation, wait for deactivation signal, deactivation run after deactivation)

As a next step you could go on to read parameters from the GUI.

May I suggest a “SetText” actuator. Applicable for Text objects only. The user could choose a property via GUI. The text could update the (string converted) value of the property as long as the actuator is active.

That’s a great idea! It seems straight-forward to implement and useful. I’ve been wondering what to make the actuator do. I was going to do a mouselook actuator, but I think your idea’s better.

At present the actuator has no de-activation or activation period as it doesn’t have any code telling it to do anything yet. You can hook it up and it’ll run fine in the game engine, but any positive/negative pulse sent to it will just fall on deaf ears.

I do plan to cover, adding GUI properties and having the actuator do something. Depending on how complex/long the next parts are I may break them up across a couple of tutorials. Then the final chapter will be adding a Python interface.

If people find these useful I’ll continue to document everything I learn and do within Blender’s development - particularly the BGE as that area interests me the most.

You don’t need the actuator mentioned above; the Text property does that already (object[‘Text’])

I really want to see more tutorials like this,blender wants devs but no documentation at all.
Keep making them I plan to get into source code.

I’ve seen both threads, they’re really helpful. But I’m not requesting any tutorials. I’m after feedback on my work - kinda like getting a teacher to mark an assignment - so I didn’t think it was the right place. I’ve got no plans to make a video tutorial on this, but if someone wants to use it as a basis for one they’re welcome to.

@BlendingBGE: Thanks for you support! :smiley: I’m currently working on the next tutorial (hopefully I’ll have it sorted by early next week). I’ve also written about the difficulties I had building Blender in Windows and how I overcame them. Hopefully it might help someone else struggling to get the source built.

I’ve now completed part 2 of creating a new actuator. I’m still keen to get some feedback from developers on what I’m doing to help correct any errors, add extra detail and explain the things that I could not - there are a few gaps in my explanations. Of course, all feedback is welcome. I’d also like to hear about the experiences of anyone who has been following along.

The actuator being created still isn’t totally useful, by the end there’s a simple debug actuator that prints out various details of the attached object. It also looks at some of the things you can set - like motion, force and rotation. With the basics in place you can do a lot to the game object quite easily.

Anyway, here’s the link:

Part 3 will be looking at how to add properties to the logic brick as well as creating a more useful logic brick. I’m planning on doing a mouselook actuator, but if anyone’s got any suggestions about a simple actuator they would like to add let me know and I’ll cover that instead (Monster’s idea was good, but as already pointed out, the property actuator can fulfil that role).

Thanks all :smiley: