Wings, Tails, Connections.
All that's left for the slime animator is to set up the wings and tails layers. I originally planned to generate a sprite-sheet but I may want to do things with individual layers(like apply shaders) so I'll keep things separate.
Today's music:
After I finish up with some wings and tails I will hopefully be starting on the slime server (finally) and then the most complicated part of this project begins. Once I get through it I can move into the testing phase where everything will break repeatedly and drive me to drink. Nah but really I expect testing to be a nightmare, I wish I had friends I could push that on to rather than an unsuspecting public.
I could have animated them to flap or something with the 2 frames and all but that's a problem for future me and any potential artists.
Cat tail, I guess. Animated it a little more than I did the wings.
Gotta test it in the test scene, of course.
Alright, time to make lunch, do a little broad spectrum planning and get back into the code.
First thing to do is connect up the Slime Server and the Apartment Server. The Apartment server should send over the player's ID and token to verify them and set them up when they connect.
So I need a custom multiplayer server on the Apartment Server that will receive connections from the Slime Server so we can send tokens and IDs over.
I'll need to do this in two steps, the player may not have a character yet and we store the slimes with character ID. I think. Gonna double check.
Ah, didn't set that up yet. Yeah, better do that and while I am here probably add the care log model. This table will be massive, it will log all care interactions with all slimes as well as all neglect-- OR I could use a JSON field for storing the actions directly on the slimes. That would likely be much quicker. Yeah, I'll do that.
Gotta love PostgreSQL.
# CARE STATS GO HERE
care_logs = models.JSONField(default=dict) # NOT {}!
neglect_logs = models.JSONField(default=dict)
I think that's how you do it, been a minute.
Yep. Alright, now that I got the model modified I can continue on the Apt<->Slime connection. What goes into them JSON fields is a problem for future me.
I need to first send over the token and IP, THEN after the character is either created or retrieved send it's ID over and add it to the dict for that token.
I could skip the verification of IP here but that could allow for some... bad things. So I will do it to be safe and keep player's from getting their pets jacked.
Okay so after a character is loaded in the Player Manager their ID is sent to the slime server so we can match their token to their character. Next I need to test the connection between APT and Slime servers. I am sure I screwed up somewhere.
Well, those connect. Next is making sure the player data is correctly populated so I can handle the client <-> slime server connections.
There's a special bit of code during debug that will see that Client IP (The one for the dev machine) and skip IP verification since it could be either the loopback address or the network IP depending on what I am running on what machine. That's why the Client IP mismatch happens there, the login server is sending an IP over to the Apartment Server ...129 because it's running on the office server.
Anyway, this looks fine. Tokens match up and we're good to go I think. All I need to do is inform the client of the Slime Server IP so it can connect after the apartment server data is loaded.
Time to commit changes so the apartment server can be run from the office server and I don't have to blow up my laptop running 6 things when I only need run 4.
I shouldn't have to make any more modifications to the apartment server for a bit.
Now to handle the Client connecting to the Slime Server...
Once the apartment server data is sent over and loaded I will fire the connection to the Slime Server which will check my token against my IP and then set up a node, same way as the apartment server does. That node will contain the player data, connection ID, character ID, etc.
Alas, a bug. The apartment server is not sending the client the Slime Server IP correctly. This isn't a problem right now but I created an issue so I can fix it later.
Managed to complete all the things I had set for today by 3:20. Wow. Getting a bit better at the networking stuff here. Of course later on with the more complex networking I don't think it'll be so easy, that'll require interpolation and so much more, but that's not for a good long time.
Next;
- Write the DBMan for the Slime Server
- Write the first SlimeGen
- Slime Retrieval
- Populate the Client with the Slime Data (Making sure they load in the right tanks.)
- Write the Slime Code on the Server side including a State Machine that sends state changes to the client.
- Slime Care interactions + logging them
- The Mighty Timer-Chan to pass time and decrease care stats, etc.
- Update Slimes (Saving on Interval and on Logout)
- Rebuild The Game Calander System, I will possibly put this on the Apartment Server though I am not sure yet.
- Handle Ticks on Offline slimes. (I was going to write a whole server to handle it but I think I may have an idea of a way to do it in a thread using a secondary DBMan.)
That's a lot,
Even after all that I still have a long way to go with the Slime Server.
But at least then I will be ready for testing, after a bit of testing I can start on the first slime evolution stage; Childhood. They will grow larger but remain in the tank. There will be a lot of testing at this point and I will add the In Game Internet server which I just call the BBS server in my head. It'll have chat, in world websites (maybe even player websites) and a bulletin board system (BBS Server.). It will require the player to have a computer furniture item, which I will make sure everyone has on start.
Then we're on to Teen when they come out of the tank and wander the apartment, getting into stuff. Around this time I want to add the Hub Servers so players can start interacting in a more personal fashion.
Adult comes after that, they will be full-sized now and able to go out into the adventure mode stuff (when I add it).
Of course during testing I will likely wipe the DB a few times, but I want to reward my testers. I will retain the data from the tests in a separate database so I can go through it. Maybe I can recover some slimes or something? Time will tell.
Anyway, testing is still a ways off, probably not this month... though maybe. I'm not sure I would want to do it through Itch, maybe I should go to Tamagotchi forums and other such communities perhaps? Better to have people who understand the beast try to wrestle it.
Well, it's 4 now and I logged some bugs, got everything on the task board for today finished and my eyes burn so I am going to clock out and vaccuum the rest of my house. My dog, she is stinky.