Oafkad Posted June 26, 2022 Share Posted June 26, 2022 We have two flows to spawning critters in the game currently. When dealing with game loading we've got a pretty simple process. During the start flow the egg and cat factories initialize and send their instances out to anything that needs it. One of those things is our GameLoader class. That class then waits for the Client to connect. Once the client connects to Twitch it tells all the different services that it is ready to be subscribed to. At this point the GameLoader iterates through all of the savedata and spawns either eggs or cats depending. It is likely that later this will actually only spawn cats when the player returns from being inactive. So you may see this change slightly in the future. The second flow involves player interactions. Whenever a player speaks we will check to see if they have any Moosecats. If they have non that tells us that they are a first time user. From there we will tell the SpawnEggCommandHandler to handle a spawn request. It will send that request to the Egg factory. The Factory wil lgenerate a new Egg Prefab that includes the CatIO data for the Moosecat. From there the egg is spawned and that data is sent to MooscatIO. Once the data is catalogued a save request is made. And that's all there is to it! These are the current two supported means to spawn cats in the Twitch Moosecats game. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.