Hello, a few questions. And some background context below.
Question A: Is it normal to switch back and forth between Standalone & Play As Client when developing? Or do you just pick one and stay with it forever until your game or MVP/POC is complete?
Question B: For a multiplayer game that also has a single player mode (you can play against another human or against an AI), do you typically develop the whole thing in Play As Client and just somehow use a local host or local server for single player? Or do you use Standalone for single player and Play as Client with dedicated server only for multiplayer? Not trying to go down he rabbit hole of politics of single players requiring an online connection. I’m just trying to understand architecture of how you develop a game that supports both online and single player within the context of the below SwitchHasAuthority part and architecting in general.
Background:
I made a POC for a 2 player card game in NetMode = Standalone and I’m now doing some refactors to 1.) Propertly implement GameState and PlayerState and 2.) Support multiplayer properly using replication & Play as Client with dedicated server.
During the initial POC I was using NetMode Standalone only. But since I started my above mentioned reactors I’ve been switching back and forth between Standalone & Play as Client (multiplayer).
Let’s say my GameMode is updating an integer variable called ClockTime
to = 15. I want a RepNotify for my client to update my Scoreboard to say 15 seconds left. Super simple. That works. But right now, I’m not 100% sure if I should be developing in NetMode Standalone or Play As Client. I would like to ultimately make a multiplayer game but i’m still in the Proof of Concept phase. So I tend to switch back and forth between those two while I’m refactoring this POC.
Switch Has Authority always goes to Authority when you’re in netmode Standalone. That makes sense… However, I only want my client to update not my server because sometimes I switch over to Play As Client… So it seems my logic needs to completely change based on what NetMode I’m in…
Note that my GameState’s ClockTime variable is set to RepNotify and OnRep_ClockTime is my function seen in screenshot.