HDTenEightyP/NetNews huggingface dataset:
From: colin@Cayman.COM (Colin "Atilla" Steele)
Newsgroups: rec.games.pbm
Subject: Utility for Galaxy players
Date: 20 Aug 92 18:34:59 GMT
Distribution: rec
Organization: Cayman Systems Inc., Cambridge, MA


Enclosed is dist.pl, a utility for providing some simple information
from a galaxy turn.  It is written in PERL, which, for those of you
who know not, is a language that's quite easy to learn, and fairly
useful.  If you don't have it, get it from uunet.uu.net, in
gnu/perl-<something>.tar.Z, or from jpl-devvax.jpl.nasa.gov in pub.

Anyhow, dist.pl will slurp in the turn file (specified in the -f arg,
or piped in from stdin) spit out:

1. The distance between any two planets
(use "dist.pl -o originplanet -d destplanet)

2. Any planet within a certain distance of an origin planet
(use "dist.pl -o originplanet -m distance")

3. The distance between all planets and an origin planet
(use "dist.pl -o originplanet")

Let me know if y'all find this useful, and if you'd like more such
tools.  Also, let me know if you'd prefer tools written in C (although
unless I get an overwhelming response indicating this, I'll just keep
on writing them in perl).

BTW, just to convince you to get perl, it only took me about 30
minutes to write, debug and enhance this 'lil widget.


-------------------------------- cut here -------------------------------------
#!/bin/perl
#
#
###############################################################################
# DIST.PL
###############################################################################

require "getopts.pl";

#
# Check command line options - if no file is specified, use stdin.
#
&Getopts('f:o:d:m:');

$inPlanets = 0;

$FILE = $opt_f;
$DEST = $opt_d;
$ORIGIN = $opt_o;
$MAX = $opt_m;

(!$FILE) && ($FILE = STDIN);

if ($FILE ne "STDIN") {
		open(INFILE, "<$FILE") || die "Can't open input file $FILE: $!\n";
}

