Twin Stick Shooter

This is a project to bring the twin stick shooter to something that is a game template instead of controller template only.

First gameplay.

https://github.com/DevMagicLord/Godot3/blob/master/Armory/wip/twinStickShooter.gif

Not implemented :

  • particles mesh with billboard (not working or not possible, i hope GPU particles will get in)
  • no navmesh (many issues, some already reported on github)
  • some logic node bugs needing work around

The most impacting problem is the lack of real prefabs.

Let’s say you have some enemy object with child object named “weapon”, if you duplicate the enemy object it’s child object will be named “weapon.001” or any name you give it that can’t be “weapon”.
So in Logic nodes or code you can’t reference the object “weapon” by name , because each enemy will have a different name for it’s child object weapon.

It seems impossible to make any game with that limitation.

Would that “Prefab” problem be potentially solved with Traits. So instead of looking for a child object named weapon, you would look for a child object that has the Weapon trait. That trait would also include the interface that you would need to interact with the weapon, like maybe the fire() function that is used to fire the weapon. It should be very simple to add a getChildWithTrait() function to the iron.Object ( if it doesn’t already exist ) to do that. Does that make sense?

Perhaps it’s something to try, but it’s making more work, while is should be simple without needing to add new traits as work around.

When there is child empty objects for projectiles initial position and direction, you need to reference the child object by it’s name, with same name for all duplicate parent objects.

Armory need real prefabs, i don’t know if it will come, but without prefabs and inherited prefabs, it will be really bad about usability compared to many other 3D engines.

I’ve never used Prefabs before, could you give me a detailed description? I’m very serious about using Armory so I’m trying to understand what I need to start adding to Armory core and to logic nodes. Is it simply the ability for objects to have a “fake” name that other objects can reference it by. What is the exact structure or explanation of a Prefab?

Armory is not mature enough.
Depending on your project scope, perhaps Armory is enough for you.
I don’t have a serious small game project, but i would use Godot instead (lot more faster at rendering , lot more usable , resources explorer, better object properties , better organized overall editor, lot lot better usability).

I would prefer Armory to have separate window, colors and it’s own tabs and organization in Blender.
Well … it’s preferences each of us have :sweat_smile:

I’ll keep working on this game demo as Armory get new bug fixes, or new important features gets in.
For example navmesh fix and perhaps some prefabs system.

That is why I want to help. Nothing beats Haxe for me and I like Armory a lot so I want to try to get it to the point that it is ready feature by feature. :smiley:

1 Like

Haxe is cool, i prefer logic nodes.
Some things must be made by Lubos when it’s important 3D engine features.

Object naming problem is a Blender way of naming objects, so perhaps there won’t be a solution until he makes a real prefab system.

In Blender hierarchy you’ll have “prefab”, “prefab01”, but as prefabs Blender should not be able to display their content, so prefabs could have same child names objects.

This one might actually be fixed with the new container system of 2.8, not sure about that. If not that just may be a limitation of Blender. I doubt it was ever intended to work that way, since creating games with it was problably not in the original scope. With the everything nodes and other stuff that Jaque Lucke is working on we may see something in answer to this. He is the creator of animation nodes.

I do know there is something already there in the code for armory to work with this because if you spawn multiple of the same item I am almost positive that in Armory they all have the same name. Which is why when you want to do something with a spawned object you need to keep connecting that object node and not put another one in with the same name. I hope that makes sence.

If it is really simply a “multiple objects need to have the same name” issue, could that be solved by having a “Armory Name” property for objects that would be the name that the objects are given when they are exported by Armory? Then, regardless of the name in Blender, it would have the proper name in Armory? If Armory doesn’t have any problem with objects having the same name, then that could work fine as long as you make the user experience decent enough and make it clear what is going on.

There is something for animation nodes that somebody is working on? Is there some way I can find this stuff, or am I misunderstanding?

1 Like

Animation nodes is a add on for Blender. It’s not part of armory. The guy who created it is now working for the Blender foundation on the everything nodes project and god know what else.


1 Like

You can’t have two objects with same name on root hierarchy.

For example in Godot the object “CreatureZ” is duplicated , and automatically renamed to “CreatureZ2” and “CreatureZ3”.
You don’t care because you identify objects by their tags or layer to know what group they belong and what specific type they are.
For example “CreatureZ2” would have tag “CreatureZ”, this is it’s type, it’s layer would be “Friendly creatures” to know what group it is and how they should behave with player or other creatures.

In Godot the scene hierarchy can’t see the prefab details.

When you click to open a prefab details you can see it is the same prefab for all three “CreatureZ” duplicated.

They have the same “RaycastR” and “RaycastL” child objects with same names.
They share the same code referencing the same “RaycastR” and “RaycastL” child objects.

I hope it helps to understand prefabs :smiley:

Without spawning , only duplicate in the editor and object, it’s child objects will be renamed, because Blender hierarchy does not accept twice same name whatever it is object parent or child objects.

This is why there should be a prefab type, Blender could not see the detail in scene hierarchy.

Ah, I see. You can do something a lot like that in Blender with group instances. Or by spawning different scenes, which, with my modding setup, could be loaded from different Blends. ( Though you can’t see the scenes in Blender if you do spawned scenes. You would have to create empties to represent their spawn point and you wouldn’t be able to see your enemies, for example, until you ran the game. ) Maybe you could do the same thing with Armory Proxies.

Edit: Yeah Lubos just closed, armory3d/armory#993 in favor of proxies. They look perfect.

2 Likes

Does proxy works outside of spawn ?
I mean select and duplicate inside the editor ?

I have parent object with many child object, when all parent and child hierarchy is selected.
I click on “make proxy”, but it gives me an error “select linked object”.

I don’t know, I haven’t done any testing yet.

Prefab is very important feature.
It should been covered in Armory docs in detail with a written example, also be in the example projects.

There is an example here that is referenced in the docs.

2 Likes

I tried to make a proxy from the simple cube scene example, no way, i have always the same message error.
I think there should be a proxy tutorial, example does not show how to do it.

I tried “L” to link two objects and their data, but i can’t get Armory “make proxy” to work.

To use a proxy , there is “Link” in Blender menu, but it imports only one object , it can’t import both parent and child objects.

I created a new Github issue
https://github.com/armory3d/armory/issues/994

This is the ai logic nodes, it pursue the player when player is in pursue distance, it
attacks when it is close, and idle when player is far, it has damage management also.

Overview

Click to zoom in

2 Likes