Hello, world!

gzochi (/zoʊ-ʧi:/) is a framework for developing massively multiplayer online games. A server container provides services to deployed games, which are written in Guile Scheme, that abstract and simplify some of the most challenging and error-prone aspects of online game development: Concurrency, data persistence, and network communications. A very thin client library can be embedded to provide connectivity for client applications written in any language.


For example...

Here's what a gzochi application looks like:

(define-module (jeopardy!) 
  #:use-module (gzochi)
  #:use-module (rnrs bytevectors))

(gzochi:define-managed-record-type button
  (fields (mutable flashing (serialization gzochi:boolean-serialization))))

(define (go!)
  (let ((msg (string->utf8 "go!!!")))
    (button-flashing-set! (gzochi:get-binding "button") #t)
    (gzochi:send-channel-message (gzochi:get-channel "trebek") msg)))

(define (schedule-reset)
  (let ((s (+ (random 10) 1)))
    (gzochi:schedule-task (g:@ go!) (* s 1000))))

(define (initialized properties)
  (gzochi:set-binding! "button" (make-button #f))
  (gzochi:create-channel "trebek")

(define (client-disconnected session) 
  (gzochi:leave-channel (gzochi:get-channel "trebek") session))

(define (received-message msg session)
  (let ((button (gzochi:get-binding "button")))
    (if (button-flashing button)
	(let* ((name (gzochi:client-session-name session))
	       (msg (string->utf8 (simple-format #f "~A wins!" name))))
	  (button-flashing-set! button #f)
	  (gzochi:send-channel-message (gzochi:get-channel "trebek") msg)

(define (client-connected session)
  (gzochi:join-channel (gzochi:get-channel "trebek") session)
   (g:@ received-message) (g:@ client-disconnected)))

gzochi turns this code into a network game server capable of supporting thousands of simultaneously-connected players, and transparently persists the state of all game objects so that data integrity is guaranteed — even in the event of a power failure or hard restart. gzochi prevents race conditions and other concurrency issues by executing every task in its own transactional context, protected from modifications happening elsewhere. Write your game as a single thread, and do away with explicit synchronization: gzochi responds to clients, schedules tasks, and resolves deadlocks for you.

How it works

Thumbnail for gzochi architectural diagram Click the image link to see an architectural diagram of a game application managed by the gzochi framework. The parts of the diagram colored green — namely the client application and the server-side game logic — are the parts you write. Everything else is provided by the framework; use as much or as little of it as you need!


gzochi version 0.11 release

We're pleased to announce the next development release of the gzochi game development framework!

This release is another big one, also focused on enhancements to support game applications running across multiple servers in a high-availability configuration. In particular, access to data is now shared across all servers in the cluster, and session and channel messages can be routed to recipients no matter where they're connected.

The administrative UI has been improved, and tools for inspecting and debugging the various wire protocols are now included in the distribution.

See the NEWS and README files of the individual framework components for more details.

gzochi version 0.10.1 released

Version 0.10.1 of the gzochi game development framework has been released.

This is a bug-fix release that addresses several backwards-compatibility issues related to the framework's library dependencies, and restores support for building gzochi on 32-bit architectures (e.g., i686).

gzochi version 0.10 released

We're pleased to announce the next development release of the gzochi game development framework!

This release is the largest yet by far, and represents the better part of a year's worth of work. The principal thrust of the release is the introduction of the meta server, which allows multiple instances of the gzochid container to share application data while running in a highly available cluster.

Other highlights include improved client message throughput, reduced contention between transactional tasks, and a simplified build with fewer third-party dependencies.

See the NEWS and README files of the individual framework components for more details.



Try it out! The source distribution comes with everything you need to get started building games with gzochi. In additon to the server, source code for several reference client libraries and two complete client-server example games is included, along with detailed Texinfo and man page documentation.


Development for the gzochi project is generously hosted by the nice people at Savannah. Visit the project page for more information.

git repository

git clone git://git.savannah.nongnu.org/gzochi.git (browse)

Mailing lists