Game Month I – August – Part 2. The pet is alive(ish)!

Good to be back to writing. Remember you can see me coding onĀ Twitch.

I don’t have a schedule set there but every time I code, I stream. I love helping others with their Unity issues so come over! Maybe I’ll stream gaming too.

I’ve been coding this little monster (pun intended) slowly over the past days. I have it up in Unity Collaborate for now, but I might just do github to show you guys the code. It’s a bit ugly at the moment, so…

First, life updates:

I got a whiteboard to sketch up some data about the game and it has helped immensely. Also this Hourglass free app in my computer that keeps track of 30 minutes every time I ask it to so I just disconnect and focus on coding while it runs. Also a big help there. Since this is a personal project and I’ve been looking for more work (I work as a freelancer in game development), I have to find all the ways to focus I can. Being a solo dev can be hard.

 

Now, for the coding updates:

I implemented a full event system (still on it) by using CodeControl.Message. This allows a lot of code freedom and modularity between all scripts. No one knows or cares about what others do, it’s amazing!

 

Saving and Loading

I’ve implemented saving through Databases by using SQLite4Unity. It’s fast, reliable and has little issues. So far the only issue I’ve found is I can’t save Dictionaries easily. This means my items system has to wait a little.

Why a database? Well, I was going to save through JSON, but as you all know writing a new file each time slows the game for one or two frames and it looks weird. So a Database seemed more natural, also it allows for instant updates which is wonderful and with no slowdown.

I can see the database usingĀ Database Explorer (DB Browser for SQLite), it looks like this for our pet.

 

Pet and Pet Needs and Timings

 

The pet is made of a name, a level, xp points a status, and its needs, I want to have a Dictionary<> Equipment but it’s not… I can’t figure it out yet. So no. The needs are hunger, boredom, thirst and loneliness. Less of those is better. More is worse. I want to rename and fix that but I’m not sure how yet, any suggestions are appreciated.

The timings thing means “when they go up by one”… I’m doing it by calculating a level * some value , which is conversely the number of seconds it takes for the pet to need something.

 

Animations

I have an animation controller, I’m thinking of showing an animation every 5 points of need reduced, perhaps? Or randomly, with a 10% chance. Also of course every time the pet is fed or satisfied somehow.

 

Minigames

 

So far I have just written down a minigame abstract and a minigame view. I’m thinking of having an interface to work with. 2 commands for the player character which the minigame defines what they do, basically.

 

New pet, pet deletion

 

They both work correctly, thankfully. You can create a new pet, though the only customizable thing is the name right now.

 

Future coding and definitions I lack:

 

  • What will be customizable in the pet at creation? Maybe assigning base stats…
  • Test minigame
  • First minigame
  • Completing animation management
  • Graphics creation?

 

Thanks for reading. This is becoming bigger and bigger. I’ll keep streaming and updating as I code.

 

Leave a Reply

Your email address will not be published. Required fields are marked *