Friday, July 28, 2023

Quest Code Finally Working

Quests are finally working, at least to an MVP level. I managed to resolve all the issues I had with the right parts of the quest switching on, and allowing those interactions to happen, then turning off again properly and so on. The interface to create this is still taking longer than I want it to - but I think that's also potentially something that I just need to get used to in the sense of knowing how best to make the editor work.

On the to-do list, I still need to actually implement some sort of screen in the app so that when a quest completes, it will hand over the reward to the player, and at a more basic level, the only quests that function currently in the app are ones where you walk about and find/talk to various NPCs/locations, so I need to obviously set up the rest of the app to handle the "go and beat up xxx number of some beastie", or "find me xxx of some widgeteroo", but all the work I put into events and how they are handled seems to be working nicely. Things click on when they should, and stay turned off when they shouldn't be active.

Hopefully I can just tidy up the editor interface for creating quests and conversations a bit, maybe make the parts where I connect events to different things a bit more intuitive and that will help. I think all-in-all it's right, but if in the long run, I can make things easier, that'll be fantastic - but if in the end, it takes a bit of time/effort to make each quest, then so be it - but I'd rpefer quicker and easier.

Thursday, July 27, 2023

Quest Code Rework

I know I've gone and done a con-fuddle, but right now, it's just a bit beyond my ability to brain out. I'm basically reworking the way that events work, and tie into quests, so that your quest might be a "find me out...." or "talk to..." and that particular event only activates when you have the quest, but then once you complete that part, it de-activates again (but the server saves that you did it.... and it gets really complicated, really quick... and I've been circling it for a good part of the evening, and I just know I'm too tired mentally to get there. I'm almost there, but I know I'm not quite there. There's just too many things to mentally keep track of in these interactions.

So. Tomorrow, with a bit of luck, I'll be circling back into this code, to properly correct all the various interfaces I have in the editor, as well as the app itself, so that the right interaction triggers the right part of the quest, that it is saved properly to the server - and of course that the quest progresses as it should.

Wednesday, July 26, 2023

Side Questing in Quests Code

Ummm... yeah. So I started to fix stuff the other day, thinking it would be a really quick tidy up, and I'm still at it. I've fixed up a lot of code, and am working through a bunch of both editor and app changes, but boy oh boy, can I say I thought this would be quicker to do than it has been.

I have fixed the way some quest requirements trigger, to make it basically more efficient and easier from a creating content point of view, but to get there, I've had to change a LOT of code. In the editor, I've updated the quest interface, the conversation interface, the world-builder interface, most of those matching equivalents in the app as well as re-building a quest multiple times to make the4 code create the other data I needed.

So, it's been an utter side-quest in getting to where I wanted to get to, and I am not completely sure it's doing exactly what I want yet - and if it is, I'll need to tidy up a few editor interfaces to make it easier than it is now to do some connections stitching together conversations and quests with events in the player history. Obviously, I'm a few days closer than I was a few days ago, but it's still not quite there yet.

Monday, July 24, 2023

Account Login, Quests and Events

I managed to finish up work on time today, so I got stuck into a coding side-quest which has been bugging me for a while. When you take on a quest in the game, it does save that info to the server as it should, but as I've been testing, it didn't seem to be working as expected when I logged back in. The NPC's didn't seem to know that I'd accepted their quest, and secondly, what we'd talked about already - so it was time to fix that.

When I started to dig into the code, namely the parts that sync progress to the server, I worked out that indeed, things were saving correctly to the server - and the server did in fact know where each player was up to. It just wasn't ever being asked for that information back when the player logging back into their account and never processing it all back once you logged back into your game. So.... a few quick interfaces later, I had the IDs of events and quests loading up along with the basic account into when you log in... and realised that I'd written some clever code to pull up quest data when you accepted it - but not when it was being loaded in a state where it had already been accepted. So another interface later, the game was correctly picking up when you accepted a quest, the game was correctly updating the server when you progressed a quest - and finally the game was correctly updating all that again in your app when you logged back into the game. Huzzah.

