peter-kish / gloot

A universal inventory system for the Godot game engine.
MIT License
625 stars 28 forks source link

[Request] Support non-rectangular shapes #203

Open pakoito opened 6 months ago

pakoito commented 6 months ago

For a puzzle-like inventory in my game I'd like to have support for shapes that are not rectangles (or squares), such as

OO
O
OO

or

O
OO
OOO
OO
O
peter-kish commented 5 months ago

Hi! This has been requested in the past, but unfortunately I don't see it happening any time soon. It would require a redesign of some major parts of the code, which is not really doable before a major release (v3.0.0). And even then, I'm afraid it wouldn't be in line with the concept of the plugin, which is to quickly make generic inventory systems (while this feature is quite exotic).

P.S. I'll keep this request open in case it somehow does turn out to be easily implementable somewhere after v3.

TheYellowArchitect commented 1 month ago

As a workaround, I suggest making an item which cannot be picked up or moved etc, and placing it at positions to form non-rectangular shapes.

As for v3+ version, given there is support for various item height/widths, the game mechanic of restricting space becomes deeper by allowing non-rectangular inventories, so its a good addition - basically allows for all kinds of puzzle games. A quick idea I got even from non-puzzle games, is that in a combat-focused dungeon crawler, some enemy (e.g. goblin) rips your bag, and so, you get some holes/gaps in your inventory. A simple mechanic which forces you to optimize your inventory, yet the game isnt a puzzle game.