while (<INFILE>) {
		
		if (/^N\s*X\s*Y?S?.*$/) {
				$inPlanets = 1;
		}

		if ($inPlanets) {

				if (/^([0-9A-Za-z_'`]+)\s*([\d.]+)\s*([\d.]+).*/) {
						
						$planetX{$1} = $2;
						$planetY{$1} = $3;
#            print $_;
				}

				if (/^\s*$/) {
						$inPlanets = 0;
				}
		}
}

if ($DEST) {
  printf "%16s\t%s\t%s\n", "Name", "X", "Y";
  printf "%16s\t%.2f\t%.2f\n", $DEST, $planetX{$DEST}, $planetY{$DEST};
  printf "%16s\t%.2f\t%.2f\n", $ORIGIN, $planetX{$ORIGIN}, $planetY{$ORIGIN};

  $y = $planetY{$ORIGIN} - $planetY{$DEST};
  $x = $planetX{$ORIGIN} - $planetX{$DEST};

  $hypotenuse = ($x**2 + $y**2)**(1/2);
  printf "Distance Between %s and %s is %.2f\n", $DEST, $ORIGIN, $hypotenuse;
}
else {
  for (sort keys %planetX) {
    $y = $planetY{$ORIGIN} - $planetY{$_};
    $x = $planetX{$ORIGIN} - $planetX{$_};

    $hypotenuse = ($x**2 + $y**2)**(1/2);
    if (($MAX && ($hypotenuse < $MAX)) || !$MAX) {
      printf "%16s is %.2f from $ORIGIN\n", $_, $hypotenuse;
    }
  }
}
--


------------------------------------------------------------------------------
 Colin Steele     | Cayman Systems, 26 Landsdowne St., Cambridge, MA 02139
 colin@cayman.com | (617) 494-1916 x209 | applelink D0523 | Fax (617) 494-9270
From: kds@phy.duke.edu (Stokes Kevin)
Newsgroups: rec.games.programmer
Subject: Re: VGA, Retraces, and DMA
Date: 18 Aug 92 18:29:35 GMT
Organization: Duke University Physics Dept.; Durham, N.C.

>>> Enough!!!  This is rec.games.programmer, if you want to get into technical
>>> discusions take it to comp.sys.ibm.pc.hardware.

>The majority of questions
>being asked are things that any decent VGA programmer's guide has
>the answers to. 

  Actually the stuff being discussed here is NOT in any VGA programmers'
guide.  How to use ModeX is in only one book that I know of, and this discussion
has gone far beyond the info in the book.

> They really have nothing to do with games.

  In order to write a successful game in this day and age requires the 
programmer to squeeze the optimum performance from the computer.  Impressive
graphics are absoulutely essential for a successful game today.  The games
market is the only major programming field where this sort of into is
absoulutely critical.  I write games for a living, and I think this discussion
thread is one of the most useful.

>And let's try to remember that not everybody owns an MS-DOS
>based computer...

  This is a good point, but no one here is restricting postings regarding
other hardware.  It is easy for you to make a kill-file, so you don't
ever have to see another ModeX posting.  You'd never catch me complaining
if there were 100 Amiga-blitter-chip postings per day, I'd simply kill them.

  I really don't know why you'd want to start a flame war about what fellow
game developers want to share info about.  Why start a thread which
truly has *nothing* to do with developing games?


-Kevin

-- 
	Kevin Stokes
	Duke University Dept. of Physics	kds@phy.duke.edu
	Durham, N.C.      27706
From: cd2a+@andrew.cmu.edu (Court Demas)
Newsgroups: rec.games.programmer
Subject: New Hobbes Library Available
Date: 18 Aug 92 04:50:51 GMT
Organization: Sophomore, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA


A new version of my Hobbes Graphics Library is currently available.  It
supports planar VGA ModeX modes 320x200x256, 320x240, 320x400, and 360x480.
Quick feature list:
virtual/splitscreen panning/scrolling
pixel/line/rectangle/circle/ellipse/triangle primitives
above with any or all of fill/clip/pattern
PCX read/display
simple text
abrash-style bitblts
other tidbits
coming soon:
mouse support
better text
fade in/out


The library is still in 'alpha', and is currently only available from me
directly uuencoded (if it's a problem send me mail and we can work something
out).  Full source and binaries are available.  If you would like to receive
the latest version, REGARDLESS of whether you were on 'the list' or not, send
me mail.  Please state:
1) Preferred AND alternate mailing address
2) If you want source/binaries/both
3) If you want updates as they become available (every few weeks)

Comments/critiques/questions are all very welcome..

-court
court+@cmu.edu


[btw- the Sprite library is still in the works, but coming soon]
Newsgroups: rec.games.programmer
From: cprem@marlin.jcu.edu.au (Ross E Milward)
Subject: Re: Computer-Controlled Players - simulated evolution
Organization: James Cook University
Date: Mon, 17 Aug 92 06:30:56 GMT

