Today I have to make the calls I couldn't make yesterday but I hope to at least get the base care systems rigged up. There's a lot of UI as well as Inventory and minigame design required to get them fully implemented but I want to get the stats increasing in all areas so I can start the server tick code. Once that's in the time to pay technical debts comes.
I've got a basic outline of what I expect the functions to be in order to send the data to the server for each of the care interactions. Now I just need to actually send the data to the server to be processed. Should be no different than what I did yesterday, really.
I was also thinking of having the faces attached to a 3D sphere that turns around... but it occurs to me that if I wanted more complex bodies, things not accurately fit to a sphere... it would not work. I might implement it just for the sphere bodies to see how I like it, though. I'll put it in the todo list, though, rather than make an issue for it.
Alright, time to get this care system built.
Well, managed to get all the functions in down to the slime on the server side so far. I have to figure out how I want to calculate the success rate into the end result now. Success rate is a percentage, so I guess I just have to divide the part from the whole and multiply by 100, right?
Now for the rest of the basic care functions.
I still have to implement the client side of the body part script hooks, somehow nearly forgot. Lots of moving parts here.
Alright, so... assuming success rate is 100;
100/10 is 10, right.
100 * 10 is 1000. Yeah, that's... god dammit.
Why does my tired brain do these things to me? I checked the math with a calculator because I was sure I was wrong and the calculator lied to me. Or I screwed up. I probably screwed up. Alright, let's fix this percentage formula. Used the wrong one.
(Part * Whole) / 100, right? RIGHT!?
So using the previous example...
100 * 10 = 1000 / 100 = 10
98 * 10 = 980 / 100 = 9.8 rounds to 10
54 * 10 = 540 / 100 = 5.4 rounds to 5
I account for 0 success before doing the math, I don't need to be dividing by 0.
I am also assuming that because I am doing integer math it will produce and integer at the end. Most languages do this but I never checked if GDScript does.
That is correct. Yes. Now then, it's nearly lunch time. The basic functions for the primary stats are there. Now I need to have the secondary stat effects, energy needs to be handled and decreased when certain interactions happen, right now it is the default value of 1 across all slimes. They need to sleep to regain energy. That's tied into the day/night which is part of the tick. Oh boy.
Well, lunch time. I suppose it would be wise to start thinking of how the tick will work with time zones and all that. Is it better to have it be 1:1 time or maybe 2:1 or 4:1 even? So many things to consider, but for now I got lunch to make, calls to ... call and some chores to deal with. Then I will be back to it.
Nearly 3 now, still can't get a hold of anyone. Just one of those days I guess.
Well. it's 4 now, finally got through to one thing, still more to do tomorrow.
At least I managed to get something done today in getting the care system communications scaffolded so I can start building on the other parts. Though, thinking on it now I should probably start the server tick. I was thinking 1:1 time but allowing players to select a timezone and an offset, some players might now be able to play during daytime hours and their slimes would normally be asleep when they have time to play so having an offset saved per player could allow for some remedy on that front.
Once I have the server tick started I can more accurately figure out how I want to balance the care systems and get all that flowing nicely before I start on adding animations and particles.
I'm going to mess around trying out my swivel face sphere idea with the time I have left today, not going to get much done anyway, all this phone stuff exhausted me.
Ah, the MeshInstance2D doesn't work how I expected it to. I planned to wrap a face around a sphere and spin it around on a particular axis. I figured it would simulate 3D space and flatten it into 2D but I was incorrect.
So much for that, then.
Yeah, calling it here for today I can't really function right now. It's almost 5 now anyway.