Sunday, April 30, 2023

Effects (Good and Bad) Just Ticked Over

So there's a goddam amazing pun in that title, and after the head-scratcher of a day I've had trying to make this as elegant as I can, it's a needed pun. In Torn Realms, most damage and effects (eg, healing, buffs, debuffs) will come as a DOT effect. These effects will tick over inline with the game ticks that constantly happen in the world. I've been getting the objects right to support that today, and yesterday and scratching my head before that about how I was going to do it). 

Right. Nerdgasm aside, I think I've got the right structures in place  to support the types of effects I want in the game, and I've got a random bunch of stuff working in my unit testing to prove it - and it is delightfully interacting with the HUDs and character stats I'd previously done. So, things are clicking into place nicely.

There's still a lot of work to do with effects, I need to drop icons on the right character, show the right effect on the overview, update the text output and the like, but there's certainly a milestone here - effects create, interact with characters (or the party as a whole) and then wear off as needed and dissipate. It's downhill from here I think.

Thursday, April 13, 2023

Character Stats, Android Views and Game Ticks

I managed to get some really good code wrapped up today. Actually, wrapped up may be a bit of a developer's stretch term. I worked out my algorithms for how many health/hit points characters get (in terms of how the stats determine the numbers) along with Action and Mana. I did the same for a bunch of other various stats for each character, like how quickly things regenerate and managed to connect that to the main game cycle, so that characters do regenerate these things over time. 

I even managed to get some code done that connects that back to the main android activity showing all these things nicely and got that delightful rush as things worked without too much debugging for once as I fired things up. It might not be a huge thing to look at in terms of final output on screen, but there's a lot going on there now that wasn't going on yesterday, so this is great.

I think next steps will be to write up some editor code to introduce buffs into the database, then look to bring them into the android code and start trying to work out how to connect them to what I wrote today - which should in theory for hand-in-glove but things rarely seems to work out that nicely. We'll see.

Monday, April 10, 2023

Character Stats Progress

I had a lovely Easter Monday off which gave me some time to spend on starting to iron out the details with character stats, how the code updates everything correctly and how it all gets triggered at the right times.

First problem I came across was wanting to have "complex" traits. Lets use Attack Rating as an example (as it was the first cab off the rank I was looking at). Attack Rating is basically one of two values used to determine whether you successfully hit an enemy you're trying to attack, but lets just look at it on it's own for now.

Attack rating has two primarily combination of your Strength and Grace characteristics as ratio of the two (kinda). Super. Easy peasy. Calculate it off your base stats. Some items grant extra Strength and/or Grace. Still easy. Calculate it off your base stats, plus those stats. Super. More annoying, but still doable. Some items also can give you a straight up bonus to your attack rating. By this time, you're at the same place as me logically (I'm assuming you're at least as smart as I am!!) and you can see that things are starting to get a bit sketchy. What if you have multiple items that give various stat bonuses, or a bonus to the Attack Rating itself? What order should they all be processed in? What if a buff is thrown in on top of all that, that affects one of the stats that are involved in this calculation?

If you read that entire last paragraph, kudos to you. The short version is I needed to break complex traits (like Attack Rating) up into it's primary constituents and generate the final value on the fly - which is what the code now does after a good deal of head-scratching and looking at my belly-button in search of a solution.

I'm about halfway through all the complex traits that come together through a combination of your characters base stats combined with potentially items that add to that trait directly (Health or Mana Regeneration are great examples - that use your primary stats, but can be modified by items or buffs directly).

Anyhow. 

tl;dr 

I solved another thing that I discovered I needed to solve today. Feels good.

Friday, April 7, 2023

Item Stats, and Item Sync

I've had a rather busy week with work, so updates here have been rather slim (non-existent), but the good news is that today, the drought has broken.

First cab off the rank, I got the code written to update stats when items are equipped and un-equipped. By that, I mean it does only Attack Speed, but the faffing about wasn't with getting it to work for multiple stats, but getting it to trigger when it should. So I'll be adding in the other stats shortly, as after a good deal of curse-words in more than one language, finally stats update when an item is put on by the character, items correctly remove their stats when they are taken off - and some older code works perfectly so that when you simply replace one item with another, it looks after all that quietly.

That brings me to the second update I did this evening. I already had it in place that when an item was equipped (or had been flagged for updates by something) it would go and update that on the server end. I however today wrote the correct response code from the server to let the client know what IDs had been updated so that the game client could clear the update flag on them - and then wrote some functions back in the client to clear the flags in the items.

I'd say this is super exciting, but it's another tranche of dull updates in the code that simply need to function for the game to work. And in a funny way, having these little things come together nicely, seeing the game inch closer to functionally working as a game is very rewarding for me as a dev.

Huzzah!

Teleports & Location-Swaps working

A rather productive Friday evening it has been. I've managed to expand the code that deals with special combat events, and successfully ...