teeuniverse / teeuniverses-old-draft

A retro multiplayer shooter
http://teeworlds.com
Other
7 stars 1 forks source link

Add NetObject_ModAPI_Integer and NetMsg_ModAPI_GuiGauge #62

Open necropotame opened 8 years ago

necropotame commented 8 years ago

Gauges are a way to display values updated at each tick (NetMsg are not well suited for that). The server could send some NetObject_ModAPI_Integer at each ticks. Then, the server send a NetMsg_ModAPI_GuiGauge where the SnapID of the NetObject_ModAPI_Integer is provided. To render the gauge, the client take the value in the last snapshot.

A style ID can be provided to show the gauge in a lot of manner: labels, graphics, bars, true gauge like in a car, .... We can start with just labels.

Later, we can also add Float, Strings, Time and other types of data.

This is linked to the implementation of custom HUD.