Up until now, I had a monolithic application, where the server was only a bundle of gamelogic classes, but for several different reasons, Im planning to make the game online only, with a central server in the web and downloadable clients.
I experimented already with a small network layer using UDP for testing in my LAN, but since package loss became apparent I have to decide now which way Ill go with networking in general.
Right now I think trying to make my own reliability layer with UDP is the way to go, but the reasons against that are equally important as the reasons in favor of it. The following listing is ordered by importance.
- The engine I wrote which is used by my game is more flexible and therefore better usable by future game projects
- With UDP, sending and listening is the same on client and server, which makes it easier to develop
- No separate threads for connected clients or accepting connections in the server
- I dont need to worry about message fragmentation
- I dont need to dump my network layer.. Its tiny, but at least its doing its job so far
- My current game is a turn based strat game, which is THE standard use case for TCP in gaming
- Reliability and ordering is provided, doing this myself in UDP might be a terrible amount of work
Do you think this is the right decision or did I misjudge some points here?
Using an already existing library (raknet or such) isnt really what I want to do, since I would like to write it myself (yeah, Im mad, I know..).