From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2500ce10d7c27120 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!wns13feed!worldnet.att.net!216.196.98.141!border2.nntp.dca.giganews.com!nntp.giganews.com!news1.optus.net.au!optus!newsfeeder.syd.optusnet.com.au!news.optusnet.com.au!not-for-mail Date: Wed, 09 Nov 2005 17:53:02 +1100 From: Ross Higson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: New Ada ANSI console/X terminal game References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <43719ccf$0$25857$afc38c87@news.optusnet.com.au> NNTP-Posting-Host: 211.30.67.127 X-Trace: 1131519183 25857 211.30.67.127 Xref: g2news1.google.com comp.lang.ada:6319 Date: 2005-11-09T17:53:02+11:00 List-Id: David Trudgett wrote: > For those who may be interested, I've just posted to my website a > first release (version 0.99) of my "High Seas Battleship" network > game. You can find the source code for it at: > > http://www.zeta.org.au/~wpower/dkt/programs/high-seas-battleship.tar.gz > > It's a full-screen colour text-based application written for Linux > console or xterm, but should work on most ANSI compatible terminal > devices. My program makes use of Samuel Tardieu's AdaSockets, which I > doubt works on Windows (the manual seems to mention only Unix and > OpenVMS), so I likewise doubt that High Seas will work as it is under > Windows, even assuming that there is a suitable ANSI terminal > available for Windows. It should be easy, however, to adapt the comms > layer to use a different sockets library, if desired. > ... > To compile under Linux/Unix, assuming you have GNAT and libadasockets > installed, you will probably just need to edit the Makefile and run > make. > David, Nice. Since you already use some GNAT-specific packages, you could also use the package GNAT.Sockets. Then you wouldn't need AdaSockets. It is easy to modify your program to use GNAT sockets. I can email you the source changes if you want - it took me about 15 minutes to convert, since nearly all the changes are in the class_comms package. Either way, once you have a native windows executable you could use my redirect program to run it. For example, instead of entering your commands: battleship player_1 wait battleship player_2 connect localhost you would execute the programs under redirect: redirect /noedit /uself /mode=vt100 battleship player_1 wait redirect /noedit /uself /mode=vt100 battleship player_2 connect localhost The redirect options ("/noedit /uself" etc) tell redirect how to emulate the mode your program appears to expect - especially the keyboard emulation. Redirect is part of the Ada Terminal Emulator package. It uses GWindows and compiles under GNAT 3.15 or GNAT GPL 2005. But you don't need to compile it - just download the compiled version from: http://www.members.optusnet.com.au/~rosshigson/ Ross.