gzochi

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.

Features

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")
  (schedule-reset))

(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)
	  (schedule-reset)))))

(define (client-connected session)
  (gzochi:join-channel (gzochi:get-channel "trebek") session)
  (gzochi:make-client-session-listener
   (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!

News

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.


gzochi version 0.9 released

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

This release is focused on quality and stability; dozens of memory leaks and functional defects have been resolved, and the server can more reliably handle a large volume of messages and connected clients. A suite of server performance benchmarks is now included in the distribution, along with a handful of minor enhancements and new features.

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


gzochi version 0.8 released

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

This release includes a new memory-based storage engine, built on top of a redesigned storage system that makes it easier to switch storage engines at server boot time. The gzochid transaction manager can now incorporate transactions against external processes into the lifecycle of game application transactions executing within the container. And the entire distribution has been streamlined to make it easier to use to build, test, and develop game applications.

See the NEWS and README files of the individual framework components for more details. The manual has been updated to reflect all new and modified features.


More...

Download

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.

Community

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

Trackers