Menu

HackNet<->NetHack GUI code

2001-03-06
2001-07-24
  • Trevor Powell

    Trevor Powell - 2001-03-06

    Warwick Allison suggested to me in an e-mail that one way to lessen the workload for HackNet would be to utilise NetHack's display API, which should in theory allow any current NetHack client to be compiled into HackNet.  This would mean you could play using whatever your current favourite interface might be.

    In practice, however, there actually are some differences between NetHack and HackNet, in terms of interface.  HackNet's display class has a concept of a 'stack' of items, for example, whereas NetHack's interface is only ever aware of the topmost object on any square.  HackNet will undoubtedly require more commands than NetHack, so graphical UIs are liable to be missing menu options for the added commands..  things of that sort.

    From a philosophical standpoint, I made the decision early on to reimplement most of NetHack's functionality in a cleaner, object oriented, and easily comprehensible format (no global variables named 'smeq' allowed!).  The NetHack UI implementations are all built around NetHack's basic coding standards, and assume the plethora of #defines, and so actually shoehorning those implementations into HackNet may not be as easy or as pleasant as it first seems.  Do people think that using the existing NetHack UI code is a good idea, in general?  Or is it liable to cause more trouble than it's worth?  If someone is interested in looking into this issue, please don't hesitate to send me an e-mail (the Nethack UI code scares the willies out of me, so I'm not liable to do much with it myself!)

    In other news, the code is coming along slowly, but consistantly.  On-track for an initial public CVS commit this coming weekend.  Not that there's particularly much to see yet -- just multiple clients connecting to a server and freely walking around within the randomly-generated levels.  No objects, no monsters, no classes, no stats..  That comes next!

    Trevor Powell

     
    • Justin Clift

      Justin Clift - 2001-03-07

      Hi,

      I believe the GUI portion of the code should be as removed as possible from the "operating world" of HackNet.

      I mean this from the standpoint that someone down the track will have an idea for a completely different interface (different layout, first person, VR, whatever) and then write it and join in HackNet games on exactly the same server's as everyone else.

      So, I believe the GUI front end should communicate to the server back end with a defined protocol that doesn't limit each other.

      If that's possible that is.

      :-)

      Regards and best wishes,

      + Vapour

       
    • Trevor Powell

      Trevor Powell - 2001-03-07

      This was one of HackNet's design goals, as well as one of NetHack's goals (this is how NetHack has TTY, X11, GTK, QT, and other UIs all through a single interface).

      HackNet's network packet format is, of course, easy to pull out of the current source code, so if someone wanted to write their own client from scratch, it would be easy to do.  However, there's no need to do so:  HackNet already has code to read the packets and keep track of a current "game state", which can be read from by whatever UI display you want to write, whether TTY or 3D-accelerated first-person.

      My original question wasn't really whether it should be possible to use a NetHack GUI for HackNet, but whether it was a good idea to do that as a default, standard interface, rather than developing custom HackNet interfaces.  My worry about using NetHack's interfaces is that by using NetHack's interfaces, we're almost certain to need to use their config.h and other configuration files, instead of using the more modern autoconf system, at least for client compilation.  Again, this falls squarely into the category of "If somebody patches things to make this work, let me know and I'll integrate the patch into the source tree".

      And of course, that falls squarely into the category of "Things that won't happen until I get off my duff and check an initial set of code into CVS"  :)  Soon, I promise!

      Trevor Powell

       
    • Michael Spall

      Michael Spall - 2001-07-24

      I think that you should avoid the nethack GUI code.

      The modifications necessary to convert nethack GUI to Hacknet are porbably not worth it.

      As was suggested above, keep the interface clean and simple and as the proverb says, if you build it, they will come.

       

Log in to post a comment.

MongoDB Logo MongoDB