In article <psm.714022271@murlibobo> psm@mullian.ee.mu.OZ.AU (Phil Malin) writes:
>Hi everyone...I just had a couple of thoughts about this concept.
>
>What if we wanted the computer to construct the machines/monsters from the
>ground up.  We could specify rules describing (I'll use machines to illustrate)
>armour, weapons, means of movement, etc... and the relationships between them.
>For example strong armour would mean slow movement, and so on.  For different
>terrains the machine would have an optimal configuration.
>
I was thinking along similar lines.
Given the list of attributes, the program can build random CCPs.  By
using an evaluation function which would determine the relationship
between the attributes it would be possible to evolve an optimal
configuration using the GA.  You could either have it doing this in the
initial game setup, or else have the machines evolve into optimal
configuration as the game progresses.

>What all this means is that for a given terrain we could define a fitness
>function, and from this the genetic algorithm could construct the optimal
>machine configuration.
>
Yep, it would be quite easy actually.

>I suppose we could also have the GA design the strategy for this machine in
>the specified terrain but this would probably get VERY JUICY.
>
Hmmm, I'm not sure how easy it would be to create an evaluation function
for this, although with a defined environment it should be ok. 

Another good addition for choosing strategies could be the use of neural
networks.  This would give the machines a learning ability.  For example
based on a given set of inputs determined by their current location in
the environment, it would be then possible for them to choose the best
action based on previous experience. 

>Anyone have any thoughts on this?

Now we've got this discussion rolling, is anyone actually going to begin
coding a game with intelligent/evolvable CCPs.  It would be great to see
a game that had a large variety of CCPs that can evolve into stronger
opposition as the game develops.

>
>Phil
>psm@mullian.ee.mu.oz.au

Ross.

-- 
Ross Milward,   ross@coral.cs.jcu.edu.au, cprem@marlin.jcu.edu.au
Honours Student - Comp. Sci. Dept.,  James Cook Uni, Qld, 4811, Australia.
"The way the rain comes down hard, that's how I feel inside." - The Cure
From: mike@ftp.com (Mike Chapman)
Newsgroups: rec.games.programmer
Subject: HELP: *.*
Date: 20 Aug 92 14:12:37 GMT
Organization: FTP Software

Why don't you just ask everyone to write your whole program for you?


Mike Chapman
mike@ftp.com
Newsgroups: rec.games.programmer
From: checker@acf5.NYU.EDU (checker)
Newsgroups: rec.games.programmer
Subject: Re: Splitting the Group
Date: 19 Aug 92 02:01:49 GMT
Organization: New York University

>|> If going to the trouble of creating a group for x86/MSDOS/VGA nitty-gritty
>|> games programmers, why not go whole-hog?  Why limit it to VGA?
>|> How about a news group for VGA, Sound Blasters, reading joystick ports, and
>|> all the other low level things required to write a game for clones?

Okay, how about alt.games.ibm-pc.programming?  Someone else suggested
comp.graphics.ibm-pc, but that only focuses on graphics, so it may be a
bad idea for the same reason vga-programming was.

Of course, there are a lot of folks who don't care about games but still
want to do VGA programming.  Where would they fit in?

Chris

Newsgroups: rec.games.programmer
From: bx304@cleveland.Freenet.Edu (Jeff Epler)
Subject: Re: SpaceGame routines
Reply-To: bx304@cleveland.Freenet.Edu (Jeff Epler)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Fri, 14 Aug 92 16:01:37 GMT


In a previous article, ap@jyu.fi (Patric Aalto) says:

>I was thinking mainly the LAN support mode. I am planning to let the game
>have several gaming modes. One would be a single-play (that's all the
>game currently has), in which the player has a starbase and nine fighters,
>and he should destroy the computer-controlled enemy base and 9 fighters.
>(I like the ability to be in the middle of a dogfight between 18 ships.
>That's fun, lot's of action!) The second game-mode is a duel between two
>players connected by serial links (as in the original LineWars). Then I
>want to have a multi-player mode using LAN, and then a campaign-mode.
>I have coded the RS-support so that it can support two COM ports at the
>same time, but I have not yet decided if I will include RS-port support
>with the LAN support into the multi-player mode.

Will the two-player mode have the multiple fighters per side, (I think
that would be neat) as an option, or will it still be one ship per
side in that mode?
-- 
|Jeff Epler               Additions Welcome           c(-8 ;-) >{8-) |
| :) (=( =-] (-= Celebrating the variety of faces =-> :^) {-= |-) (: |
|                                                   Lincoln, Nebraska|
Newsgroups: rec.games.programmer
From: os9ug@gkcl.ists.ca (OS-9 User Group)
Subject: Re: Splitting the group
Reply-To: sizone!justin@ee.ryerson.ca (Justin Wells)
Organization: y
Date: Fri, 21 Aug 92 18:08:45 GMT

In article <5774@vexpert.dbai.tuwien.ac.at> mst@vexpert.dbai.tuwien.ac.at (Markus Stumptner) writes:
>
>Right, by pointing out that you chose to conveniently ignore the fact
>that this discussion broke out over PC hardware specific questions on
>game programming in a group about (surprise) game programming.

If this were even half true it would probably be ok.  The problem is most
of the posts have nothing to do with game programming.  Instead they are
requests for general information on VGA, mouse control, etc.

Just because the poster intends to use this information to write a game
does not make the post game-related -- anymore than it would be game
related if I posted a question asking trivial questions about programming
in C, just because I was going to write a game in it.

I'm willing to accept that occasionaly there might be a question that 
involved VGA and was directly related to game programming.  But 99.99% of i
what is posted here are NOT game related, but just general questions i
about programming on an IBM.

BTW:  Please don't think that all msdos programmers are jerks with no sense of 
net.courtesy -- I do most of my casual programming on an msdos machine, and 
somehow I managed to figure out that this wasn't the appropriate place to 
ask how VGA works.  .
From: dt@pnet51.orb.mn.org (Ryan Williams)
Newsgroups: rec.games.programmer
Subject: text adventure source
Date: 17 Aug 92 07:45:01 GMT
Organization: People-Net [pnet51], Minneapolis, MN.

I was able to come up with a template for a text adventure. It's pretty
simple, only being a square 10 x 10 grid to move about. Have fun: 
 
 program Dungeon;

uses Dos, Crt;

var

   Room     : array[1..100] of String[80];

   YourName : String[20];

   CuRoom   : integer;

   Score    : integer;

   Tk       : string[80];

   DUff     : boolean;

 

procedure LoadData;

var

   DirInfo  : SearchRec;

   FileName : string[12];

   FileData : text;

   Cycle    : byte;

   Duh      : string[80];

 

begin

 CuRoom:=1;

 FindFirst('ROOMS.DAT',Archive,DirInfo);

 if DosError<>0 then begin

                      Writeln('ROOMS.DAT file not found.');

                     End;

 assign(FileData,'ROOMS.DAT');

 reset(FileData);

 repeat

  Readln(FileData,Room[CuRoom]);

  Inc(CURoom);

 until CuRoom=101;

End;

 

procedure North;

begin

 if CuRoom<11 then begin

                    Writeln('You can''t go that way.');

                   End;

 if CuRoom>10 then begin

                    CuRoom:=CuRoom-10;

                   End;

End;

 

procedure South;

begin

 if CuRoom>90 then begin

                    Writeln('You can''t go that way.');

                   End;

 if CuRoom<91 then begin

                    CuRoom:=CuRoom+10;

                   End;

End;

 

procedure East;

begin

 case CuRoom of

  10,20,30,40,50,60,70,80,90,100 : begin

                                    Writeln('You can''t go that way.');

                                    Exit;

                                   End;

  End;

  Inc(CuRoom);

End;

 

procedure West;

begin

 case CuRoom of

  1,11,21,31,41,51,61,71,81,91 : begin

                                  Writeln('You can''t go that way.');

                                  Exit;

                                 End;

 End;

 Dec(CuRoom);

End;

 

 

procedure GetCmd;

 

var

   J : integer;

 

begin

 Writeln('You are in ',Room[CuRoom]);

 Writeln('Room number: ',CuRoom);

 repeat

  Write(' >');

  Readln(Tk);

  for J:=1 to Length(Tk) do

   Tk[J]:=upcase(Tk[J]);

 until not(Tk='');

 if Tk='N' then North;

 if Tk='S' then South;

 if Tk='E' then East;

 if Tk='W' then West;

End;

 

begin

LoadData;

CuRoom:=45;

repeat

 GetCmd;

until Duff=FALSE;

end.

 

 

 

 

 ok. You need to make a file called ROOMS.DAT which will be your room names.
On each its own line, make 100 rooms up. Simple as that. 
 Room #1 will be the top left corner, #10 being the top right, #90 being
bottom left, and 100 being bottom right. Hope the program works. I wrote it
using Turbo Pascal version 4. 
 Have fun.
Newsgroups: rec.games.programmer
From: ssalter@silver.ucs.indiana.edu (-=[SLS]=-)
Subject: Re: Splitting the group
Organization: OFSA
Date: Thu, 20 Aug 1992 22:17:59 GMT

bjoerns@stud.cs.uit.no (Bjoern Stabell) really reaches:

>In article <BtAH3E.Bpq@usenet.ucs.indiana.edu>, ssalter@silver.ucs.indiana.edu (-=[SLS]=-) spits:
>] bjoerns@stud.cs.uit.no (Bjoern Stabell) sez hotly:
>] >*)      I couldn't resist - someone  stated that PC programmers were
>] >        the majority in this group.  Why so?  Because they annoy the
>] >        most,  because they have most  problems or because they need
>] >        everything repeated 3 times before they get it?

