Tuesday, February 28, 2023

Officially Equipping Baby!

It's been a solid few hours (had to work longer than I wanted to which also means a later start that I'd hoped) but well, well, well, who's the cheeky character that can equip items then huh?

The answer is all of them. The code certainly isn't finished, but the bones of all the needed stuff is there. The code checks whether there is an item where you are trying to equip something (and un-equips that if needed) and then equips what you've selected. There's also checks in place to make sure your character CAN actually use it, though I need to flesh those out further. I also wrote the basics of the code that will then update your character with any new stats from whatever it is you equipped, so a better armor score, or new attack profile and such.

I should be able to extend this out to all the other equipment slots easily enough, then just flesh out the details around stat updates and the like. Oh, and I need to update the code when the characters are loaded from the server to actually equip all the items properly now that this functionality exists.
 

Monday, February 27, 2023

Character (Paperdoll) Equipment

Today was certainly a long day. One of those, I woke up mentally not ready for work, but you know, work pays the bills. So I spent the day doing that, then went for a quick walk to try to perk my brain up (moderately successful there) and then got into what I thought would work with my tired brain while my wife went to choir practice. Cutting up assets for the UI paperdoll. I managed to get that done quicker than I thought, had to put my image editing skills to use as I was short a UI asset for arrows/ammo. It's not perfect, but I'll chalk it up as good enough and matching the other assets I've purchased.

So, that left me to implement all the stuff in the right UI snippets and then to try to incorporate my new changes into the various code sections that were running.

Short version: The UI now knows what it is displaying, whether it is looking to equip items from the inventory to the character, or whether it is looking to trade between characters. That might sound unbelievably obvious, and it is to us, but to android code, that's rather a novel idea. So anyhow, I'm happy with that. 

With some luck, tomorrow I can get the code written to equip/unequip the items and show them on the paperdoll interface.





Sunday, February 26, 2023

Vendors (continued)

Been working on more vendor/trade code, building on what I've got working nicely, and starting to build out all the details when items are clicked and interacted with. While all the items are basically the same thing at the moment, the code is starting to nicely handle all the various bits of information that each item has. Is it a weapon? What type of weapon? Does it give special benefits to attacks, or augments armor somehow? Does it improve one of your stats? Do you need to have a stat to a certain level before being able to use this item properly?

Aside from the horrid colors (they're there for a reason in development!) the page is starting to interact the way it should be - which is amazing to see coming together.

Sunday, February 12, 2023

Vendors (mainly) working as intended!

Well, it's been a long long Sunday, and there have been more obscenities uttered than I care to admit, but I've managed to get the Vendor Interface working as I wanted it (mainly) finally.

The interface uses the data from the server to show available items for that vendor and shows (currently the basics, but has access to everything needed) information to let you decide what to purchase. When you double tap the price-tag, it creates a new item and places it in the player inventory as well as making the required changes on the server. Everything is handled via nice callbacks, so if the server doesn't know about it, it doesn't happen on the client-side either. That should sort out most network latency I hope.


I had hoped to get a bit further given my limited weekday time, but this just took longer than I expected it to. I'm still having the odd "frustration" with Android where something just doesn't, for the love of anything, seem to want to work the way I think it should. I spent around an hour today running down a side-quest trying to get a particular view to fill the width of the screen nicely. I've managed it without much hassle in all the other places I use this functionality. But here. Nope. Nowai. kthxbai.


Anyhow, good progress. With some luck, through the week, after work, I'll get the code tweaked to handle loot and quest rewards too. Hopefully all this works as intended with that.

Thursday, February 9, 2023

Vendors, vendors vendors! (And loot, and quest rewards)

Been spending time working on vendors at the moment. It's not exciting, but having it come together with the work I've been doing around character inventories is very pleasing.

I've had to slightly modify my approach, as technically, the items for sale at a vendor don't "exist" in the game until a player purchases them, so I'll need to make an extra call to the server when that happens to create the item and give ownership to the player that purchased it. That way, even if the player doesn't go through a sync cycle, there will still be a record and the appropriate gold will have exchanged. Same will go for quest items etc.

The aim for the weekend is to get the code working for a vendor shop. Additional points if I can get "loot" working where you can pick up stuff dropped (as in encounter loot) as it is basically the same interface.

New Abilities, Ability Functionality and Spells

It's been a few days since I posted, but I have been super busy working on iterative builds here to run through my own testing, and that...