Jump to content

Oafkad

Seraphim
  • Posts

    100
  • Joined

  • Last visited

  • Days Won

    2

Oafkad last won the day on March 19

Oafkad had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Oafkad's Achievements

Contributor

Contributor (6/14)

  • One Year In Rare
  • Collaborator Rare
  • One Month Later Rare
  • Dedicated Rare
  • Conversation Starter Rare

Recent Badges

2

Reputation

  1. Today was one part updating Unity because of a bug with the specific version I had, and another part UML documentation! It is nowhere near done but I'm writing up docs on the adventure system so that I can more easily integrate new features into them. As you can see we don't have a lot, but this is the beginnings of it. Adding commentary to every function and attribute so that I can better keep things in line. Cause I'll tell you, this brain of mine struggles sometimes. Especially when we haven't touched something in a bit. And in the case of Adventures we made it a bit ago and then came back to it with a needed overhaul. I should have all this finished tomorrow though so I'm not too vexed. Then after I write this up I can think about what I'm missing. But per usual, the real life Moose is heckling me and telling me to get to bed. So I suppose I better do so.
  2. I believe we will need to clean up the Adventure system in the future but for now it is in a pretty good place. What we do for cats added by themselves is as follows. Has any cat run this kind of adventure yet? If no, add this kind of adventure to our unlocked collection. We do this so it can be saved and loaded. Next we ask if there is an empty team slot on the adventure. If yes, we add this cat to it and start it, huzzah. If no, we create a new slot and add it. Then we raise the send cat on adventure. This allows us to effectively cache slots for these adventures. Which does make me realize I should probably standardize this logic and add dedicated calls to do so. Overall though looking good!
  3. Alright, we are partway through the cats adding their own adventures. I'm taking notes as I move along. Our main challenge is that Unity doesn't serialize dictionaries and they don't serialize Guids. I need both of these things. I'm currently just building these on awake. But I think what we could use are some simple container objects that we can add to behaviors. Scriptable objects that act a bit like a dictionary. In fact...thinking on this, Odin can serialize our SOs so we can literally do this. We'll have the adventure containers be the keys and the need satisfying adventures be the values. This is stupidly simple, I'm a little annoyed it didn't cross my mind until I wrote this. You know what? Tomorrow I'm going to write BEFORE I code and see if I come up with ideas before I go. That seems like a good plan.
  4. We have now reached the point where none of the work is throwing errors. That's always lovely, this means that we can now move into having our Moosecats add themselves to adventures. Today was a long workday so I didn't have as much time as I wanted but did manage to hit a good point with this work. It feels like by around Thursday or Friday we should have the setup complete for our Moosecats to go on adventures when they can't satisfy a need and then return a bit later. Can also experiment with them bringing back items and dropping them near the player, that could be very cute if it works reasonable well. As always, feeling good about progress!
  5. Ok! Progress is moving along on adventures. I feel it'll probably take most of this week given how exhausted I am in general. Not with coding, this is always a treat, but just combining it into days with working out and a literal job. The adventures now track how many teams an unlocked adventure supports by default, and how many slots each team has by default. It generates each team slot, then populates their fields for adventurers, and saves all of that to the unlocked adventure data that we store to the drive. I believe with this change, tomorrow we should notice that we can add an adventure trivially and have any number of team slots running actively at the same time (that code was finished on Sunday). Following that test I'll get the Moosecat hookups working. Each Moosecat will create a one slot team in the related unlocked adventure, add themselves to it, and set it to starting. In writing that I realize I don't think I have much to go! But I'm gonna head out because the literal Moosecat in my house is purring and keeps walking in front of me while I type, I believe she wants attention.
  6. So this has actually been a bit more of an update than I was expecting. But I think we can discuss the high level of it. I'll do a more in depth document soon for my own sanity as much as yours. First I suppose we should figure out what the problem statements are. The first is that we want our adventures to trigger a series of actions when they complete. What these actions will be are undefined but we'll just add them in the sequence we want them to happen. The second is that we want our Moosecats to be able to trigger an adventure on their own. This is to satisfy their needs and it needs to be infinitely scaling. Now that we've got our two problems, in this case when I say "we" I mean you and I, we now need to talk about solutions. The first is actually already solved, we use the same GameAction system that we used for items. We simply pass each of the Moosecats through the actions, ignoring them where applicable, and doing whatever needs to be done to satisfy all the needs of our adventure completing. The next was, and still is, a lot more work. We need our adventures to not be singular entities, we need to have each unlocked adventure have a collection of "teams" it can support. That is to say, a number of instances of that adventure that can be running. We may never have more than one on the regular adventures, but for the Moosecat automated ones we need to be able to have arbitrarily many of them running! Naturally this is a rather large change, so I need to go through and update the Adventure logic that was assuming only one adventure at any one time being tracked. Now that "adventure" is really a team within the unlocked adventure. We are maybe 60% through the revamp, I'll be taking a break at this point though and finishing up the rest this coming week. Good stuff though!
  7. Welp! I intended to do adventures first but it turned out we needed to do items! The good news is that I can use the same system for the adventures once I get to that tomorrow. There is no bad news. We can now create action lists to happen in response to something. Currently I only have one action list, but later we can have one for collecting, one for consuming, and so on. These action lists look something like the following: A keen eye might wonder how you can "collect" something and "consume" it (thus satisfying your need), but there is a reason this works for now. Players do not have needs that are satisfied, but they do have inventories. Moosecats have needs, but currently don't have inventories. So because of this nuance the system works as designed. Now in the future we'll have split action lists for each. Things like "Game Action Pool" would be in both, but one would have the adding to your inventory, and the other would have the satisfaction. Additionally when we add in the GUI where you can use items from your inventory we'll be able to just reuse these actions, or a system that is very similar. So tomorrow, we'll be doing something like this for the adventures. So that we can have each adventure act in atomic ways, no need for large complicated hard coding. Treat the logic more like lego.
  8. This weekend we'll be finishing up the adventure work I highlighted in the previous post. Then after that I've got a solid idea I think for items. We won't have "Collectible" Items and "Interactable" items etc, we'll just have "Items" and use interfaces to determine what cool functionality they provide. This will simplify the maintenance and really make it so we can add functionality at any time without needing to overhaul TONS of items, or create class after class. Obviously each item will have unique functionality (to some degree) but we won't be enforcing much at the base level. I forget the terminology but basically we'll code them through promised functionality rather than strict inheritance. As I always say, should be fun!
  9. Today you can join me in thinking out loud about solving Moosecats sending themselves on adventures. We presumably need 1 adventure for each kind of need that can't be satisfied in the map. For now this means that we will have a relaxation adventure, an adventure to relieve boredom, and an adventure to refill their tummy. Currently the adventure system assumes that you will have an "active" adventure, this is the one you've selected from the menu, and you will add your Moosecats to that active adventure. But in the case of automatic adventures we don't have one selected. So instead we need to select a specific adventure and send our Moosecat on it. These particular adventures are defined already, or will be once I make them, so I suppose I could just make Artifacts for each of them and add them to either the node point or the handler. I suspect the Handler makes more sense. We can achieve this with a new function call, SendCatOnAdventure should be sufficient. From here we could actually read the "needs" on the Moosecat, and send them on an adventure based on that. So we'll make a collection that contains the need ID as the key, and the resolving adventure as the value. Then we can simply set it active and pool the cat. This requires either adding that logic to the function OR creating a new function for StartSpecifiedAdventure or something similar to that. We'd pass through the adventure to be started and handle the starting inside of that. I've got a pretty bad headache tonight, so I won't be doing this for now. But this will be my gameplan tomorrow. I'll leave this open so I don't forget.
  10. Working through the catalog system now. One of the first we need is for prebuilt kitties. These will be our friends like Moose and Bean. Because obviously they'll have a specific look. But other custom kitties will exist beyond this. I'll need to have the collection store both the cats themselves and some ID Artifacts for easily finding them in other work. This will require a bit of thought on my part, maybe I'll write something up tomorrow. For now you can find them via the unique IDs assigned to them, but that might not be entirely sufficient. I may also add in a getter lookup by string, or something else identifiable. If we do go the artifact route we can just include those same artifacts on the classes that'll be making the request to spawn our kiddos. Many options, whatever we settle on needs to be fairly robust. Luckily the way the catalogs work you implement the getter largely agnostic of how we will index it. Maybe with ints, maybe with strings, maybe with Guids, but that all comes from the secondary interface that you attach to it. This helps allow us to have a single kind of catalog but have it work for anything. Currently we return strongly typed objects but I may end up going with loosely typed since this won't be happening very frequently.
  11. While I wouldn't say it is perfect, in fact I want to update it tomorrow. We now have a working component caching system that works for both the class name you are looking for, all interfaces that class implements, AND any parent classes it inherits from. In this way we can use it a lot like get component but it'll be much faster and not require searching each time. Now with this in mind, something I want to do is have it cache lazily. That is to say when you "return component" it will find the component, cache it in all the different ways we need, and then return the cached entry. That way we only store exactly what we need. This should be helpful seeing as there can be a lot of components on an object and we might never need most of them for editing. We'll also have it cache all the components you need from the children as well, whether I'll add "ReturnChildComponent" or just have it work seamlessly I'm not sure. But regardless I'm happy to see I sorted the issue of using interfaces for lookups. Not a bad bit of progress after a long weekend staring at celestial bodies.
  12. Today was quite an experience. Truly something that I was never expecting to see. And I'm happy to report I did not blind myself. Also last night when I should have been sleeping I had a revelation about naming conventions for collections of data. We'll use DataBase to represent any collection of data that can be modified at runtime and Catalog for any collection of data that is read only. I'll adjust my classes when I get back home tomorrow to meet this. The nice thing is that will also mean that I can tell which is which much easier, right now they are kind of interchangeable and I think that's not good for my own mental capacity. Anywho, have a great night!
  13. Alright, we've got our adventure system that currently rewards items. But what I need to do is have the rewards be actions rather than just raw items. In this case we can have the actions be something like "reward item", or "refill moosecat state", etc, etc. With that in place we'll be future proofed for all adventure outcomes. I also noticed that I've got some foundational code that is currently featuring manor only code. I'll just need to go back through that sometime and fix up those connections. Things like saving and loading should work in all of the game projects. But for now we can't stress about it too much, just need to make note of it and focus. This is a healthy process to me. Trying things out, making them work, and upgrading them as we find new needs. The alternative is planning for months before you ever start and then realizing you missed things anyways. I much prefer this process.
  14. Over the next few days I presume I won't be getting a lot done. We are preparing to see the eclipse and that means I'll be away from my standard hardware. However that doesn't mean we won't be able to do a little bit of theorycrafting as we lead into the next steps. For now I know what I need to do is get the hooks in for our Moosecats sending themselves on Adventures. We know that we can do it through UI (or direct function calls) but we haven't discussed is how to handle it happening automagically. Can the same adventure be running with multiple instances at the same time? I mean...do multiple people go on vacation to Hawaii at the same time? Probably. Also, a random thought just crossed my mind. You ever notice how people say "we" when talking about creative ventures? Even if it is just them. Currently that is the case with this work. I wonder what compels me to say "we" sometimes. Very interesting. Anyways, I think what we (this time I'm talking about you and I) will want is for each adventure to be able to run arbitrarily many instances. If someone wants to send 300 cats on a mountain climbing expedition at the same time that's their deal. If their kitties are happy and willing to do it then it will be done. Ultimately nobody has the power to make Moosecats do what they don't want to do, so there are no worries there. I'll need to update the code to support that, but it shouldn't be too bad. Will also need to think about how the UI will display that. But these are all fun challenges. Nothing so far has really been miserable and I think that's a good place to be. It should be funny to see just how much it all changes over time as I hit walls, have new ideas, or just adopt new coding styles.
  15. I've now setup the logic on the Moosecats to work as follows. And I'm pleased to say that it looks like it scales for hundreds of kitties. So basically our little friends will notice they are, for instance, hungry. If they are, they will search out for food. If no food exists they will say "Tata!" and go on an adventure to find some themselves. In the example below we aren't yet de-spawning them and sending them on the adventure. But you'll recall I do have support for that from a month or two ago. So next I'll hook them into that system, updating their needs, so when they return they'll be happy and healthy and who knows...maybe they'll bring some presents or new friends! I want even the failure states to result in positive outcomes. They might be slower than optimal play but you can relax and just enjoy yourself. cubeseanceSmallest.webm It is amusing how few frames I have to put into gifs to make them only 1mb.
×
×
  • Create New...