>] Bjorn, perhaps there are a LOT of pc programmers, eh? Wonder what the
>] ratio is of PC type owners is to Amiga/Sun/Apple/etc. That may make a
>] difference...gee, that might even EXPLAIN it...
>
>Pure speculation.  I know one thing about the Amiga - there are ALOT of

pure speculation? Hmm, anyone have any figures for the man? 

>Seriously, even if there WERE a majority of PC owners (and I don't think
>there is considering what machines have Internet access) in this doomed

ANY machine can  have internet access. 

>net-world, would that give them the right to post PC related issues on any
>group?  Nah, you can do better than that.

I feel the PC related issues are justifiable considering the subject
matter.

>I can't see why you're so stubborn, you deserve your own group - now get

Not stubborn..I can junk any article I don't want to read, it's quite
easy.

>Just trying to keep my KILL file empty and still get what I would expect
>from my newsgroups,
      ^^
You mean, of course, from the newsgroups you subscribe to, right? 

Steve
-- 
Spirituality is what is inside : religion is humankind's vain attempt to
express it outwardly.
From: exuhag@exu.ericsson.se (James Hague)
Newsgroups: rec.games.programmer
Subject: Re: Computer-Controlled Players (New, More
Date: 13 Aug 92 18:21:50 GMT
Reply-To: exuhag@exu.ericsson.se
Organization: Ericsson Network Systems, Richardson, TX

Amit Jayant Patel writes:
>
>My understanding was that genetic algorithms would be done once, and they 
>would tweak the values for you so that you don't have to guess.  You could
>run the GA every night, and in a few weeks, you'd have such a good opponent
>that it could beat any other possible opponent using those few simple rules.
>(It wouldn't be done at run-time, so it wouldn't slow down the game...)

...but you've got to do *something* at run-time, I would think :-)

I don't think most people want to play against undefeatable opponents.
They'd prefer oppponents with different styles, etc.  Remember, the
computer can "see" everything perfectly (it can access internal data
structures).  So the exactly what methods the computer is using to
figure out its moves may not be obvious to a human player, making the
computer player, at the very least, not completely predictable.

I think we are talking about two different kinds of games.  In a war
game or strategy game, some sort of solid "thinking" opponent is
necessary.  In an action-oriented game (Wing Commander, Pac-Man)
one of the player's opponents is himself--can he absorb everything 
that's going on and figure out what to do *fast*?  The rocks in
Asteroids don't have much intelligence, but they make damn good
opponents.  It is almost too easy to come up with an undefeatable
enemy.  The trick is getting a balance between too easy and too
hard (IMO, most current games are way too easy).

--
James Hague   
exuhag@exu.ericsson.se
Newsgroups: rec.games.programmer
From: kmathias@afit.af.mil (Karl S Mathias)
Subject: Shortest Path Algorithm
Keywords:  HEX HEXMAP 
Organization: Air Force Institute of Technology
Date: Thu, 20 Aug 1992 15:21:43 GMT

I hope this isn't a FAQ, but I'm looking for a least-cost path algorithm
for a hexmap wargame.  To be useful, it needs to meet the following
requirements:

  -- Take into account varying terrain costs.  The direct path will 
     almost never be the least-cost path (so shortest path solutions are
     out).

  -- Be efficient.  Exhaustive searches of the entire game board will
     not work since there are several hundred units and several thousand
     hexes (100 x 100).

By way of background, this is a fairly typical land/air wargame.  The
ground portion consists of a 100 x 100 hex map (each hex 25km across).
Each hex can contain mountains, clear, desert, etc. type terrain.  Some
hexsides are crossed by rivers and fortifications.  Roads and railroads
traverse across hexsides through the center of various hexes.

If you have an algorithm I'd sure appreciate any help you could provide.

-------------------------------------------------------------------------
Capt Karl Mathias                                  kmathias@afit.af.mil
Graduate Student, Air Force Institute of Technology
"Opinions expressed are my own and not those of the U.S. Air Force"
From: cyberman@toz.buffalo.ny.us (Cyberman)
Newsgroups: rec.games.programmer
Subject: Re: Anyone have any good
Date: 21 Aug 92 16:31:03 GMT
X-Maildoor: WaflineMail 1.00r


     -=> Stephan A. Puga spoke of "Anyone have any good dung" <=-
    To All at 08-16-92  18:26
 SAP> Basically, I am looking for something like the way Moria handles a
 SAP> person entering a room.  If there is nothing in the room,
 SAP> everything up to the walls is visible, but areas can be hidden if
 SAP> not within the person's line of sight.

 SAP> Any ideas on how to do this right?

Another thing to add to the FAQ.

Basically "cast" a line to the walls using Bresenham's algorythm
would be the fastest way.  By following these points from your
character you can find obstructing objects and "hide" what's
behind them.

        Stephen Cyberman@Toz.Buffalo.NY.US
        Scripted at Fri  08-21-1992  11:00:45

... ANSI.SYS Loaded.  Breathaizer test 0.5%.
--- Blue Wave/QWK v2.10
                                                                                                           
Newsgroups: rec.games.programmer
From: brownp@viper.rtp.dg.com (Peter Brown)
Subject: Re: inappropriate postings [was Re: VGA, Retraces, and DMA]
Date: Wed, 12 Aug 92 17:38:29 GMT
Reply-To: brownp@viper.rtp.dg.com (Peter Brown)
Organization: Data General Corporation, Research Triangle Park, NC

Okay, now let's not start yelling at each other.  I have no problem with
postings on how to program hardware here for any platform.  When you are
writing a game, you need to push the hardware to the limits, and this
SHOULD be a good place to discuss doing this.  The reason that alot of
the discussion is about PC programming/graphics is that there are alot of 
PC owners reading this group.  I find this group a good source of info
about VGA cards, soundcards, etc.  I don't own all the different pieces
of hardware, but you can still learn from the discussions.  Really, its
not that hard to skip to the next message if the current one doesn't
interest you.  Or do people really think we should fragment the group
and form rec.games.programmer.pc?
I don't want to start any fights, just wanted to throw in my $0.02.
-- 
Peter Brown -- Data General Corp. --  email: brownp@stuff.rtp.dg.com
My views, thoughts, opinions and spelling errors are definitely my own!
Newsgroups: rec.games.programmer,alt.sources,comp.os.msdos.programmer,alt.msdos.programmer,comp.lang.c
From: bx304@cleveland.Freenet.Edu (Jeff Epler)
Subject: Hobbes VGA library
Reply-To: bx304@cleveland.Freenet.Edu (Jeff Epler)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Fri, 21 Aug 92 02:21:26 GMT


Has anyone out there tried to get this library of graphics routines
recently posted in alt.sources to work with Turbo C 2.0?

I downloaded both the source and obj archive, and tried (After changing
// to /* ... */) to compile test.c with 'tcc test'.  I got a
mind-bogglingly large number of errors in the hobbes.h file.

(I fear that I won't be able to use the .LIB included, but can have a
friend with TASM do the ASM files for me..)

Is there something that I'm missing (The friend [?] who sold me the
compiler told me 'you won't need documentation, there's online help', so
I'm mostly lost anyhow...) that's simple?  Or is it complex, and
explaining it would cause my 1 meg mail quota to be exceeded?  Whatever
it is, please reply (In one of these groups, preferably -- Probably not
rec.games.programmer, but that's where the message about it was first
posted -- But if there's a better place, followup to *there* and mail me
telling me *where*that*is*!!) in mail or in news.


-- 
|Jeff Epler               Additions Welcome           c(-8 ;-) >{8-) |
| :) (=( =-] (-= Celebrating the variety of faces =-> :^) {-= |-) (: |
| >X^P 8-[                                          Lincoln, Nebraska|
Newsgroups: rec.games.programmer