[DEAD] Blender Plugin - BGE Logic nodes - Alpha

Thanks.
I don’t know what’s the oldest version that can run it. The add-on relies on the nodeitems_utils module, if that has not changed since its release, the oldest blender version it should run on would be the first one that shipped with it.

Updated to version 0.1.4
New nodes:
Note, Move To, Rotate To, Move To with navigation mesh, Follow path, Parameter Distance, Condition Distance, Set Game Object Visibility

Updated to version 0.1.5
In the previous version I changed the “Value Changed” condition in such a clumsy way that it was completely broken. Also added two nodes, Or List and And List, to or/and a set of condition outputs (or boolean values).

Updated to 0.1.6
Time Barrier, Time Filter, some minor tweaks.

Thanks for making this addon it’s one of the best addons ever. It’s working really well. Keep it up

No news? Project stopped or developer very busy?

Hello there. Both the project and the developer are still alive and well. I’m working on the game that this plugin was supposed to be for. Because I’m just making assets right now (models, textures, sounds) the add-on itself has been left untouched. Being truly terrible at 3D modeling, this “stage” is taking more time than expected but once I have a couple of scenes in place I’ll start playing with the logic again and probably adding more stuff to it.
Of course any input is welcome: bugs, use cases, improvements, if anyone is trying the add-on feel free to report any issue you have with it.

Nice!
I will try to remake some mini games made by me (written in Python), but now using the Logic Nodes in order to try to help in bug tracking. However, if you need help with your assets I can help, especially in modelling and sound editing (in fact, I have a lot of free time Haha). Private message if interested.
And thanks for the update.

Hay pgi would you mind if i made a tutorial teaching people how to use your addon. i know it’s a weird question just wanted to make sure you would be ok with it?

Go on, no problem with that at all.

wow its like christmas today ha ha , look forward to checking it out, Cheers PGI no more spagetti mess :smiley:

Thanks to the tutorial video posted by john hamilton I’ve noticed two bugs - possibly related.
In the video you see the user forced to press a button every time he modifies the logic tree. That is not supposed to happen: the add on should detect the change and refresh the generated code by itself.
I think the problem arises because, when the current file is not saved, the add on tries to write its stuff in the working directory, the user doesn’t have write permissions (which is nice, safe and sound), the runtime throws the error seen in the first part of the tutorial and, for some reason, that error stops the underlying “scan the tree for changes” flow of control.
If that’s the case, then using a blender file that has been saved at least once before to use the add on should prevent the issue (that means no need to “manually refresh” by pressing some obscure button after a value or a link has changed).
I will find a way to reproduce the problem locally, then fix it by forbidding the add on to write* stuff where it is not supposed to do it.

*A clarification: currently the add-on doesn’t write stuff all over your filesystem, it tries to write in the working directory when the file is not saved and, if it fails, it raises its hands and gives up for the rest of the session.

looks great, I love the scenegraph and scene blocks… amazing work :smiley:

Updated to 0.1.9

I’ve fixed the issue experienced in the tutorial video (tree required manual update because of a runtime error of the script that blocked the update loop).
Because the add on has to write stuff alongside the blender file, it still needs a blender file that has been saved somewhere at least once.
So the user must open a previously saved file or save the newly created file. There’s no need to save the file every time the tree changes.
The alternative would be to start writing stuff in a predefined user folder for files that have not been saved yet but I don’t want to do it, I don’t like programs that do that.

