wight-airmash / ab-server

2d multiplayer action game server for Node.js based on WebSocket communication.
https://airmash.online
MIT License
54 stars 21 forks source link

Enemy players health is visible #22

Closed spatiebot closed 4 years ago

spatiebot commented 4 years ago

I don't think the original server showed health and energy of players of another team. I'm not sure, but Starmash did only show health percentage of your own team.

wight-airmash commented 4 years ago

It's a part of the protocol and the frontend. For example, server hit_player packet contains health and healthRegen: https://github.com/airmash-refugees/airmash-frontend/blob/0a1b87dc98ee3148bb70e4926b179bce8108ed88/js/Network.js#L852 And when the client receives the packet, it updates each player values and uses these to determine to show or not to show damage particles.