• 3 Posts
  • 11 Comments
Joined 2 months ago
cake
Cake day: February 13th, 2025

help-circle
rss


  • Adding boolean variables for each item only scales so far, your inventory class has to know about all the items in the game.

    The next simplist implementation would be to change the inventory to a list of strings, then your level can check if the list contains a given string without the inventory code needing modification.

    If you need to track item counts (e.g. the player has 5 apples), then you can use a dictionary instead of a list. Then you can use the string as a key and store an integer as the value.




  • The project is Open Source (MIT license) and maintained by W4 Games with sponsorship from Meta. Contributions from the community are welcome!

    This is a fantastic approach.

    It would be great if other platform owners brought out official Godot support.

    I know there are legal issues with the Godot project signing up for console developer program or releasing integration code as FOSS,.

    But I don’t see any legal reason why cobsole platforms couldn’t make extensions like this or even export templates available to members of their developer program.