Shards of Uvutu is a FREE and OPEN-SOURCE indie turn-based RPG for PC, developed by me, in the Godot game engine, with plenty of help from some very talented individuals in the music and SFX department.
It's is a creature-collector RPG about a mysterious cave filled with magic crystals, and the ensuing struggle for power. Explore the landscape, fight through turn-based battles, and spend Shards in order to summon minions and gain an upper hand!

* Retro turn-based combat system!
* "Attune" with your minions to befriend them and summon them any time.
* Customize your stats and your minion's stats to your liking, using equipment and Stat Points!
* Fight for the Radiant Cave and take control of the source of Shards!
* 16-bit inspired pixel art graphics.
* Planned for a 20+ hour experience, including story, sidequests, puzzles, and challenges!
Already a year in the making, with 6 more months planned until a full release. Until then, I am now releasing the v0.1.2 demo with the first ~5 hours of content available! The save file you start in the demo SHOULD be compatible with the finished release, barring any stat rebalancing or quest modifications I may have to make. You can find the demo on my Github page, linked here. It will be releasing as a free game once it is complete!
Every time I release and playtest with friends I find more bugs. This time, the logic I created to handle the NPCs' shops went way out of wack.

If I add an item to an NPC's shop list, next time that NPC loads, I want them to take it from their shop "listings" and instantiate that into their inventory that they can then sell it from. This way, I can avoid resetting the NPC's inventory entirely when I add new items to their shop offerings. As well, items the player's items they've sold to that NPC persist in the NPC's inventory, so resetting the inventory means potentially losing the player's items they could go back to buy again.

However, what actually happened with my system, is that no NPC that was last loaded in v0.1.0 had anything in their inventory on a fresh save or a save in v0.1.0 or after. But if the last loaded game version before this was v0.0.9, the NPCs could all get their items properly.

I'm kind of astounded by this one so I'm going to post the relevant code and see what you all think. Written in GDScript:

Code:
func add_shop_items_to_inventory():
   # ... process removing inventory slots that don't belong anymore ...
   # for each shop item slot in the NPC shop object:
   for shopItemSlot: ShopInventorySlot in npcShop.shopItemSlots:
      var existingSlot: InventorySlot = inventory.get_slot_for_item(shopItemSlot.item)
      # if there is no slot for this object and it should be updated: add it to the inventory
      # should_add(version) takes in the game version the NPC was last saved in, and returns true if the shop item was created after that version for this NPC:
      if existingSlot == null and shopItemSlot.should_add(data.version):
         inventory.add_slot(shopItemSlot)


The solution I came upon was simply to turn that last if conditional into this:

Code:
      if existingSlot == null:
         inventory.add_slot(shopItemSlot)

As I no longer destroy inventory slots for NPCs if there are 0 items in that slot. This way, if the slot exists, it's already been created for the NPC. If it doesn't exist, it's an item I added to the shop listings since the last time the save file was loaded. I don't really like this solution, though, because it requires me to save essentially meaningless data -- potentially a whole bunch of empty item slots. If I simply could track the last saved version of the NPC (which I already do) and use that combined with the version that each shop listing was created in, I could definitely determine which items have been added to the shop listing since the last time this NPC was saved.
I have started work on putting the game on Android! Godot allows easy export once all the Android SDK stuff is set up, so all that's left for me is to add mobile controls, like so:

(By the way, this is a screenshot running on real hardware! Super exciting.)
And tweak the existing UI to be easier to tap on with a small screen. The Stats screen, with all the player's battle stats, moves, and minions, will have to be reworked. It is probably the most confusing and dense UI in the game, so I was always one good reason away from reworking it.
This looks phenomenal, a significant quality improvement from the already good-looking calculator version!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement