es_core is an experimental framework for low latency, high fps multiplayer games.
Please read http://ttimo.typepad.com/blog/2013/05/es_core-an-experimental-framework-for-low-latency-high-fps-multiplayer-games.html [3] for a general introduction and some background about this project.
Each logical part of the framework executes in it's own thread. The input thread (main.cpp, also doing the initialization), the game thread (game.cpp) and the renderer thread (render.cpp). The threads communicate with each other using a lightweight messaging system, backed by ZeroMQ.
ZeroMQ provides a safe and efficient abstraction for thread communication. For more details, see 'Multithreaded Magic with 0MQ' [1]. This design also enables easy support for other languages in the future.
The game thread runs on a fixed tick and feeds an interpolating renderer locked at the display refresh speed. On each tick, the game thread updates it's internal state and produces a new render state for the renderer to interpolate towards. For more details on this approach, see 'Fix your timestep!' by Glenn Fiedler [2].
See binaries/README.md for a summary of the applications provided for testing and demo purposes. You can download the latest set of compile binaries from https://s3.amazonaws.com/es_core/es_core.binaries.zip [4].
You will need to obtain and compile the following dependencies:
- SDL 2.0: http://www.libsdl.org/hg.php
- Ogre 1.8: http://www.ogre3d.org/developers/mercurial
- libzmq: https://github.com/zeromq/libzmq
- czmq: https://github.com/zeromq/czmq
At the time of writing, SDL 2.0 is only available from Mercurial, and Ogre 1.9 RC1 was just released but this code was not updated and still uses 1.8.
If you compile for GNU/Linux or MacOS X, you will need scons: http://scons.org/
Use the Visual Studio 2012 project files (MSVC Express will work)
Compiling Ogre 1.8 is likely to give you the most trouble. You will need basic familiarity with cmake, and you may have to fix a few things by hand. I use macports for all the Ogre dependencies (boost, libzzip etc.).
The demo only targets the x86_64 architecture at this time, and ignores i386. You may need to edit the XCode project generated by cmake to set that up. You may also need to install the libraries through macports with the +universal option.
Invoke scons at the top of the es_core folder once you've compiled the dependencies.
Should present no particular difficulties. Invoke scons at the top of the es_core folder once you've compiled the dependencies.
This source code is released under the "Modified BSD License". See LICENSE for details.
Yes please! The best feedback is code and patches. I can also be reached on IRC easily, look for TTimo on Freenode or Quakenet.
- [1] Pieter Hintjens and Martin Sustrik - Multithreaded Magic with 0MQ - http://www.zeromq.org/whitepapers:multithreading-magic
- [2] Glenn Fiedler - Fix Your Timestep! - http://gafferongames.com/game-physics/fix-your-timestep/
- [3] es_core release blog post - http://ttimo.typepad.com/blog/2013/05/es_core-an-experimental-framework-for-low-latency-high-fps-multiplayer-games.html
- [4] es_core binaries - https://s3.amazonaws.com/es_core/es_core.binaries.zip