I was thinking about implementing an online server-client game and here is what I came up with:
1. The game is driven by events (if a player gets shot, an event is generated, etc).
2. The event is converted to some sort of format and sent to the server.
3. The server sends it back to all clients but the original sender.
4. The clients convert it back and make the necessary changes in game logic.
Does that sound like it could work? I haven't been able to think about a better solution myself.
Now the real question is (if my solution makes sense), what format should I use to send my event classes through UDP sockets? Should I just convert their data to strings? Are there popular solutions to this?