Open techninja opened 11 years ago
Alternately, if the server says "p1 hit p2 for the nth time" then the client-side JS can use p1:p2:nth to determine the text. Dunno which is better, just saying.
That is actually how it works currently! A system message comes in and gives source, target type of events, also includes type of weapon involved. Client side then renders the message into text and posts it. The whole reason I would change this to serverside, is to keep it random, AND have a separation of the two systems. If random from the serverside, it would have to know how many different messages there were. If random from clientside, users might all see different messages. Kinda sounds like I need to make it rendered server side just to keep the division clean: clients simply output system messages as they come in.
Where that best fits I don't have an opinion. I'm just saying that you could have a simple rotation and just use a msgid to increment across it.
Serverside is good though because you could expose the play-by-play via a readonly client
Yep, agree there. I think the whole reason I moved it client-side was because It doesn't require a server restart to see changes ;)
Instead of simply "User slammed into user", should alternate between a set listing of phrases. Rendering may need to be given back to the server side to ensure all users see the same messages