[comp.sources.games.bugs] wanderer - the saga continues :-)

maujp@warwick.ac.uk (S Shipway) (12/03/88)

-- Dyslexics of the world untie..   (munch,munch)

 First, in reply to David Goodenough's (dg@lakart.UUCP) question - I
haven't recieved any mail from you, it must have been eaten by the net
somewhere on the way over. I haven't a 'validation suite' , but but provided
the objects keep the same priority ( boulders, arrows, balloons ) then a
correctly designed screen should always work. Where it starts to change is
when you get large numbers of 'hanging' bouldes or arrows - you'll just have
to make your own test screen for that Im afraid...

 Scondly, Troy Saville (evh@vax1.acs.udel.EDU) - I mailed you the sources
twice, once via uucp and once via ARPA. I know the latter was mangled by the
net, but didn't the uucp one get through?

 Thirldy, it has been brought to my attention that the score should be saved
as an int, rather than as a short else you get problems when you have a
massive score. The necessary change is so small theres no point in posting
a diff for it, just alter the struct in save.c and thats about it.

 Lastly: There must be SOMEONE out there who designes screens, surely the art
cannot be restricted to Warwick University, the Netherlands, and two people in
America? Send me your screens (even if they are dreadful), preferably with
a solution. To get this, use 'tee soln | wanderer' and then solve the screen.

-----------------------------------------+------------------------------------
JANET:  maujp@uk.ac.warwick.cu           |#include <disclaimer.h>
ARPA:   maujp@cu.warwick.ac.uk           |    I am really an AI program
BITNET: maujp%uk.ac.warwick.cu@UKACRL    |#include <quote.h>
UUCP:   maujp%uk.ac.warwick.cu@ukc.uucp  |    "I hate you, Monday!" -Garfield
        ...!mcvax!ukc!warwick!maujp      +------------------------------------
SNAIL:  Maths dept., University of Warwick, Coventry.
LOCAL:  "Hey, Steve!"  ...  or even maujp@orchid if you've lost your voice.
------------------------------------------------------------------------------

evh@vax1.acs.udel.EDU (Troy Saville) (12/04/88)

No the source didn't get through via uucp.
Why don't you post it here. That 'diff' code just
doesn't cut it.

casey@bayes.llnl.gov (Casey Leedom) (12/20/88)

| From: maujp@warwick.ac.uk (S Shipway)
| 
| It has been brought to my attention that the score should be saved as an
| int, rather than as a short else you get problems when you have a massive
| score. The necessary change is so small theres no point in posting a diff
| for it, just alter the struct in save.c and thats about it.

  Even though I don't care about this program at all, though I don't even
have a copy, or the time to port it even if I did, I can't let this pass:
``You should use an "int" rather than a "short" so the score won't overflow
when you get large scores???!?!??!??''  What is this??!  Institutionalized
brain damage???!!?  AN "int" IS NOT NECESSARILY LARGER THAN A "short"!!!
C has enough portability problems as it is without people ENCOURAGING old
VAX-minded idiocy like that.

  Sorry.  I feel better now.  We now return you to the more rational
world of game bug fixes, suggestions, etc.

Casey

evh@vax1.acs.udel.EDU (Troy Saville) (12/21/88)

About changing the save struct score variable from short to int:

In article <14811@lll-winken.llnl.gov> casey@lll-crg.llnl.gov.UUCP (Casey Leedom) writes:
>
>  Even though I don't care about this program at all, though I don't even
>have a copy, or the time to port it even if I did, I can't let this pass:
>``You should use an "int" rather than a "short" so the score won't overflow
>when you get large scores???!?!??!??''  What is this??!  Institutionalized
>brain damage???!!?  AN "int" IS NOT NECESSARILY LARGER THAN A "short"!!!
>C has enough portability problems as it is without people ENCOURAGING old
>VAX-minded idiocy like that.
>
>  Sorry.  I feel better now.  We now return you to the more rational
>world of game bug fixes, suggestions, etc.
>
>Casey


I think you should think before you talk. K&R C says that an int is 
greater than or equal to the size of a short(dependent on the system
being used). So if it isn't equal, then there is a portability problem
isn't there???(slow down, you might have to think about this...).
So go back to your own bloody idiocy. Its people like you who
write code that is neither portable and modular because they are in
to much of a #$%$^%#^$% hurry to think before they do. So get with 
the program private casey.

casey@gauss.llnl.gov (Casey Leedom) (12/22/88)

| From: evh@vax1.acs.udel.EDU (Troy Saville)
| 
| I think you should think before you talk. K&R C says that an int is
| greater than or equal to the size of a short (dependent on the system
| being used).  So if it isn't equal, then there is a portability problem
| isn't there??? (slow down, you might have to think about this...).

  You're right, I probably shouldn't have bothered sending that letter
off.  It's at times like this that I wish I maintained an outgoing mail
queue.  Someone else sent me a letter privately saying nearly the same
thin and I sent him a long and reasoned response.  I just don't have the
energy to go into that much detail right now, so I'll offer the
encapsulated version.

  K&R says (guarantees):

	sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(long)

with only those assumptions it's basically impossible to write anything
portably because you have no idea how large a number you can store in any
of the integral types.  One of the things which has made C as portable as
it is is the implicitly agreed upon, but illegitimate further assumption
that:

	sizeof(char) == 8-bits
	sizeof(short) == 16-bits
	sizeof(long) == 32-bits
and
	sizeof(int) == sizeof(short) or sizeof(int) == sizeof(long)

These are hackneied assumptions to enable people to make some assumptions
about how large a value they can store reliably in the various integral
types.  These give you

	sizeof(char) < sizeof(short) == sizeof(int) < sizeof(long)
or	sizeof(char) < sizeof(short) < sizeof(int) == sizeof(long)

A much better approach would be for the programmer to declare what range
of values the type needed to hold and let the compiler pick the
appropriate machine type, but we're dealing with C and the real world
here.

  In this particular case, my bitching was without point because
xwanderer will probably never be ported to a machine where sizeof(int) ==
sizeof(short) (PDP-11s, 8086, etc.)  What I'm really objecting to is the
cavalier attitude involved in the original statement as to the
capabilities of the type "int".

  Back in the Bad Old Days of the PDP-11, code was rife with the
assumption that sizeof(int) == sizeof(short).  Then the Young Turks on
Vaxes came around and started spreading their seed about and it was full
of sizeof(int) == sizeof(long).  Because of the various problems that
both these styles caused, we've tried to be more careful of recent.

  Basically, if we're going to have to live with our implicit, but
unblessed assumptions about the sizes of char's, short's, and long's, we
should be careful to use int's only where we know that the maximum
values expected to be stored can fit in a short (16-bits).  In those
cases, we use short's when we're concerned with memory, and int's when
we're concerned with performance (many 32-bit CPUs suffer significant
performance loss for various operations when having to deal with short's).

  In the end, hopefully C will die a quiet death and a language will rise
up to replace it that doesn't suffer these problems.

  In any case, sorry for the original posting and it's tone.  It neither
fit this group, nor was the tone productive.  But do please try to be
more careful with your assumptions about C.  C is bad enough as it is
without making it worse.

Casey

kevin@perle.UUCP (Kevin Pickard) (02/08/89)

munch! munch! munch!


     I have tried to send  the  following  screen  to  Steve
Shipway a number of times but his site (yes "warwick") keeps
bouncing it.  I am therefore posting it here  in  the  hopes
that  he will eventually see it.  Other "wanderer" hacks may
also want to try the screen.

     Please note that if anyone wants to reply to this post-
ing  they should use the Email path listed at the end of the
article.  Our news feeder site is currently dead and we  can
only post through our mail site.  Hence only mail reaches us
currently.

In article <65@poppy.warwick.ac.uk> Steve writes:
>
> [...bulk of article deleted...]
>
> Lastly: There must be SOMEONE out there who designes screens, surely the art
>cannot be restricted to Warwick University, the Netherlands, and two people in
>America? Send me your screens (even if they are dreadful), preferably with
>a solution. To get this, use 'tee soln | wanderer' and then solve the screen.
>

     Well at least one person here in Canada designs screens
(or  at  least  makes  an  attempt :-).  The following is my
first attempt at a screen for the great (and  I  mean  that)
game of "wanderer".

