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!news3.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!canoe.uoregon.edu!newsfeed.news.ucla.edu!newsfeed.berkeley.edu!ucberkeley!newsfeed.pacific.net.au!nasal.pacific.net.au!not-for-mail Newsgroups: comp.lang.ada Subject: Re: New Ada ANSI console/X terminal game From: David Trudgett Organization: Very little? References: <43719ccf$0$25857$afc38c87@news.optusnet.com.au> Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:qCsLTZbjHfXQltpTlbxy3r2ldlQ= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 09 Nov 2005 19:34:06 +1100 NNTP-Posting-Host: 61.8.39.199 X-Complaints-To: news@pacific.net.au X-Trace: nasal.pacific.net.au 1131525541 61.8.39.199 (Wed, 09 Nov 2005 19:39:01 EST) NNTP-Posting-Date: Wed, 09 Nov 2005 19:39:01 EST Xref: g2news1.google.com comp.lang.ada:6322 Date: 2005-11-09T19:34:06+11:00 List-Id: Ross Higson writes: > 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 > > Nice. Hope you like it! :-) I take it you got it working on Windows, then? > > Since you already use some GNAT-specific packages, you could also use > the package GNAT.Sockets. Then you wouldn't need AdaSockets. Actually, the only GNAT-specific package I used was the GNAT.OS_Lib one, and that was purely for access to environment variables which, at a pinch, could easily be removed from the program. On the other hand, sockets are kind of essential for a network game! ;-) I tried to avoid GNAT-specific packages mainly for portability to other compilers. However, it could be a possibility to have two versions: a GNAT.Sockets and an AdaSockets version. How much mucking around that would be in practice I'm not sure at the moment. Clearly, though, if the code is already written for me, then that's already a bit less mucking around! :-) > 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. Hey, 15 minutes, that's pretty good going! Yes, I'd love to see your mods, if you would like to email them to me. I may be able to make use of them, as I indicated above. > > 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 That sounds great! I was wondering how I might accomplish that little feat! Does the noedit switch also suppress local echo? You probably noticed my "no echo" routine was Unix specific. I don't think it's absolutely essential to suppress local echo in any case. Unfortunately, I don't have a Windows box that I can easily use to try all this, and to build a Windows executable. The kids have a very old machine that might be sufficient, but it has got like about 50Mb free disk space, and they swear! that there's nothing much that can be got rid of! There are some really important games on there, you see! :-) Little do they know that I have a really, *really* important game to put on it. ;-) I'll conduct a proper inspection, I think, when I get a few minutes. > > The redirect options ("/noedit /uself" etc) tell redirect how to > emulate the mode your program appears to expect - especially the > keyboard emulation. Sounds pretty funky! > > 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/ OK, muchas gracias. I'll probably be doing that sometime soon, after I pay a visit to the kids' museum piece! David -- David Trudgett http://www.zeta.org.au/~wpower/ The recognition or non-recognition of a certain truth depends not on external causes, but on certain other causes within the man himself. So that at times under external conditions apparently very favorable for the recognition of truth, one man will not recognize it, and another, on the contrary, under the most unfavorable conditions will, without apparent cause, recognize it. As it is said in the Gospel, "No man can come unto me, except the Father which hath sent me draw him." That is to say, the recognition of truth, which is the cause of all the manifestations of human life, does not depend on external phenomena, but on certain inner spiritual characteristics of the man which escape our observation. -- Leo Tolstoy, "The Kingdom of God is Within You"