<HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.39 from ./hacking.texi on 12 June 2005 --> <TITLE>Hacking Xconq - Interface Architecture</TITLE> </HEAD> <BODY> Go to the <A HREF="hacking_1.html">first</A>, <A HREF="hacking_10.html">previous</A>, <A HREF="hacking_12.html">next</A>, <A HREF="hacking_35.html">last</A> section, <A HREF="hacking_toc.html">table of contents</A>. <HR> <H2><A NAME="SEC11" HREF="hacking_toc.html#SEC11">Interface Architecture</A></H2> <P> An interface is always compiled in, so it has complete access to the game state. However, if your version of <I>Xconq</I> has any networking support, the interface should not modify kernel structures directly, but should instead use the networking-enabled kernel modification routines. The kernel routines will forward any state modifications to all other programs participating in a game, so that everybody's state remains consistent. </P> <P> A working interface must provide some level of capability in each of these areas: </P> <UL> <LI> Main program. The interface includes the main application and any system-specific infrastructure, such as event handling. <LI> Interpretation of startup options. This includes choice of games, variants, and players. <LI> Display of game state. This includes both textual and graphical displays, both static and dynamic. <LI> Commands/gestures for unit tasks and actions, and for general state modifications. <LI> Display update in response to state changes. <LI> Realtime progress. Some game designs require the interface to support realtime. <LI> Error handling. </UL> <P> The file <TT>`skelconq.c'</TT> in the <TT>`kernel'</TT> directory is a good example of a minimum working interface. </P> <P> Don't let interfaces ever set kernel object values directly, always go through calls that can be "siphoned" for networking. </P> <HR> Go to the <A HREF="hacking_1.html">first</A>, <A HREF="hacking_10.html">previous</A>, <A HREF="hacking_12.html">next</A>, <A HREF="hacking_35.html">last</A> section, <A HREF="hacking_toc.html">table of contents</A>. </BODY> </HTML>