I've finally made some major headway into a reliable networking layer for my games. It's taken longer than I would have liked - but I'm quite happy with the result. It's very weird where a screen change on one device, triggers a screen change on another. I guess I've always been fascinated by networking (it's black magic I tell you!), so I guess it isn't so surprising I found it cool.
Android development has an uncanny ability to make you feel really stupid. The API itself is pretty bulletproof, so any and all issues are almost always your own fault. I've have more than a few typos cause some rather strange bugs. I do wish the debugger was more reliable though - unhandled exceptions don't break on the throw statement like in other development environments - and the debugging service likes to crash quite often.
While the API itself is pretty bulletproof - networking is decidedly not. Lots and lots of things can go wrong (for obvious reasons), and I've found multicast sockets to be particularly troublesome. I'm not sure if packets are actually being lost, or taking an exceedingly long time to be sent. Java's networking implementation is very slow by default and it takes a fair bit of messing to get even TCP packets to be sent with any kind of urgency. Without a few performance flags being sent, it was taking up to a second for a packet to even be sent.
0 comments:
Post a Comment