Now I suppose I need to finish off the first (and only?) quest in the game in terms of being able to actually complete all the stages and then tick off that it is in fact done - and have the NPCs know that you've also done that the next time you log in. That'll need at least another interface I think, and also at least a screen or version of a screen in the game to let you accept the quest rewards and select items if you want them as a reward.

It'll be easy they said. It'll be quick they said. THEY had clearly never tried to code a reasonably complex game from start to finish.

Saturday, July 22, 2023

It's Actually Starting To Work

I fixed up and tweaked a few small things in the code today, such as lighting transition speed from zone to zone but the highlight actually came when I used the new editor functionality to paint the right zone information into the Floren Cave system entrance, set up some spawns to happen in there, and took my party in there for a run.

And.... things just worked nicely. Spiders spawned where they were supposed to spawn, they wandered about where they were supposed to wander about, the lighting did what it was supposed to do in this cave system. 

I did notice a slight bug in rendering of animations when they are scaled, but I think I'll be able to sort that out without too much hassle. Right now, I'm just enjoying things working nicely. Oh, and I tested on the actual handset, and nothing has impacted the framerate, so all still working nicely.


Thursday, July 20, 2023

Realms, Resources and Spawns Editor Work Done

Sometimes, just sometimes, code takes significantly less time to get done exactly how I want it then I think it will. Today was one of those rare times.

I managed to wrap up the extra code in the world building editor interface to handle applying (and removing) spawn locations, resource locations, and applying the correct realm to each tile location. It will nicely show me the overlay in a simple colour coded effect, so I don't need to worry about setting anything once I've picked the right realm to apply - and spawns & resources was even simpler.

Here I've applied one realm to the waterline at the top and one to the land to the south of the river - which means that I can now control spawn items exactly how I want them, same for creatures and all the associated bits of pieces.

I really thought this would take longer to get done, but I am totally not going to look this gift horse in the mouth, but rather start on the next bit of work - which will be in the app again, working on creature logic to work towards starting an encounter. I think all the other ducks are lined up nicely, so hopefully a little bit there, and then I get to start on what combat looks like finally.



Wednesday, July 19, 2023

Editor Functionality for Realms

Short update tonight, as I only managed a bit of coding, but I've been working on the world builder editor interface, looking to add in (useful and meaningful) functionality to apply the right Realm to a location, to apply whether the location can spawn a creature and to apply whether the location can spawn resources. I say meaningful, as that functionality technically exists, in an unusable format, so the idea is to add another rendered layer to the editor so that I can see swatches of colour representing possible realms, and a simpler red/clear overlay for item/creature spawns.

Not quite there yet, but def heading in the right direction. Maybe another day or two and I'll be happily using the editor to apply and control these vital, if droll data points for the world.

Tuesday, July 18, 2023

Small Encounter Code Interface Update

Amusing random rant. If I had a dollar for every time I type the variable as encounter and NOT encoutner, I'd certainly have enough money to get some additional assets. Android studio is fine, as that calls it out straight away, but all my other code and IDEs... not as much helpful thanks.

Anyhow, rant in the rear-view mirror, I didn't get an awful lot done, but I did manage to fix up my editor interface, and all the other places in the app/connectors to allow me to specify how many creatures an encoutner.... no... encounter will contain. It's kinda nice to see it in action, but what it means, is that I can set up a list of say forest creatures and define that a wandering monster only contains one item of the list (say a wolf, or a deer, but not one of each) while then creating an encounter for goblins saying pick 2-3 of a lilst of various Goblin creatures so that the encounter might contain a Goblin Scout, some Goblin Savages and a Goblin Shaman all in one encounter.

I'm rather scratching my head at why I didn't create this from the start, but I am guessing I was planning to have it performed via the individual creature quantities for each spawn possibility. This lets me do both now, which is better-er-er.

Sunday, July 16, 2023

Zones, Encounters and Creatures FInaally Working

