Project Design Questions

Hello,

I am working on a multiplayer game using authoritative server (TCP based using packets)

I have already client working written using Nez(MonoGame) but i choose to port to Xenko because i don’t want reinvent the wheel, i don’t choose Unity because it is too much UI/Editor oriented, Xenko seems to be the best choice

My questions:

  1. Should i have a main scene with multiple child scene (LoadingData, Login, CharacterSelection, GamePlay), or each scene loaded individually?

  2. For each scene, should i have a specific Logic script attached ? LoginScene -> LoginLogic.cs, then handle login + swithing to next scene from there ?

  3. How can i identify entities using an ID (int), i need that to be able to know what entity do what (from server), currently in monogame i have a Dictionary of entities using the ID (int) as key, so i can easily query them

  4. My art workflow is the following, i store individual sprites in folder /sprites/a_beautiful_tree_with_3_frames.png then i generate an atlas of all sprites, then when i create entity, i simple get the right sprite from the atlas (atlas.get(“a_beautiful_tree_with_3_frames”) then create the SpriteAnimationComponent, what would be the best for Xenko, i want keep same workflow (individual sprites, then generate atlas for performance concern)

  5. I load my entity data from JSON, can i use nuget to get that dependency ?

  6. I need a shared project that i use for sharing data between db/server and client, how can i have the server/db/shared projects in the same solution as the client, then reference the project (shared) ?

Thanks!

  1. Sprite sheets get built into texture atlases. Have a look at the Sprite documentation.

  2. You should be able to use JSON.Net (package Newtonsoft.Json) just fine.

  3. It is probably easiest to create your client (game) from Game Studio. Then open the solution in VS and add your existing server/shared projects to the new solution. You should then just be able to add project references to the game project. But you will have to make sure they are all compatible assembly types i.e. Net Standard, PCL, Full .Net framework etc.