Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

How best to manage non-player game objects that can move or be destroyed?

$
0
0
If you have a 'moveable' or 'destroyable' object in your multiplayer game (that is not a player), what is the best way to manage it?
i.e.
S1) player shoots rifle/bullet, hits block, block moves or is destroyed from game.
or
S2) player shoots bazooka/missile. Missile could impact other missile.

A) State change Trigger callback
- From Trigger, proxy simulate the hit/move/destruction on each proxy.
Example: Bolt Sample project - WeaponRifle.Fx()
Risk: (I think) there a chance that it is simulated incorrectly on proxies. Best for visuals and non-critical game items (UI health bar, explosions).

B) Global Event call.
- More precise than #A. From server, use to instantiate(impact/move/destroy) the Object (not Bolt Entity) on clients.
Example: http://forum.photonengine.com/discussion/7350/networked-projectiles
Event Details: https://docs.google.com/document/d/1CvN1E2GOvd_AHnkFOSMSJTR96EBGhPRDPgPMiOuJoSg/edit#heading=h.4sdkjxnohlzo
http://doc.photonengine.com/en/bolt/current/reference/events
Risks: Sync issues could still happen (false collisions) for the non Bolt Entities like the projectile colliding into each other.

C) BoltEntity.
- Use Bolt Entity to manage. 100% accurate. Can be server authoritative.
Example: Bolt Sample project - Elevator.
Risk: Increases traffic on network, server memory / cpu (potentially).


Based on what I've read, people are leaning towards #B. However, even with the simple example of the elevator, #A BoltEntity was chosen.

Thanks for the help / insight!

Viewing all articles
Browse latest Browse all 15755

Trending Articles