How is the typical login, loading the level and spawning handled?
For example:
- Client sends "iwanttologinwithcharacterx"
- Server does some validity checks and instantiates characterx
- Server sends back "loadlevelx"
- Client sends "iaminloadingscreen", when finished sends "finishedloading"
- Server sends "spawnyourcharacterx"
OR just after the "iwanttologinwithcharacterx" the server tells the client to handle steps 3, 4, and 5 without interaction?
I'm confused about what would be the ideal approach with the least room for errors.
Some info: The level in which players begin is always the same. Players can have multiple characters and during the game they often switch levels (this would be linked to my first question, how would I handle that cleanly? Don't destroy the playerobject between level load and just change their positions accordingly?)