3 ms·
I run my logic on the client and the server, and I'm not doing it wrong. Your techniques may work for you but don't make the mistake of thinking they're univer
by reitzensteinm 6y ago
I run my logic on the client and the server, and I'm not doing it wrong.
Your techniques may work for you but don't make the mistake of thinking they're universal.
- Hendrikto 6y agoWhy? For latency reasons?
- filleduchaos 6y agoI didn't say they were universal. I do stand by what I actually said: for this category of games, running logic on the "client" isn't the best of architectures.
- reitzensteinm 6y agoI run it on both. If you need to provide some UI context, being able to reach in to the state and query it is a life saver. Imagine Advance Wars. Their unit movement is very subtle. You can choose the path the units travel, which can turn in to a forced action if you stumble onto an ambush unit. When you reach the end it tells you the outcome of your battle before you confirm you want to engage in it. Doing logic only on the server and sending down a list of possible moves is going to get pretty heavy. Querying for each square of movement is going to be a latency nightmare. Edit: actually, I think the movement ambush is from a clone. Although the arrow movement from the original is still complicated. That doesn't weaken the argument: imagine getting half way in to dev and realizing you can't add that feature with your architecture.
- filleduchaos 6y agoI haven't played Advance Wars, so that definitely affects my answer, but by looking at it and reading a couple of reviews it seems rather like chess (and was directly compared to it) - and chess is something I've implemented like I describe with no problem. It's surprising how far you can get by putting some thought into the data interchange format between your client and server.
- reitzensteinm 6y agoChess with potentially thousands of moves per unit.
- jbperry 6y agoOn any given turn there really isn't that many possible moves. https://chess.stackexchange.com/questions/4490/maximum-possible-movement-in-a-turn https://chess.stackexchange.com/questions/4490/maximum-possi...
- peterstensmyr 6y agoThey are describing Advance Wars, not chess.