Introduction

Introduction — Separating NetHack game servers from window interfaces

Synopsis


#include <nhproxy/nhproxy.h>


#define     NHPROXY_MAJOR_VERSION
#define     NHPROXY_MINOR_VERSION
#define     NHPROXY_MICRO_VERSION
#define     NHPROXY_CHECK_VERSION           (major, minor, micro)
enum        nhproxy_bool_t;
void        (*nhproxy_errhandler)           (const char *error);
nhproxy_errhandler nhproxy_set_errhandler   (nhproxy_errhandler new);
void        nhproxy_error                   (const char *fmt,
                                             ...);

Description

NetHack and its variants communicate with the user via windowing interfaces. These are designed to be modular so that different windowing interfaces can be included when building the game. This flexibility is required both because windowing interfaces are typically much less portable than the game (and thus will not normally support every platform that the games does) and because users have varying preferences as to the style of interface they prefer.

NetHack Proxy takes this abstraction one stage further by allowing the game and the windowing interface to run in seperate processes and even on seperate computers. This has a number of advantages:

  • The game server can run with special priviledges without requiring that the window interface and all the libraries it depends on be secure.
  • New window interfaces can be created without the need to either work within one of the NetHack development teams or to include the source of a version of NetHack as part of the window interface.
  • Window interfaces can be designed to work with more than one variant of NetHack.
  • Public game servers are no longer limited to text-based windowing interfaces.

Details

NHPROXY_MAJOR_VERSION

#define NHPROXY_MAJOR_VERSION	0


NHPROXY_MINOR_VERSION

#define NHPROXY_MINOR_VERSION	9


NHPROXY_MICRO_VERSION

#define NHPROXY_MICRO_VERSION	0


NHPROXY_CHECK_VERSION()

#define     NHPROXY_CHECK_VERSION(major, minor, micro)

major :
minor :
micro :

enum nhproxy_bool_t

typedef enum { nhproxy_false = 0, nhproxy_true = 1 } nhproxy_bool_t;


nhproxy_errhandler ()

void        (*nhproxy_errhandler)           (const char *error);

error :

nhproxy_set_errhandler ()

nhproxy_errhandler nhproxy_set_errhandler   (nhproxy_errhandler new);

new :
Returns :

nhproxy_error ()

void        nhproxy_error                   (const char *fmt,
                                             ...);

fmt :
... :