------------------cut here-------------------
****!**/                    O   O< *  M#
O***!*/              O<O*O*O       *   #
*O**!                *     *<      O<<*#
O*O*        *!*!* * /              >  *#
 O /       >> > >  /                  *#
O /               O        @   ::::====#
 /  <*<                            *  S#
/       \             <         /  *   #
*  >     \         \     /     /   *   #
* >                  ===           ====#
 >                        *         ***#
>    <=========   >   \   +   /==== :==#
=    <=*O*>>>>     +     /          :::#
     <=****===    \     /     /:   *<<<#
 ======*=**=:::    \         /:::  *   #
::X*::::  <=::::            /::::: *S  #
########################################
------------------cut here-------------------

     I have installed this screen here  on  our  system  and
some of the local users are trying it out.  None have solved
it yet.  It does have a solution and I have  the  equivalent
of  a  "tee"  file to prove it.  I will send that off to you
later (if you wish) after you have had a try at  the  screen
yourself :-).

        (Note : Due to mailer problems part  of the above
		statement is now false.  Two of the local
	        users have now solved this screen)

     This screen was written to run under the original  ver-
sion of "wanderer" that was released under comp.sorces.games
(v05i002: wanderer  -  mini  rogue-like  adventure  game  (2
Parts)).   I  kept  it simple so it should run on later ver-
sions as well.

     Speaking of later versions, we received  a  patch  here
for  version  2 of "wanderer" but we never received the ver-
sion 2 source.  Could you possibly send a copy  of  it  this
way (or point me at a local copy)?

     Also could you explain  what  happened  to  the  screen
numbers?   The  original  version  we  received came with 13
screens (the last of which we have yet to  solve).   On  the
net, though, I have seen talk referring to screens up to 20.
On top of that, there have been references to  a  screen  13
that  looks  nothing  like  the  one we have.  Our screen 13
looks like this.

------------------cut here-------------------
OOO#*#                                 @
OOO:*#                                 -
T::::#   O   O   O   O   O         O:  -
###\O#      /:            =========O=  -
S   :   >:          \      :       :   -
           /         \    # ++++++++++ -
S     >>>>/            O #  +========+ -
               \       #<   +#      O+ -
S  :            \           +#A######+ -
      S S S S S S S S S:<<< +#      #+ -
S   S###################    +###### #+ -
      S S S S S S S S S#    +#OOOOO #+ -
S                      #    +#X:::: #+ -
  !*!*!*!******!*!*!*! #    +========+ -
S                           ++++++++++ -
 S S S S S S S S S S S                 -
########################################
------------------cut here-------------------

     Do  you  have a master list of screens available and if
so could you bounce it this way?  Note that we may not be on
the  master  set  of maps yet so please reply using the path
below.

     Any help with any of these would be greatly appreciated.
-- 
----------- ~~~~~~~ ----------------------------------------------------------
           | o   o |          Kevin Pickard
           |   .   |          UUCP: ...!uunet!mnetor!perle!kevin
-------^^^-----------^^^------------------------------------------------------

billr@tekred.CNA.TEK.COM (Bill Randle) (02/15/89)

Steve's complete set of 49 screens has just been posted to comp.sources.games.

	-Bill Randle
	Moderator, comp.sources.games
	Tektronix, Inc.
	games@saab.CNA.TEK.COM

rjd@occrsh.ATT.COM (Randy_Davis) (02/16/89)

In article <3616@tekred.CNA.TEK.COM> billr@tekred.CNA.TEK.COM (Bill Randle) writes:
|Steve's complete set of 49 screens has just been posted to comp.sources.games.

  Yeah, got'em...

  I notice in the comments of part 1 of 2 that the balloons have been
implemented.  I saw some of the patches go by that were to add balloons, yet
when I started seeing the bug reports, I decided to not implement the balloon
patches until everything was thrashed out.

 So...  If anybody has the complete source WITH the balloon modifications added
(and it works), could you drop me a message or send them to me?  I *thought*
there was going to be a repost of the source once all the bugs were worked out
of the balloon additions, but I never saw it.

  BTW: For a 3B2 running Unix System V release 2.0.4  (yeah - I'll upgrade
someday....)

Advance thanks,

Randy Davis					UUCP: ...(att!)ocrjd!randy
						      ...(att!)occrsh!rjd