Blender Game Logic Nodes (UPBGE-Compatible)

That’s pgi’s work, it’s actually the base for the current addon itself :slight_smile: he’s still in the credits

There’s the Get Object Data and Set Object Data Nodes, simply get the worldPosition of the first object and set the worldPosition of the second object with the On Update Node as a condition:

Fill in your objects, of course :+1:

I’m now devoting more time to the addon again as I need it to work properly until April 1st, meaning that I’ll try to get things more comfortable to use the coming weeks, including the docs (FINALLY), I’m also through with half of your suggested templates :slight_smile: some should be ready tonight

2 Likes

dude you are really cool into this ! :grin:

I didn’t know it could be so simple :smile:

Take your time, because most examples will re use the templates.
For example the “melee attack” example would re use the tps template to start from.

I wonder if someone could provide a generic character with animations to be used for templates ?
Similar to Unreal character ?
( Meanwhile i can make a Minecraft like character generic with no textures )

1 Like

I do have characters and other stuff lying around from my time at university, I’ll probably use one of them, then they’re good for something in the end :slight_smile: I guess I’ll make them free to use then :man_shrugging:

Animations will be a separate template to show how to use multiple layers of anims and blending them, it works quite fine, I tested it with the Rayman 3 - Character :smiley:

2 Likes

I updated the examples list, it’s more complete, covering most essential game aspects.

As i wrote, each item is a separate example, so a new beginner can start step by step or example by example instead of beeing overwhelmed by a big example.

I will work on the marble game example and i’ll update the thread marking examples as complete when they are finished, i iwll provide Blender files links for people to upload to Upbge Github.

Also i hope you’ll make the Tps or Fps controls minimal, instead of lot of variables to tweak camera or movement parameters ?
For the examples let’s make it very simple to learn first, and keep advanced tps or fps controllers for the ready to use templates instead.

1 Like

Alright, here’s the first swishy of templates:

Apologies for taking so extraordinarily long for this, I always get caught up in detail - the first little vehicle-demo suddenly developed into a fully functional car with a working dashboard and fuel consumption :+1: (Also, the FPS one transformed into a scenic coffee shop the first time around :dancer:)

But now I stripped everything unnecessary and focused on the essentials - they may not be fully done yet, but should showcase a little of what the system can do
I’ll add descriptions for each one, describing what happens exactly in the text editor of every file :slight_smile:

3 Likes

I was thinking about that for the arcade car, something very simple.
Later perhaps extended exmaples showing to position wheels using raycast.

https://twitter.com/Nitroneers/status/1238779466832363520

could you maybe add a node that could make explosions easier?

You guys rock ! :sunglasses:

1 Like

@Iza_Zed
I started the arcade car race example.
The car is supposed to follow ball position the player controls and rotate towards ball velocity using rotate to vector node.

But the rotate to vector logic does not seem to work well.
Could you take a look please ?
https://ufile.io/ogha82fq

Also it would be nice to have “Align to vector” logic nodes with parameters like speed and acceleration ( if both to 0 it’s a direct align to vector).
It’s usefull for lot of things , like slow turret, or slow character to rotate towards a direction.

There is an Align Axis To Vector Node which has a factor socket (basically simply smoothing rotation)

I’l take a look today :+1:

there is a new component - vehicle - in recent builds,

maybe we can setup a simple node wrapper for it?

I’ll take a look at it, currently preparing scripts for the tutorials

There already are vehicle create, vehicle engine force and vehicle brake nodes under Physics -> vehicle (in recent master, not release) could this be what you mean? Or is there something even newer in there? :thinking:

That’s WIP though :man_shrugging:

ah, if it’s already wrapped disregard - :smiley:
we just got a component version of the wrapper today / yesterday

but if you are wrapping the constraint in nodes you already have it.

@Iza_Zed
The Vector 3 and Vector 2 compare logic node is missing, and would be usefull for many things.

I modified your tps template adding animated character that follows your capsule object player.

When i hide the capsule player on Blender hierarchy tree view, when playing the game, the player controls does not work, it is desactivated ?
Could you check it ?

https://ufile.io/bzzkivu1

gonna take a closer look at this, animations can be played a lot more more dynamic with Nodes, I would have made a specific template just for that

About the hiding of objects, yeah that deactivates them, you have to uncheck “Show In Render” and maybe “Show In Viewport”, that hides object but loads them as soon as the game starts

Vector compare will be in next commit :+1:

1 Like

@Iza_Zed
Will you consider some basic inventory system high level logic node similar to character and vehicles nodes ?
Easy to setup and working in some minutes ?

I thaugh about three special logic nodes :slight_smile:

  • item logic node :
    int id item
    string name item
    texture or 3D model representation item display

  • Inventory logic node
    parameters like number columns and rows 1 to 20 max (perhaps scrolling later).mouse click for item menu : drop, use, destroy
    remove empty space functionnality
    save and load inventory items id list to a file (database like)
    parameters to change colors borders and background of the inventory system.

  • inventory manager logic node, Skyrim inventory and merchants for example
    A node able to iterate through and inventory logic nodes with functions like next and previous items and get node items data
    Able to remove an item object from inventory
    Able to add an item object to inventory

Something very simple first, no drag and drop, but working and easy to setup in some minutes.

Whatdo you think ? It is too much work ?

For the basic Node Addon that would be a bit much, I might even pack some of the already existing nodes in separate node packs that add nodes for specific use-cases (Vehicle nodes or advanced math for example)

For an inventory system I’d go for a separate addon like what I’m doing with the light management system I’m working on. Basically my deal is that when I need some logic for game dev for more than one project, I’ll see if I can pack it as an addon, which would be the case for an inventory system :thinking:

But in the end an inventory has to be HIGHLY customizable, which leads back to me providing just the framework to plug in your own take on the inventory layout and design in the end :man_shrugging:

You could actually quite simply set up an inventory with existing nodes already, you’d just have to do it step by step (might cover that in a video)

1 Like

I might have missed some logice nodes for array, loop iterate, structure , save andloaf to a file database.
An inventory tutorial would be cool.

@Iza_Zed

Is there some UI system that could work well with Upbge 0.3 instead of using second scene trick ?

Also could the third person camera get some improvments adding parameters like smooth accelerations for camera follow and rotation ?

Ho to move object relative to camera local XZ axis independently from the camera rotations ? Is there some logic node to do this ?