I am beginning to test online multiplayer with TCPSockets. Well, for now just doing it localhost.
I am first making some kind of chat (by the way, TextInput class is plain awesome, love Gosu). And so far it is working kinda well (I'm new to all this networking stuff). But I can tell it is delicate and will crash easily.
I am wondering what tips do you have for this. What do you do when working with this kind of situation? How do you control when a player connects, leaves (when expected, and when unexpected), or internet speeds, etc........ So yeah, tips and whatnot here. Thanks!
I found it much, much, much easier to have one command-line server and a rather dumb visual game. A thin client, if you want to call it that. Making it peer-to-peer without changing the game always resulted in complete havok. The command-line server can then use one DFA/state machine to model every client. I would only trust my life to things that are implemented as DFAs. ;)
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill