• 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
maunovaha

In search of a game server technology

4 posts in this topic

Hi,

 

I recently made a small multiplayer online game (MOG) "test" using node.js / socket.io / express.js etc.

 

However, although I liked them, I don't like the fact that error handling is really tricky, if something goes wrong, it is really hard to trace down.

 

Therefore, I began to wonder, how big boys are doing game server development?

 

What I wan't to achieve:

 

- To develop MOG which runs in the browser and communicates with the server over web sockets. Hence, I would like to program server-side using Java, not JavaScript. The whole thing would be part of my M.S. thesis. I try to suggest to my supervisor that I program a browser-based MOG using web sockets (TCP) and trying out different application-level techniques (I made a research about these earlier) to make it work despite variance in latency and packet loss.

 

But, this is the point where I am really clueless, and I am having hard time to find the "right" tools for the job. However, I did find at least one game (bombermine.com) and it uses jetty so I think that is one option. (?)

 

However, I would like to hear your opinions and suggestions for this matter. Thus, it would be really awesome if someone knows some sort of tutorial(s) or a book(s) which I should read regarding game server programming. I am worried about the multi-threading issues which I am not that familiar with.

 

Thanks!

 

Regards, Mane

Edited by maunovaha
0

Share this post


Link to post
Share on other sites
Most MOGs currently out there fit one of two molds:

1) They use a native download client (written in something C-like, perhaps with a scripting language like Lua or Python added) and they use plain TCP sockets for communicating game data to/from the servers. Note that Unity plug-in games also fall in this camp, because the plug-in itself is written in something C-like and doesn't use the surrounding web stack.

2) They use a technology like Flash or HTML5, and use a more relaxed "MOG" definition, where immediate real time is not needed. Examples include anything from Farmville to Neptune's Pride. These kinds of games use HTTP batch-style communications, although with proper double-buffering, you can get latencies down to 100-200 milliseconds or so using this method.

Websockets aren't yet the "major" use case, that's optimized the most -- but it's certainly up and coming. We use it at IMVU for some real-time interaction, and it works okay (not as well as straight TCP, but better than HTTP.)
What you want is a nice library for websockets on the server side, because the negotiation and set-up of the server side is a little bit fiddly. We used some websockets library for our Erlang based server, although it had significant challenges for us and we ended up changing a lot of that code.
Another nice library that works well is socket.io, which is natively hosted inside the node.js server package. It then provides a nice wrapper on top of web sockets for messaging that the client requests and is available as a JavaScript library (that the server provides.) socket.io also falls back on other methods (Flash, HTTP polling, etc) when real websockets aren't available.

For Java servers, a quick Google says that TooTallNate's Java-Websocket library is the top hit (in addition to some native Java websocket support in the JDK from Oracle.) I have no idea whether they're any good or not.

For what it's worth: If I were to build a HTML5+websockets game today, that scaled to dozens of players (not worrying about 1000's of players,) I would very likely use socket.io, and write the server-side in node.js. The benefit is that I can re-use the same JavaScript code on the client and on the server. The draw-back is that I have to write my server in JavaScript, and I prefer more strongly-statically-typed languages...
1

Share this post


Link to post
Share on other sites

hplus0630,

 

Thanks for excellent reply. I have been refreshing this post like a maniac. :)

 

However, what worries me is the fact that you brought socket.io up again and using of node.js (Don't get me wrong, I love them) but, I would like to try some other solutions as well. Namely, the error handling alone and the draw-back you also mentioned "..I have to write my server in JavaScript, and I prefer more strongly-statically-typed languages... " is one of those reasons why I am looking for alternatives. I might be wrong as well, maybe the socket.io and node.js is the best combo for making browser-based mog's. However, I think that part of this is just this "hype" which is going on & other part that I am not sure what I am looking for, so it makes me to question this whole node.js approach - it seems so new to me that people must have used some other stuff at game server-side for a long time.

 

I think the relevant questions here is:

 

- Do you think that I can make equally good MOG (in terms of networking) by using any of the approaches.. (rolling out with js or java) ?

 

- Do you think that programming game server which is not running in single-thread like node.js will be so hard that it is not worth to even try? (With node.js it was pretty easy to store connected players currently at the server and do all kind of things). I am bit of unsure how to synchronize the stuff between threads etc.

0

Share this post


Link to post
Share on other sites
You can absolutely make an equally good game using any other technology. The only question is how much effort you have to spend.

socket.io / node.js is hyped, because it's easy to get started, and "the skids are greased" -- there are enough examples and documentation to make it easy to get to the point of "proof of concept." It's the path of least resistance.

If you want to do it on top of Java, or Erlang, or C99, that can totally be done, although you'd likely have to do a little more research on your own, and you'd have slightly fewer introductory examples available to get you going.

If I wanted to use Java, I would start with TooTallNate's Java-Websocket library and read the documentation surrounding that, and see how far that could take me.
0

Share this post


Link to post
Share on other sites

Yea, valid points.

 

I need to think about this more once I get back to home, I even tried to contact makers of bombermine but didn't get reply from there. Hopefully, they will send me something later, until then I try to research more or even make small poc with java -stuff.

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