What changed from 0.1.6 to 0.1.9: nothing game-breaking
+add Translate action to Cinematic nodes. The action applies a space translation to the global/local position of an object at a given speed. If you want a platform that rises by 2 units along the Z axis at 0.54 units per second, you can use that node.
+added a “parent of game object” parameter to the scenegraph category. It’s for stuff like UI buttons: you have a button that is a child of a panel, when the user presses the button you want the panel to hide. With the Game Object’s Parent node you get the panel from the button.
+renamed “Remove Parent” to “Detach Child From Parent” (Scenegraph nodes). The former was misleading.
+fix for the bug shown in the tutorial, as mentioned
+renamed “Apply Value to Game Object” to “Apply Motion/Rotation/Force/Torque to Game Object” and the node has been moved to the Cinematic category
+renamed the “The Powa!” button to “Force Code Update”. This is a button I use when I spot a missing update, it is there for development purpose only. Doesn’t break anything, it just does something that the add-on is supposed to do by itself, under the hood
+renamed “Refresh Custom Nodes” to “Refresh Imported Nodes”. This button is used when the user manually updates the source code of nodes that have been manually imported. While largely undocumented (therefore useless), the add on supports the creation of user defined nodes that can be shared by a programmer with a designer/artist.
+add a Bitmap Font node. This is mostly due to the severe dislike for the bge bitmap font system. Encode the font data inside the image data? That’s a nice way to prevent people from actually being able to produce bitmap font images. It works but it’s not a good replacement for what should be a core function of the engine itself. The node requires a mesh made of quads and basically translates the UV of each quad to match a letter in a grid like this:

Unfortunately it currently requires the mesh to be built by hand, by creating a quad, then create a UV layer of any kind, then copying that quad for each letter the “text field” will host. It’s clunky but it’s the best thing I could come up with for my game. I would probably transform it later on in a user node and remove it from the predefined ones.

As always, feel free to report any bug you find, if you’re using it, it greatly helps.

Good job but it will need work. Things I hope you will add are setting local to movement not for the entire node but for individual things like movement and rotation so one can be local and the other can be global in one node. Also, I would want to be able to set the pulse mode frequency instead of just on or off, True and False pulse mode, and there needs to be pulse mode on nodes like mouse pressed.

Thank you pqftgs.
Nicholas_A, thank you for your suggestions. Unless I misunderstood your request, you can manipulate local/global transformations through the Set Game Object Member action and Get Game Object Member parameter. You can also define time frequencies combining a timer and (for example) a mouse pressed condition. There is no way to use frame count as a threshold, by choice - using a framerate dependent threshold can cause a game to act weirdly.
There is also a severe lack of documentation on at least the most common combination of nodes one can use to replicate useful tasks. I’d like to say that a proper documentation is coming… but that would be a lie.

Do you think we could have an x ray feature on the raycast notes would be really helpful :smiley:

You mean x-ray like get all objects intersected by the pick ray, up to the given distance?

hi do you think add axis selection on dynamic object controller ?

because i don’t understand the way to change a existing node

Do you mean being able to say, for example, “strafe left means move along the X axis in the positive direction”, “move forward means advance along the Y axis in the positive direction”, things like that for each control?
I could definitely do that, the problem I see is that the Dynamic Object Controller is a behemoth as it is, adding up to eight more connectors would make it almost bigger than the usable area in the node editor itself.
The node itself was meant to be a kind of a predefined setup for starters, what it actually does can be also done by combining “smaller” nodes that also grants more control and customization.
You can do a “move in a direction when a input action among a set is activated” by combining one or more Key Pressed (or mouse pressed or any condition) in a Or List, then use that Or List output as the condition for a “Set Game Object Member”, use “localLinearVelocity” as the name of the member and a tuple like 0 1 0 as a Vector value: that will result in the object (that has a dynamic physics type) to move along the Y axis in the positive direction when the user pressed one of the given keys.
Of course instead of a single gigantic node you end up having a lof of smaller ones but you also have more control over what happens and when.
One idea that the issue you report (which is an actual issue, it’s just that I don’t have a good solution for it, yet) gives me, is to have not only predefined nodes but also predefined trees.
So, instead of creating a “Dynamic Object Controller” node, one could choose to create e a “FPS Controller Tree” and have all the small nodes connected and ready to be modified.
I have no idea how to do that, but it would be cool. I’ll add that to the tentative-tasks list.

As a side note, there’s a small hiccup in the development right now due to a lack of inspiration and time but the project is still alive and well.