• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Sceletor

Networking layer design decisions

2 posts in this topic

Im working on a game project for quite a while now and now Ive finally come to the point where I need to design its networking layer. As always, the dreaded UDP or TCP question arises, and before I waste too much time due to wrong design decision, Id like to present my thoughts here and gather some feedback from you guys...

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.

Pros UDP:
[indent=1]- The engine I wrote which is used by my game is more flexible and therefore better usable by future game projects[/indent]
[indent=1]- With UDP, sending and listening is the same on client and server, which makes it easier to develop[/indent]
[indent=1]- No separate threads for connected clients or accepting connections in the server[/indent]
[indent=1]- I dont need to worry about message fragmentation[/indent]
[indent=1]- I dont need to dump my network layer.. Its tiny, but at least its doing its job so far[/indent]

Cons UDP:
[indent=1]- My current game is a turn based strat game, which is THE standard use case for TCP in gaming[/indent]
[indent=1]- Reliability and ordering is provided, doing this myself in UDP might be a terrible amount of work[/indent]

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..).
0

Share this post


Link to post
Share on other sites
[quote name='Sceletor' timestamp='1325247977' post='4898111']
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..).
[/quote]
Hmm i would have suggested enet bc its tiny and provides everything needed. It builds the connection and you can choose if you want the packets to be reliable/in order/unordered/unreliable. But since you want to code everything yourself i would say take a look at the quake3 network layer. Its really basic, easy to implement and as well gives you reliable data. I actually implemented a quake3 network system with enet and sending unreliable-ordered packets which works great and gives good performance. I know this hides the really low level network stuff from ya but since you want to write a game and not a network lib i would really recommend that.

Enet: [url="http://enet.bespin.org/"]http://enet.bespin.org/[/url]
Quake3 network explained: [url="http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/Quake3Networking"]http://trac.bookofho...uake3Networking[/url] (currently down??)
maybe this helps as well [url="http://ra.is/unlagged/network.html"]http://ra.is/unlagged/network.html[/url]
0

Share this post


Link to post
Share on other sites
Most of your "pros" of UDP aren't really pros of UDP. You don't need a thread for managing TCP at all, for example.

In the end, which way you go depends entirely on what ends up working best for you. Personally, I find that TCP is easier to work with, and would use that where possible. If it eworks for World of Warcraft, it can't be all bad. (More FPS style games or simulations, though, and you'd want UDP)

Regarding "the engine is ready for whatever I do next" -- that's generally not a great reason to make a choice for the current game. It's hard enough to ship the current game -- you should make the right choice for that. IF you need another choice for the next game, then you can re-make that choice later, but making a choice for some future possible benefit that you have no way of proving or testing right now is not generally the smartest strategy.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0