Wednesday, November 6, 2024

Tutorial Code and Implementation Continues

I tweaked a few things in the code that runs tutorials. Things are indeed running just right now. it seems. And with that, it's been time to start dropping them down into the various screens in the game. That takes a bit of time, as I need to find the right element to highlight, but for the most part, it's not too bad.

It's also been really hot here, and the days are getting longer and longer, which is making it difficult to spend loads of time coding, even though that's what I really want to do right now.

Anyhow, tomorrow, I'd like to keep chipping away at tutorials on the "main game screen" for lack of a better term, so that I can ship a new copy of the build out to some testers and everything is explained.

Oh. Also work. Yikes. You take some time off work, and your list of things that need doing grows exponentially. Gah.

Tuesday, November 5, 2024

Tutorial Code (mainly) Done + Play Store

Firstly the completely done and finished part. The app is up on the Google Play Store, though it is not public yet. It's there as part of the next section of testing, though we';re still in early stages. Huzzah. (and gosh almighty, a lot of questions about what the game shows and doesn't show!)

Secondly, I had a good chat with someone testing the app for the first time, and it was really obvious that a tutorial of sorts was needed to be added to the game to help new players get the interface working. It's really hard to make some things obvious without mouse-over-tooltips. So, with another whole heap of general Android frustrations about how some things seem to be an awful; lot harder than they should - I've got a half-decent section of tutorial code written that I think will serve well enough to get through the initial bits at least. And I think it's going to be easy enough to implement it through the app.

So, the to-do list for tomorrow afternoon will be to finish off this code, finalise the section that links it to your own data so that it's not showing the same things over and over - and pop it into places where it makes sense to have them. Basically, most screens in at least one place.

The image shows a rather boring test "tutorial" that IO made while getting the target to track to the right element on the screen, so it's boring, but it works and seems to pop the tutorial in the right places on screen (while also stopping you clicking and doing other stuff).

Sunday, November 3, 2024

Rendering and Some New Animations

So this morning was a direct follow-on from last night where I was having conniptions with the way the wolves were rendering. I made a quick edit, but turns out I was really tired last night. When I was checking the database to make sure the data coming from it was correct, then going through hundreds of lines of code.... I checked the database for the wrong ID. So no, the data there wasn't correct. And then all the following places were propagating the data as they should until it hit the rendering engine where it was coming out wonky.

So today was a bunch of creating new animations, then also further follow-up rendering code tweaks to get encounters rendering to the right size when they were now in combat. I've discovered two bugs that I'm not overly happy with when I dropped in some new undead creatures - and some good things.

Good things first. My editor worked perfectly. I was able to import and create the two new animations (a smaller skeleton with a shield and spear, and a bigger skeleton with a sword and some wicked moves) with clean and smooth efficiency. Secondly, the game just picked them up off the server as needed and went to town using all the assets without skipping a beat. *chefs kiss - mwaaa*

Now to the annoying. It seems that encounters aren't rendering quite as they should. The assets I have should be nice and smoothly centered, but when the creature changes facing, or action, the place it is rendered to does jump about - meaning I don't think it's quite rendering properly using all the offsets just right. More play with that tomorrow.

Second annoying bug is that when the new animations are loaded up, the game does hang for a second or two. So clearly something is happening on the wrong threads. Interestingly, it's not the rendering thread - that happily keeps the animations and such going perfectly well while nothing moves or happens. So I'm hoping it's going to be as simple as calling a method via a reference of a thread rather than as a static call.

Oh. There's one more bug - 'cause of course there is - where some of the encounters are jerking about as the player moves, so I may need to change the way they're referenced in the world to connect them to the world below rather than as an arbitrary reference that merely is aware of the ground below them.

Anyhow, here's the party wandering about the Blighted Isle and running into some of the new skeletons in the form of the rather weak Dusty Skeletons.

Saturday, November 2, 2024

Good Progress and Frustrations

Today was a day that I spent mainly in code, which was great. I got stuck in after breakfast, and managed to get NPC images loading and caching nicely off the server, which is great. All the little extra details about callbacks and so on worked as intended. The image renders nicely if you have it, and if you don't, it fetches it, and then renders it to the screen as soon as it has it downloaded. Huzzah.

And now. The bane of my last four or so hours. Some animations render "now quite right" which is driving me rather bonkers. The new Fighter Class animation was one of those, in a few instances. That got solved. It was a funky value that had worked it's way through into the database at some point. That got solved and resolved.

Player Two entered the game. Floren Wolves. These things just won't render quite right. And I've narrowed it down to what I think is the particular value that's causing the issue (it's a particular width property in one object that is propagating it's way up the food chain to the rendering engine) but why this appears to only be happening in Floren Wolves, when they aren't bigger or smaller than other creatures is at present beyond me to understand. I've also been through the various database entries from start to finish and they all look fine, so again, I don't currently see how the problem comes to be, but I can see that it is, in fact, being.

I will pick up again tomorrow, and hope that a fresh set of eyes finds the issue quickly and easily, but right now, there's rather choice words and utterances flying in my head. They're the same size as other things that render correctly. They seem to have all the right data in the database as do the other creatures. They should, for all apparent purposes, render correctly, yet they do not.

The image shows the issue. The wolves are rendering to the right of where they should be by about half their size. One should be straight under Chester. Another should be between Spend and Sparkie (who's name is obstructed by the trees) yet they all appear to be about half a tile to the right.

Edit: So, turns out that I was really tired last night. When I was looking in the database for the values, I was looking at one object, but thinking I was looking at another. My choice words from last night were used again when I saw the obvious, clear and annoyingly blatant issue. One update statement and things are rendering just how they should. tl;dr; parentID 5 is not the same as parentID 17. fml.

Friday, November 1, 2024

You're All Individuals! Yes! We're All Individuals!

I meant to get into the code today to store NPC images on the server, and then cache them in the app. But well, I did a side quest instead. Though, it was a good one.

In all the images, all the party characters have so far had the same animation, as there was.... well... one character and party animation. Now there's more.

I'm halfway there. I've gone and created a few more animated objects for a few classes, but only in male form. I have however connected them to the classes. So at least now, when your party loads up, each character will have it's own class animation, and the party will use the leader's animation.

I'll create the rest of the animations and connect them through properly in the near future, but it's another step closer to where things need to be before a proper beta test goes ahead.

Also, as you can clearly see in this image, what used to be lovely centered character/monster names now sort-of kind-of fall under the right character. So something has gone wrong there. Writing your own engine wasn't supposed to be this fiddly! Obviously it was though, which answers why there's so few unique engines running games.

Wednesday, October 30, 2024

And now back to our normal programming...

So, if you come here frequently, or you've just looked at the frequency of posts, it's recently been a bit of a decent break for me. I took two weeks of holiday from work (such luxe!) - there's two reasons for that.

Firstly, I went for a lovely holiday with my wife, and we had a delightful bit of switching off from the world. We both took books for the evenings, and good boots for some serious hiking in the mountains. We ate, we drank, we read and we relaxed. 

*chef's kiss*

Secondly, from the day after we got back, we've been going at full throttle painting the house and I also built up another addition to the garden. So, of the fourteen days of break all up, there's four days left. We're both feeling utterly accomplished, but it's been about ten days with next to no programming on my end. I did a few bits here and there, but after labouring all day, there's not much left in the tank mentally, so there's nothing super huge to celebrate.

The good news is, that there is indeed four days left before I'm back at work. Which means I've got some good coding time ahead of me. There's a plan for what I want to get done even.

Roughly, in order: Change the code and app so that NPC images aren't stored in the app resources, but downloaded from the server and cached for use instead. Do the same thing for terrain information. Add content to the world. I'd also like to have a better way for the item data to be updated to the server than it is now, but I'm not locked into a particular method for that yet. There's enough there to keep me occupied anyhow.

So, lastly, in things that made me laugh, I started filling out the world in bit of work, and added in spiders (also, I wanted to check the graphics changes I'd done with creatures that were more than one square large) and so I quickly added a new zone area to the game, dropped in some creatures and ran my party in. Turns out the last time I used spiders, I'd been mucking about with stats to check ability logic. Anyhow, the spiders basically mauled my party of level 1 characters without breaking a sweat. At least I got to see that respawns were still working as they should be.


Friday, October 18, 2024

Rendering Redux

I've been meaning to for a while now, change the way that sprites are rendered, switching from the current concept of "render and prepare each one to a tile size" to "render it in the tile, to any size you want". And today, was finally, the day when it happened.

So, that's a quick update. It's enabled a lot that I wanted to do around bringing in some images in a higher resolution and so on, as well as some other assets that I have where the asset itself is normally surrounded by a good deal of clear space - which would have shrunk the final output needlessly and so on. Blah blah, code stuff, code stuff.

Is good. Is better. Is success for tonight.

Here's an inn in the starting area, with the newly much larger party sprite for my party. The final one will end up probably somewhere between this one, rendered at double the size of the original and merely a higher resolution original.

Oh, and I'm off for a break for a few days. Loads of cold weather and hopefully good food in my future!

PS. Quick thought. This works for the normal scale creature (supposed to be as large as the party animation. I'll need to validate my numbers still work for things that are supposed to be multiple tiles in size.

Tutorial Code and Implementation Continues

I tweaked a few things in the code that runs tutorials. Things are indeed running just right now. it seems. And with that, it's been tim...