Put logic in Node or isolate them in RefCounted/Object?

Godot Version

4.x

Question

I’m wondering if game logic should be in Node, or RefCounted/Object then put a reference to the Node.

Here’s my case: when player pick up items lying on the ground, items will be moved to player’s inventory. Since items in the inventory are just a bunch of properties, it seems a little wasteful to have the whole Node or Node3D stored in an array.

Here’s what I do currently: I define various Items which extend RefCounted and put properties like quantity, health, etc., onto them. Meanwhile, I have various classes extend Node3D, as peers to them as long as the item can be dropped into 3D world. The 3D class always holds a reference to the Item object. So when player picks up an item, I simply delete the node from the tree and put the item into player’s inventory array. And when player drop the item, I create new instance of the 3D class, add item reference onto it then add it into 3D world, before I remove the Item from player’s inventory array.

The solution is ok except I have many peers of Item classes and Node 3D classes. For example there’s an ItemBottle class maintains how much water in it and a fill() func to add/remove water, while an Bottle class has a cylindar mesh and collision body. Another minor annoying thing is that I have a JSON file contains all properties for the objects in game (think of it as a database). So some properties are for the Item while others are for the Node. A bit confusing, but yeah, not big deal.

Here’s my question: Is this peering actually worthy? Maybe all I need to do is just defining various Item classes directly from Node then associate it in scene. When player picks up them, delete it from the parent and store it in player’s inventory array and vice versa?

I’m a non-game developer so when jumping into game world, old patterns like MVC always haunts me a lot.

Thanks in advance!