#Let's start a thread for this? πŸ™‚

1 messages Β· Page 1 of 1 (latest)

latent edge
#

My goal is to have the client run all the combat, it gets all the values from the server.
But to actually run the combat, I still need the combat code.
For example the simplest case: damage = armor - damage
But the server needs to check that logic at some point, to make sure there's not cheating. So the server needs this code too.
If at some point I decide to remove armor, I need to make sure this happens on both client and server.

#

It's not about networking, I asked this question there and they told me that using a random seed for this would be good.
But both my client & server need the most basic combat calculations.
The client to show the combat to the user.
The server to calculate if no cheating happens?

I don't see any way around this?

ruby sage
#

server and client should be sharing the same code fyi. they're the same program that behaves differently when in server/client mode.

#

are you asking how to sync a random number for the damage?