1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
Eris, the WorldForge client entity library
Eris is designed to simplify client development (and avoid
duplicating effort) by providing a common framework to deal with
server communications. Notably, Eris encapsulates most of the work
in getting Atlas entities available on your client, logging into
a server, and managing updates from the server. Thus it can be
considered as a session layer above Atlas, providing persistent,
in-memory objects as opposed to Atlas ones (which are transient). It
handles the client-side implementation of the meta-server protocol,
and querying game servers;
out-of-game (OOG) operations (via the Lobby and Rooms), and most
importantly, in-game (IG) operations such as entity creation,
movement and attribute updates.
Eris provides a generic 'Entity' class, which you are free to
sub-class and provide to the system (by registering a factory
with the World); thus you are free to create different classes to
handle characters, walls, vehicles, etc as your client dictates. An
alternative approach is to create peer classes, and connect them to
Eris via callbacks. Eris makes extensive use of libSigc++, which must
be correctly installed and functioning on your system. Familiarity
with signal/slot programming concepts is essential for using Eris;
the libSigC++ home-page has some examples. Gtk+ or QT signal systems
also provide a good introduction.
Note that Eris does NOT encapsulate Atlas for you. Your code must
still perform the useful work, such as generating operations, and
analyzing attributes. Eris simply makes getting this information much
easier. Also, an understanding of the Atlas Objects specification,
and how it is applied in practice will make working with Eris much
easier. Eris does permit you to ignore lower-level Atlas issues
such as Codecs and connections.
For examples of using Eris, see 'silence' in forge/clients/silence;
this is a simple NCurses / Gtk based text client that demonstrates
how to use Eris. For larger, graphical examples see Sear, Apogee or
Dime, all found in forge/clients/.
The INSTALL document tells you how to compile Eris; note that if
you plan on distributing binaries of a client compiled with Eris,
you may wish to consider statically linking. As the Linux C++ ABI
improves this may become less critical, but at present even minor
difference in compiler and library versions can produce strange
errors at runtime.
Finally, Eris is a very open system; if you have an entity utility,
processing method or other concept you think is reusable in many
WorldForge clients, please let me (James Turner) know about it for
possible inclusion.
|