Tuesday, April 4, 2023

Weekly Update #5

Hey hey~

Kay here 👋


Apologies for the lack of updates the past few weeks, some real life things kept me from working on the game. Luckily though, I'm able to work on it again.


Changes since last weekly update~

  • Did some visual stuff since I got tired of so much programming (worldmap concept)
  • Fixed a circular dependency I didn't see before
  • Trust and Distrust Added
  • Fixed Equations in Trust Function in order to no longer produce NaN Errors
  • Added another new stat, Good Experiences, to alleviate Distrust stat
    • Resulted in a second rework of the original Trust Equation 
  • Fixed several stats so that when leveling up, any extra xp would roll over
  • Friendship stats were completely broken. They should be fixed now
  • Added Love Functionality, along with conditions to unlock this stat
  • Added a debug menu for testing all stats

 

 World Map

 This is by no means final, but around the beginning of March I was sick of doing nothing but programming in the Garde character, so I opened up wonderdraft and played around with a few ideas that have been in my head since the beginning of this project.


Keep in mind that this image is just concept and anything you see may or may not be in the game world.


Trust, Distrust, and Good Experiences

These three stats were quite tricky to get implemented. Before I even got started with Distrust and Good Experiences stats, my original equation for Trust, specifically when gaining XP for Trust, would return an invalid results at certain values. This problem originally came from taking the power of a negative exponent, which stemmed from tests where Distrust was too high. This has changed so that a set amount of XP is always given, but Distrust increases the XP needed to level up.

 

Distrust Decay

As it stood, the Distrust stat wasn't really usable, so I added a timer to Distrust that slowly counted down, and when it reaches 0, the Player is able to get rid of some Distrust. 

This is where Good Experiences come in. Nothing complex with this one, as it's just a flat value that slowly goes up (or down?) as you interact with the Garde. Once Good experiences go up, Distrust also goes down. If the Timer on Distrust isn't 0 yet, then Distrust will decrease at half the rate. No logic has been made yet for if Distrust is already 0 or if it's negative though.

Oops

 It was after making Distrust and Trust work together in their functions that I had to once again fix the original equation. Before, Distrust would cause TrustXP the player had to be negative and additionally cause it to be impossible to gain that type of experience. Instead it has been reworked so that distrust causes the maximum needed experience for the level to go up. Interestingly, this means that there are two equations that control how much Trust XP is Needed per level now.

 

 Love~

The Culmination of implementing all of these stats has finally been done. Once a certain threshold is reached, then this love stat will unlock. Luckily, I added it so that the unlock conditions can be tweaked per character. 

The Love Equation takes in all of these stats into its calculations:

Nature, Good Experiences, Friendship, Trust, Affection, and Level

This single equation dictates how much XP the Player needs for each level of Love they get throughout the story. Because of that, I had to do some more tweaks on it to be much less extreme. For certain stats, it would bring up that pesky NaN error again so now it should work quite a bit more smoothly and, in addition, should require much less XP than before when certain stats are raised. (Seriously, at one point one of the XP calculations spit out something like 6*10^24. Yikes)

The function for gaining Love XP was much simpler and thus didn't need much tweaking at all. I did add a term for some randomness though, that way it's not the same amount of XP gained each and every time.

 I should mention that none of this was rigorously tested, so I'm expecting to run into a few bugs in the future.


 Misc Stuffs

Originally, when I made the level up functions, I was just checking if the XP requirements were met, then increasing the level while tossing all other XP (aka resetting it to 0). Now if you have XP over the level up requirement, it should take that spare XP and add it to the next level

tl;dr

if your XP is 105, and it takes 100 to level up from 1 to 2, you're now level 2 with 5xp instead of level 2 with 0xp

When going back and fixing the level up stuff, I realized that Friendship was completely broken. Leveling up wouldn't reset XP and the actual XP calculations per each level up wasn't working, so you'd just keep level up over and over and over again each time the function was called. 

This works now, with XP properly resetting and the XP needed for each level properly calculating how much is needed.

Since this game is going to have 6 Gardes, I was curious how things would run and slapped down 6 copies into the world to test performance. Unfortunately, there was a significant frame dip, and talking in general was completely broken. Just more things to fix in the future. One thing to note is that I didn't make Child Actors of the Gardes, this was the Parent Garde I plopped into the world, so maybe stability issues will be better resolved once I get to that stage of development. Also my current computer is really bad so that is certainly negatively affecting this, though I guess on a good note that means this game should run on pretty much any machine when it's done since it's being developed on a shitty machine.

When it comes to testing things, print strings and log files aren't really good, especially with how many stats I want to test, so I've begun work on a debug menu that will properly test all of these things while keeping track of stats.


I've only just started working on this, but when it's complete, a simplified version of this menu will be in the game just to keep track of the Garde's stats for the player.


Anyways, that's all for the past few weeks~

 

 


I want to get a playable version released before July!


Thanks for reading~
I hope you enjoy the game when a download cums out~ 👋
If you like what you see be sure to support me on Patreon~
Discord Server for those that wish to join~

 

 

No comments:

Post a Comment