Kornelius A. Prell bio photo

Kornelius A. Prell

A pragmatist who brings ideas to life in digital form... like a modern Frankenstein

ditemis Email Twitter Github Stackoverflow Xing
RSS

This post was originally published on netzkaempfer.com. The old blog and domain is no longer active, but I’d still like to keep my old articles about web-based game development.

Although we choose JQuery and PHP after intense prototyping as a foundation for our game, the technology isn’t capable of some functions we need.

If you want to send content from a webserver actively to the connected HTTP Clients, you have to go with constant polling. The Websockets protocol provides relief and permits bidirectional connections between web clients and servers.

Chat feature

A first usage of this feature can be seen in the chat function for Social War. It allows players to chat with their friends, their alliance or all online gamers. For this feature we use Node.js with socket.io, that falls back on Long-Polling or uses Websockets, depending on the abilities of the client.

A simple introduction provides michael mukhin.

The integration in the PHP and JQuery stack is simple and as Node.js is a separate webserver the module can be developed and maintained independently. I look forward to implement a fight system, that behaves in “realtime” with Node.js.