Skip Navigation
Paragrimm Paragrimm :godot: @mastodon.gamedev.place

Bartle-Test result? Explorer. Game Engine? Godot (C#).

\- Main project: Hexen/Heretic + Arx Fatalis \- A Void Shaper: https://store.steampowered.com/app/2637050/A\_Void\_Shaper/

Posts 0
Comments 6
Break it up! Improving Your Godot Code Using Components
  • @mrsgreenpotato (2/2) and in our case, we've put every piece of data into resources where we export the values we need. If we need a node in a scene, we just export it and it's mostly a direct childNode of the scene. All in all we have a system where the example zombie consists of the following components: Ai, Model, Stats, Info, Sfx, Chemistry. These have their own scenes that get added to the entityNode. In the end there's no need for such a helper function basically :D (at least yet)

  • Break it up! Improving Your Godot Code Using Components
  • @mrsgreenpotato ahh ok, could you extend from a base node type and add this function respectively?

    We've defined "entities" in our project and each Entity-Type has a script for some basic functionality (to define that it IS an entity etc.).

    In our project a CharacterBody3D entity is an "Actor", while a RigidBody3D is an "Item" for example. And we're basically only working with these and define components for them that we can retrieve via a Dictionary<StringName, Resource>

  • Break it up! Improving Your Godot Code Using Components
  • @mrsgreenpotato what case do you have in mind where an export is not flexible enough? Also, do you return a Variant or generic Node(2D/3D) of a function like that or are you working with Generics then? So you do: GetNode<Bumpable>() for example?

  • Break it up! Improving Your Godot Code Using Components
  • @mrsgreenpotato @TheLongPrice Isn't the string reference just in the GetNodeOrNull call? I prefer to just export the nodes I need, so I don't build up Node-structure dependencies in the code. Therefore I don't have "Magic strings" in my code (almost) at all.

  • fennecs - the tiny C# ECS that loves you back! 🫶
  • @jupiter Oh I didn'nt knew that :D is there more info on the Dungeon Siege approach?

    I'm working on a first person 3D dungeon crawler inspired by Arx Fatalis etc and interactions are really important. I've configured several items for testing purposes, so I can take a Torch that has a ModelComponent for the 3D Model and physics properties and a ChemistryComponent that's configured so it's burnable. I can take that Item and carry it to a fire in order to heat it up and it starts burning :)

  • fennecs - the tiny C# ECS that loves you back! 🫶
  • @Charzard4261 @jupiter I've implemented an "ECS-like" sort of for the game I'm working on and so far it has huge advantages. I've (mostly) distinct components that I can attach to my entities and I can modify these at runtime.

    Therefore I can easily add/modify/remove stats for an entity, change its model or define that it's burnable in their respective components. I'm currently able to define new Items and somewhat "configure" this items based on the current components without writing code!