comp.lang.ada
 help / color / mirror / Atom feed
From: David Trudgett <wpower@zeta.org.au.nospamplease>
Subject: Re: New Ada ANSI console/X terminal game
Date: Wed, 09 Nov 2005 19:34:06 +1100
Date: 2005-11-09T19:34:06+11:00	[thread overview]
Message-ID: <m3r79qmd8h.fsf@rr.trudgett> (raw)
In-Reply-To: 43719ccf$0$25857$afc38c87@news.optusnet.com.au

Ross Higson <rossNOSPAMhigson@optusnet.com.au> 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"




  reply	other threads:[~2005-11-09  8:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 10:19 New Ada ANSI console/X terminal game David Trudgett
2005-11-08 17:38 ` Pascal Obry
2005-11-08 21:50   ` David Trudgett
2005-11-09  6:53 ` Ross Higson
2005-11-09  8:34   ` David Trudgett [this message]
2005-11-09  8:55     ` Ross Higson
2005-11-09 22:09       ` David Trudgett
2005-12-01  0:29     ` Randy Brukardt
2005-12-02  2:30       ` David Trudgett
2005-12-02  6:46         ` Martin Dowie
2005-11-12  9:05 ` David Trudgett
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox