#NGO Getting Stats over to other Game Objects

1 messages · Page 1 of 1 (latest)

tulip moon
#

Hey, i am pretty much at a loss here.
My Game is some Risk of Rain Type Rogue Lite and I need to somehow sync Player Stats / Weapon Perks with the Server, so i can calculate the Damage correctly and add the needed "Perks" / Logic to my Bullets that are spawned server sided.
What is the best way to have my local list of Scriptable Objects or custom strucs send to the Server?
List would be something like <EDamageType, Value>.
For SO I implemented a Database so i could use an ID.
kr
Gizmo

hearty nacelle
#

I would assume player stats and perks would be assigned/calculated on the server and you would use a Network Variable struct to replicate those out to the clients.

You could have a network list of IDs that get mapped to actual data on the server.

tulip moon
#

currently I have more Data handled client sided, like damage calculation etc.
Probably not the best but its just a co-op project 🙂
but yeah moving everything to the server is probably way easier and then just sending the data i need for the client side, like the actual calculated damaged to display it in the UI or the Visuals that the client should add to the projectiles, like changing trails etc.

#

Network List and just save the IDs in there and server and client rebuild from there ?
i get how i would do it for scrip. objects, because I can just give them an ID, but not really how you would use it for stats like the list with an Enum DmgType and a damage value, because the list changes like number of Entrys and on which positions the entrys are.

Perks are Scriptable Objects and contain Visuals, Logic and some Bonus Stats to modify the Bullet / Bullet Behaviour. Some of it can just be ServerSided, like Damage, but for example an Impact VFX should send to all clients and not be on the server, I do that atm via Rpc but every client needs to know the bullet and the visuals. Or Should I use a database with IDs for the VFX aswell ?

hearty nacelle
#

Damage numbers and types would have to be sent through RPCs.
I would use the same type SO database for your VFX as well