This week has mainly been work-work-work like crazy, there's a lot going on, and that generally saps my strength and brains at the end of a day - but I've been slowly chipping away at getting this code done nicely - and right now, it's starting to look half-not-terrible finally.

The editor now has the functionality to define a zone nicely, create possible encounters, define what creatures can spawn in them - along with all the relevant creature information. The app now picks all that up in a way that makes sense, and it all seems to function correctly for the most part. There's a few glitches, but mainly things seem to work as expected where I've properly refactored the code at least to move off placeholders.

Basically, I get to start working on some logic again in the app for creatures to start behaving the way I'd think they should - wandering about, attacking the player and so on - and using the underlying creatures to understand what it can do. It's a great place to close up Sunday night with.

I do still need to update the world-builder interface to be able to paint the zones in somehow in a meaningful way, possibly also tweak the spawn-tiles in some way, so that creatures only spawn on defined tiles, but that's in the future right now and I'm okay with it.

Tuesday, July 11, 2023

Creatures, Encounters and Editors (Like, almost!)

While it certainly doesn't seem like I've managed to get much traction in the last week or so, I've been making quite considerable inroads into the code that will control monster spawns.

I've written a big bunch of editor interfaces, app object code and server to app data transfers. It's all about to come together in a rather spectacular way creating the right encounters to spawn, giving them the right object to animate them and do all the other things that are supposed to happen.

tl;dr; Monsters almost work!

And I've not logged into the game for any period longer than how long it takes to debug a crash (as currently expected with all these massive changes) so, I'm still standing next to the waterfall I made the other day.

Friday, July 7, 2023

Creatures Editor Interface

Only a small passing update for tonight, it's been a very busy week with work, so time for code has been limited, but I did manage to get a few hours in this evening and finished off a ver 1.0 interface for the editor to create/update creatures, and started to circle back on the database as well as the Encounters editor interface to start adding the creatures into the current Encounters that are working nicely as ultra basic objects in the app now.

Yikes. I just realized what utter gobbledygook that comes across as. I worked on Creatures and how I can add them to Encounters in the editor. That's more human. 

With luck, tomorrow, I'll work on that further and not long in the future, start working on the app again to load up all the creatures, be able to have a creature repository in the app, like the other things, and be able to generate a proper spawn-table for each encounter. After that - and that's a good bit of work to get there - it's going to be... a combat interface of some sort I think.

Progress. Slow, delicious progress.

Tuesday, July 4, 2023

Animations, World and some Editor Updates

I haven't had much time tonight, but I got a bunch of little things done which have brought me some good contentment this evening.

I used the new editor interface for animations and models to put together a humanoid model of a rogue, then set the code to use that. That took more time scaling the input assets than it did for anything in the editor, so that was a great win.

I updated the bit of world around the waterfall I was playing with yesterday to make it look less awful. Also not a huge amount of time, which is sensational.

I tweaked the rendering engine as something I'd done at some point was causing the player character get rendered over the top of anything, which isn't supposed to happen. The character sprite does indeed walk behind things like trees and specific objects. It does that properly again.

And I spent a sliver of time starting up a new editor interface to create creatures, which I'll be adding to the encounters as I round that code out in the app and slowly lean towards actually having some sort of interaction and combat in the game. 

Monday, July 3, 2023

More Animations and a Little Editor Time

Found an asset for sale today that had a nice little waterfall animation which I'd rather been missing in the assets I've got and this afternoon, I tweaked the colours to match the stuff I have (also finding that my editor code is saving them with a slightly different colour palette which is rather annoying) and created a tiny stretch of land near town to test out the new animation.

It's not perfect, but it really is good enough.

And for the amount of time and effort I took to get it into the world, I'm also very happy with the state that the editor is in to let me do it quickly and easily - from an asset in a different original scale to being in the game in next to no time. That's the sort of thing that I'm going to need a lot of in the future as I start to build out the world in in the near future when I round out the main code changes in the editor and app itself.

Simple They Said... Simples...

The plan for yesterday was a simple one. Just get ability-use to cost the right amount of each pool, and deduct it from whoever uses it. Tha...