SanAndreasUnity/Docs/Multiplayer.md

88 lines
2.1 KiB
Markdown
Raw Normal View History

2020-05-31 17:07:22 +00:00
2019-04-24 23:00:31 +00:00
# TODO
2020-05-31 17:07:22 +00:00
2019-04-18 23:04:18 +00:00
- scene changing: When network (server/client) is stopped, offline scene should be loaded. But, when switching back to online scene, Loader should not load everything again. Instead, only Cell loading should be done, if the new scene is main scene. But, are old meshes/textures destroyed ? Do we leave memory behind, every time when network is stopped ? Or... just exit the game when network is stopped (display message box first ?).
2019-04-16 21:33:09 +00:00
- order of buttons in main menu
2019-04-28 17:13:01 +00:00
- adapt states:
2019-04-26 21:39:33 +00:00
- send button input events to server:
2019-05-01 14:40:48 +00:00
- syncvar for current vehicle and seat - required for newly connected players, who will not get rpc - or... provide additional data when changing state syncvar
2019-04-30 22:33:01 +00:00
2019-05-01 14:40:48 +00:00
- When ped enters vehicle, he changes parent. Is this allowed in Mirror ? Possible solution would be to only change parent of ped model.
2019-04-30 21:29:21 +00:00
2019-05-05 23:45:33 +00:00
- **while ped is in vehicle, network transform should not sync**
2019-04-30 21:29:21 +00:00
2019-05-05 23:45:33 +00:00
- **vehicle is bumping on clients** - disable (or destroy) wheel colliders, and sync them - this should not be done on local player, see below
2019-05-01 14:40:48 +00:00
- when exit vehicle anim is finished on client, it is repeated - change wrap mode
2019-04-28 20:57:04 +00:00
2019-05-05 18:56:46 +00:00
- **vehicle syncing is too laggy** - local player must control the rigid body ; server will validate position/rotation/velocity changes, and correct them if needed ; when server detects collision, or applies force to rigid body, he will override state of rigid body ;
- stats window
- display a message to user when network is stopped
2019-04-26 22:31:13 +00:00
2020-05-31 17:07:22 +00:00
# Potential problems
- server will have multiple Cell focus points - the game can lag too much, so server has to run on a dedicated machine
# Scripts that need to be synced across network
## Ped
variables:
- id
- transform
- is walking / running / sprinting
- heading
- is aiming
- is firing
- current weapon
- current vehicle - not needed - synced in Vehicle
- aim direction
events:
- fire
- enter/exit vehicle
- jump
## Vehicle
variables:
- id
- transform
- car colors
- linear velocity
- angular velocity
- steering angle
- acceleration
- brake
- peds which occupy seats
## Weapon
variables:
- id
- ammo in clip
- ammo outside of clip
- ped owner