Posts Tagged ‘networking’

Developing Real-time Network Game

Just recently, one of my friend visited me and like always we had a chat about the gaming industry in Indonesia and IT problem in general. The topic mainly about the future of Indonesian gaming industry and some problems related to the studio. So let’s discuss about it.

I was once a server programmer in a game studio for more than 1 year. A friend (not the one who came recently) easily convinced me to join with this studio as a server programmer since I was really curious about how to build a server for multiplayer game, also I have interest in network programming since I was in the college but never had the chance to do the implementation until he asked me to join to help him build a server for the game he developed. Honestly I learned a lot from there, technically and also the background of Indonesian game development.

We know that Indonesia started to produce many games that have good quality, primarily in mobile. Several years ago, Indonesia’s video game company are just limited and dominated as outsourced from the big company overseas, as far as I know this happened when I was still a student in the college, c.a 2006. After the booming of smartphone in 2008-2009, the gaming industry was also grown with many development platform that developers can use. Android, iOS, BlackBerry and even Windows Phone. Many game engines — open source or commercial — appeared such as Unity3D, Unreal Engine, UDK (derived from Unreal Engine), MonoGame (open source version of Microsoft XNA). The number of developer grown because the easiness of using all those matured game engines, with no exception of Indonesia developers.

However, something is bothering me. Although the number of Indonesian developers grown, the prominent development choice are mobile game and some Adobe Flash based games. Now I wonder, where is the legendary MMORPG game that used to be in the news in early 2010, Nusantara Online? I just searched it in Google before write this post, and found almost nothing about that project anymore. Did the developer has been disbanded? Why did the project stopped after that much of publication?

I done some research on network based game in Indonesia, perhaps a game with real-time multiplayer feature that are developed for mobile or PC, but found nothing. Many games that are developed and using network feature mainly use it only to submit the score or progress, which can be easily made using web services API which many web developer without much knowledge of game development can made in relatively short time.

When I worked in that game studio, the game I worked on are a Flash based game. The first concept of this game are MMORPG where many people can interact each other, however in the middle of development, the concept was changed into simple online RPG (not massively) simply because the story itself doesn’t suit to be build into a MMORPG. The change actually can be handled with simple web service like the one I told above, however I insist to use network or socket programming so I can learn something from this project and also benchmark the performance when this system is connected by many players at once. Then it was prematurely halted in the middle of development without any good reasons. Although I believe the main problem was management and development process, I will not talk about it since the topic in this article is about the network game.

Since that day, I still have the urge to develop a MMORPG until now. I was once read an online discussion about Nusantara Online, there were too many bugs and the game itself lagged when being played. From what I read, it was primarily the problem in the client graphic engine. They used engine which are not primarily developed for video game, also since the game itself developed for so long it might also cause the engine outdated. Moving to the newest engine should be problematic especially when the API has been changed too much. Perhaps the other factor for the game performance are the server side.

Based on my experience, I can tell that developing the real-time server application for MMORPG is difficult technically. Here are some of the factors that I can tell:

  • The server developer must have knowledge not just in programming language, but also in tweaking the application so it can run smoothly when are being connected by many players.
  • The server developer also need to have a good patience and ready to be placed in development environment that basically just consists of console windows and text file for debugging the problems in the server side.
  • Server testing usually depends on the client. Even though if we can create automated test script, user testing still must be done from the client. Imagine when the developer need to recompile the application each time he found errors and execute the client binary.
  • Scripting language usually causing performance degradation, so the primary options for the server development are compiled language which dominated by C or C++ (and C# as I developed the application). As for as I know, C and C++ are not popular languages for development, especially in Indonesia, and the university never teach past the basic when I was in college. Currently many of scripting languages can be alternatives because they employ Just-in-time (JIT) compilation so the performance should be better, although it’s still fall far behind the compiled application.
  • Another resource is needed when you’re dealing with server and network. If the server developer has this knowledge, it even better since it will support it’s tweaking and testing effort.
  • Communication skill with front-end developers must be really good, and the willingness to document the server API because the server will surely getting complex from time to time.
  • Other indirect factor is the font-end developers, are they understand the concept behind socket programming or not?

Beside of all those factor, the teamwork and communication of the team as a whole are also important. The server programmer must know the design of the game so he can decide what is the best way to implement the functions, the project manager and game designer also must try find out the difficulty that might be happened when implementing something with the server programmer. So, that’s developing a real-time network game is really hard and challenging, and perhaps that’s why not much people or game companies want to try doing this.
I also had a chance to search a network game engine from Google. I found some of this so called “network engine”, however many of them are focusing in the client side, not the server side. Even if there are engines that promised to have server side one, I believe it’s hard to develop with, due to the complexity and performance limitation because you add another layer of processing with an engine. You also will have problem in tweaking since you don’t know the core process of the engine unless you learn the source code by yourself. In the end, one of the viable solution is designing and developing the server engine from scratch. If I have plenty of spare time (and good partners), I will try to continue my effort in creating one simple MMORPG, perhaps a web-based one because currently you can implement socket programming (not fully) with WebSocket protocol. I’ve done a little experiment with WebSocket and NodeJS but they’re still to early to be published. And well, the basic problem in WebSocket is latency since the WebSocket is TCP based where usually a real-time game uses UDP protocol. I also have a plan to open source it, perhaps it might be a good contribution for people who want to try to be a server developer.

It’s my dream to build a game by myself or by my team. Yup, as one commenters in one of my previous post, “keep dreaming”, then I shall. And I’m going to do it, and realize it! Hey, perhaps I will be the one who successfully create an MMORPG in Indonesia. :D

This entry was last modified on: September 7th, 2017 at 1:29