Play as a game server

I want to try writing a simple game for the web using websockets and HTML-5 technology, and I think about it using the Play and Scala platforms. However, the type of game I want to make is a world with a permanent world where everything happens, and not just as consequences of the player’s actions, but which means that he doesn’t correspond to the philosophy of stateless Play. I tried to launch a separate thread in the Play application, which will act as a regular permanent game server with a working world, and it seems to work. How can you comment on this?

  • Will I run into some big problems with this approach?
  • Is there a better solution and setup for this? What do ppls usually use for things besides standalone (non-http) game servers?
  • Can you share an interesting experience dealing with a similar problem?
+5
source share
1 answer

Do not confuse persistent with "always current stream update information . "

In most cases, such games simply save the latest update time and calculate new values ​​based on the time elapsed between the current and last update. Any web infrastructure or technology can do this. Even if I'm a big fan of the playframework / junkie, I don't think that a pushy argument alone is enough.

But if you need to:

  • good integration with websockets,
  • Maintain heavy traffic
  • massive concurrency without massive servers

then indeed, Playframework may be your choice.

+4
source

All Articles