I was testing IOCOM network topology using Python API (iocompython) and Pyglet game UI library. Network topology for a multiplayer game can be very similar to IO device network: I run server-side app (also python/iocompython) in Amazon’s AWS and client-side in my computers. The “game arena” is analogous to “IO device network” and “player” to “IO device”. Game environment testing is good also because also it requires simple close to real-time communication, it is easy to see a delay of 50ms as a discontinuity in movement, and more fun too.

On server-side

It is was easy. Amazon EC2 is a Linux computer (virtual one tough) to which I connect with the putty terminal. Necessary software like git, CMake, python3-dev, etc. can be just installed to AWS machine by typing “sudo yum install git….” to pytty terminal. Then I use “git clone..” to get “/coderoot/iocom” and “/coderoot/eosal” source code. The iocompython C code /coderoot/iocom/extensions/iocompython builds with cmake to “/coderoot/bin/linux/iocompython.so” on linux (or bin/win32/iocompython.pyd” on windows).

To run the Asteroid game server, use in “iocompython/examples/asteroid-service/asteroidservice.sh”.

On client-side.

The “/coderoot/iocom/extensions/iocompython” C code needs to be compiled for client environment, this makes the Python module. Asteroid game’s client-side Python code is in “iocompython/examples/asteroid-client-pyglet”.

IOCOM in a simple multiplayer game?

Leave a Reply

Your email address will not be published. Required fields are marked *