I am new with unity and with the networking concept. I am making a card game and I am in trouble with the table. The table is where played card are placed and shown to all players. Should I spawn the table from the server using a prefab or should I place the table in the scene in the hierarchy? And in the second case, how the player can interact with the table (they are different objects spawned in different times)?,I am new with unity and the networking concept. I am making a card game and I am in trouble with the table. The table is the place where cards played are shown to all player. My firts question is if the table has to be spawned by the server or if it should be part of the scene in the Hierarchy. If it should be part of the scene, ho the player can interact with the table? (They are different project spawned in different times)
The table object itself should be created on the clients as I’m assuming it doesn’t do anything but act as the surface for the cards.
It sounds like you’re stuck on the actual networking bit, however. The cards that are placed ON the table would need to be synced to all clients so this is what the server should handle. Client decides to play a card, sends that action to the server, server handles creating the card and syncing it to the clients. The way you handle that will depend on what type of networking you’re doing.
This type of turn-based networking is definitely a good starting point for learning networking, but networking is the worst starting point for learning game development. I would highly recommend a different approach that will allow you to work up to networking. Perhaps give a local co-op version a shot and see how you do with that before jumping into the deep end.
Does “The table object itself should be created on the clients” means that the table should be part of the player prefab? Reading the documentation, I found a phrase talking about the fact that function between client and server can be called only on spawned objects. Did I unterstand right? My idea is to have an object (called AI) only server side. This object manage the operations of the game. Probably I am confused about the functions placement, so can you tell me a generic idea of what object i should use and where/when spawn or create them?