[comp.sources.d] mahjongg tiles

pokey@well.UUCP (Jef Poskanzer) (06/02/88)

In the README for the excellent mahjongg solitaire game recently posted
to comp.sources.games, Mark Holm says:
>Copyright 1988 Mark A. Holm
>Permission is given to copy and distribute for non-profit purposes.
>[...]
>I have distributed the tiles as a compressed .o file to save on file
>sizes and to preserve the artistic license of the game. If you would
>like the source to the icons and the patches to iconedit so you can
>modify them send a request (and possibly a small donation ;^) to the 
>address below.

I spent about half an hour and wrote a program that links with Mark's
icon.o file and dumps out all the tiles as portable bitmaps.  I have
absolutely no idea what Mark means by "preserve the artistic license
of the game", so I'm going to distribute these bitmaps the same way
he is: if you want them, send me mail.  Include an Internet address
or a uucp path relative to ucbvax.  The compressed uuencoded tar file
of X11-format bitmaps is 37 kilobytes, so please don't ask for them
if you don't really want them.

Note that I am NOT putting these bitmaps into the official Poskanzer
Bitmap Collection, since they are copyrighted.
---
Jef

              Jef Poskanzer   jef@lbl-rtsg.arpa   ...well!pokey
                 Wasting time is an important part of living.

markh@cvedc.UUCP (Mark Holm) (06/09/88)

In article <6150@well.UUCP>, pokey@well.UUCP (Jef Poskanzer) writes:
> >Copyright 1988 Mark A. Holm
> >Permission is given to copy and distribute for non-profit purposes.
> >[...]
> 
> I spent about half an hour and wrote a program that links with Mark's
> icon.o file and dumps out all the tiles as portable bitmaps.  I have
> absolutely no idea what Mark means by "preserve the artistic license
> of the game", so I'm going to distribute these bitmaps the same way
> he is: if you want them, send me mail.  Include an Internet address
> or a uucp path relative to ucbvax.  The compressed uuencoded tar file
> of X11-format bitmaps is 37 kilobytes, so please don't ask for them
> if you don't really want them.
> 
> Note that I am NOT putting these bitmaps into the official Poskanzer
> Bitmap Collection, since they are copyrighted.
> ---
> Jef
> 
>               Jef Poskanzer   jef@lbl-rtsg.arpa   ...well!pokey
>                  Wasting time is an important part of living.

"Preserving the artistic license of the game" was possibly a bad way to state
it. "Preserving the look and feel of the game" may be better. The lady that I
had make these icons for me went to a lot of time and effort to produce them
(and I thank you for your efforts Dorothy) and I beleive she did a wonderful
job on them. Since 98% of this game is the icons, I was attempting to keep
them from being mutilated and then propagated, thus spoiling the game for 
others. As I stated before, if you want them, ask for them, and I will gladly 
send them to you. I don't mind Jef disasembling them for his own use but they
should be sent to me for propagation. As he said they are copyrighted.

As it stand now, there exists 126 tile icons (1 set color, 1 set B/W, 1 set
color for 386) plus misc. cursor and closed icons. I am still working on the
color icon editor patches to remove as many glitches as possible.

FYI, when I finish this I will post the first "bug" fix and the icons.o file 
for the 386. Anyone in the Portland OR area willing to let me spend ~2 hours
getting it running on the SPARC machines ;-) ??


===========================================================================
Mark Holm                                ..tektronix!ogcvax!cvedc!exc!markh
Exceptions                                     ..sun!cvbnet!cvedc!exc!markh
126 NE Grant                                            Phone (503)648-8307
Hillsboro, Oregon 97124                   Messages only until after 6:00 PM

It's amazing what you can do on outdated equipment!!

pokey@well.UUCP (Jef Poskanzer) (06/11/88)

In the referenced message, markh@cvedc.UUCP (Mark Holm) wrote:
>"Preserving the artistic license of the game" was possibly a bad way to state
>it. "Preserving the look and feel of the game" may be better. The lady that I
>had make these icons for me went to a lot of time and effort to produce them
>(and I thank you for your efforts Dorothy) and I beleive she did a wonderful
>job on them. Since 98% of this game is the icons, I was attempting to keep
>them from being mutilated and then propagated, thus spoiling the game for 
>others. As I stated before, if you want them, ask for them, and I will gladly 
>send them to you. I don't mind Jef disasembling them for his own use but they
>should be sent to me for propagation. As he said they are copyrighted.

Nope, sorry, I still don't understand what you're getting at.  Why would
anyone want to "mutilate" the icons?  What exactly are you talking about?
Replacing Chung with a little doggy?  Or perhaps just fixing the number
tiles so you can tell which number it is when the arabic digit is covered
up?

And why will making people send mail to you make them any less likely to
do "mutilation"?  Considering that your connectivity to the net is via the
proverbial "twisty little path of uucp connections", all that you're really
accomplishing is making it gratuitously hard for people to run your game
on different architectures.  I've already had two requests for my re-sourced
icons for the purpose of compiling on a Sun 4.  I turned these requests
down, because X11 form is not what they needed, and I suggested that they
send mail to you.  That's two people who can't run your game FOR NO GOOD
REASON.

Ya know, I almost never run publically-distrubited binaries, whether from
floppies or the net, for fear of trojan horses and viruses.  Your reluctance
to distribute source is beginning to make me suspicious.  Perhaps I should
take a closer look at what's in that object file?
---
Jef

              Jef Poskanzer   jef@lbl-rtsg.arpa   ...well!pokey
                        Teaching new dogs old tricks.

markh@cvedc.UUCP (Mark Holm) (06/14/88)

I have had enough request to warrent posting them anyway! I will post them
to comp.sources.games this afternoon along with the patches to get rid
of the ability to cheat while sneeking peaks at the board as it is building.

FYI, my personal opinion of people who deliberatly build viruses into their
programs is that they should be slow roasted over an open fire. I am offended
by your enuendo. I was simply trying to cut down on net load. I had no idea
that there was that many 386's and Sun4 already in use. I have been trying to
get one of each into here since December, but you know how red tape works!

===========================================================================
Mark Holm                                ..tektronix!ogcvax!cvedc!exc!markh
Exceptions                                     ..sun!cvbnet!cvedc!exc!markh
126 NE Grant                                            Phone (503)648-8307
Hillsboro, Oregon 97124                   Messages only until after 6:00 PM

Beezlenut! rah! rah! Beezlnut! rah! rah!
Boil that virus! Boil that virus!

markh@analogy.UUCP (Mark Holm) (06/18/88)

Well folks, you asked for it so here they come. I posted the
icons to the moderator of comp.games.sources for mahjongg along
with a patch to hide the covered tiles while the board gets
redrawn. He is going to integrate the patch and do another
complete posting of mahjongg (mahjongg2). It will trickle out
over the next few weeks. There are ~34 parts when all the icons
are included. Now do you understand why I did not post them the
first time?? 3 Mbytes of data take a long time to propagate.

Anybody have any suggestions for improvment?? I am currently
working on a better shuffling algorithm and a solve button
for those of you who can't quite figure out how to win. Anything
else wanted??

===========================================================================
Mark Holm                                ..tektronix!ogcvax!cvedc!exc!markh
Exceptions                                     ..sun!cvbnet!cvedc!exc!markh
126 NE Grant                                            Phone (503)648-8307
Hillsboro, Oregon 97124                   Messages only until after 6:00 PM

Parkinson's Fifth Law:
	If there is a way to delay in important decision, the good
	bureaucracy, public or private, will find it.

pokey@well.UUCP (Jef Poskanzer) (06/20/88)

In the referenced message, markh@analogy.UUCP (Mark Holm) wrote:
>                         There are ~34 parts when all the icons
>are included. Now do you understand why I did not post them the
>first time?? 3 Mbytes of data take a long time to propagate.

Ahem.  Is this 3 megabytes before or after you tar'ed, compressed, and
uuencoded the icons?
---
Jef

              Jef Poskanzer   jef@lbl-rtsg.arpa   ...well!pokey
                             For indoor use only.

urban@spp2.UUCP (Michael Urban) (06/20/88)

In article <319@opus.analogy.UUCP> markh@analogy.UUCP (Mark Holm) writes:
>Well folks, you asked for it so here they come. I posted the
>icons to the moderator of comp.games.sources for mahjongg along
>with a patch to hide the covered tiles while the board gets
>redrawn. He is going to integrate the patch and do another
>complete posting of mahjongg (mahjongg2). It will trickle out
>over the next few weeks. There are ~34 parts when all the icons
>are included. Now do you understand why I did not post them the
>first time?? 3 Mbytes of data take a long time to propagate.
>
>Anybody have any suggestions for improvment?? I am currently
>working on a better shuffling algorithm and a solve button
>for those of you who can't quite figure out how to win. Anything
>else wanted??
>

This seems extreme.  Why do you not instead post a relatively short
C program which can be linked with the ".o" file you distributed
for the tiles, and which will spit the source code for the
desired set of tiles onto standard output?  

As for the program itself: it does not play the game that I
know by the name of Mah-jongg.  It does play the game which is
sold by Activision under the name "Shanghai".  To the best of
my knowledge, this game is original to Activision, although
they have apparently done nothing to protect the game
from duplication.  You may want to change the name of the
program to something else to avoid misleading Mah-jongg fans.
(A networked mah-jongg game would be a nice project for someone,
by the way).

Yes, the original shuffling algorithm with the game is definitely
deficient.  Several reasonable substitutes have been posted in
rec.games.programmer recently.  I have used one of these in
the "Mah-jongg" game with apparent success.

Incidentally, the tone of this reply seems, on re-reading, to
be rather grouchy.  So it seems obligatory to observe that I
have very much enjoyed the mahjongg game and have blown several
lunch hours with it already.  
-- 
   Mike Urban
	...!trwrb!trwspp!spp2!urban 

"You're in a maze of twisty UUCP connections, all alike"

markh@cvedc.UUCP (Mark Holm) (06/23/88)

> Ahem.  Is this 3 megabytes before or after you tar'ed, compressed, and
> uuencoded the icons?
> ---
> Jef

At the request of the moderator, I posted the files to him untouched and he
repackaged them. They occupy ~3 Mbytes in my files system. This doesn't include
the second set of icons that have the numbers on the left that I am building
an icon patch file with.

> This seems extreme.  Why do you not instead post a relatively short
> C program which can be linked with the ".o" file you distributed
> for the tiles, and which will spit the source code for the
> desired set of tiles onto standard output?  
> 
> As for the program itself: it does not play the game that I
> know by the name of Mah-jongg.  It does play the game which is
> sold by Activision under the name "Shanghai".  To the best of
> my knowledge, this game is original to Activision, although
> they have apparently done nothing to protect the game
> from duplication.  You may want to change the name of the
> program to something else to avoid misleading Mah-jongg fans.
> (A networked mah-jongg game would be a nice project for someone,
> by the way).
> -- 
>    Mike Urban

Because the .o file that I distributed did not contain all the icons (386 and 
blanks were lacking). It was not my choice to put out 38 shar files. I posted 
them to the moderator as only 4 shar files (granted they were 800k apeice ;-)
and he broke them down to the ones that have been trickling to you. Besides,
for some reason people seem to have this thing about original source ...

You are right, this is not mahjongg as we know it. I called it that because the
PC game (shareware) that inspired it was called that. While I was developing
this one, one of the other engineers where I work brought in his Mac and
showed me Shanghai. A networked (real) mahjongg has been running around in 
the back of my mind, or at least a computer vs. player version (I have no
network at home). First I need to finish learning how to play the game ...

The shuffling algorithm will be updated soon with a patch file as soon as I
get the solve working. It has been to hot to run the computer at home (no AC)
and for some reason they want me to work when I come to work ;-).

===========================================================================
Mark Holm                                ..tektronix!ogcvax!cvedc!exc!markh
Exceptions                                     ..sun!cvbnet!cvedc!exc!markh
126 NE Grant                                            Phone (503)648-8307
Hillsboro, Oregon 97124                   Messages only until after 6:00 PM

mst@csun.UUCP (Mike Temkin) (06/24/88)

>> It does play the game which is
>> sold by Activision under the name "Shanghai".  To the best of
>> my knowledge, this game is original to Activision, although
>> they have apparently done nothing to protect the game
>> from duplication.
>> -- 
>>    Mike Urban

A friend of mine played a similar game on the Plato system (CMU system
I believe) about 4 years ago.  I don't recall the name, but the board
was set up the same as the Activision game.  It was played using a 
CDC-721 touch screen terminal.

Does anyone else know of an older version of this game?  It might be
interesting just how far it (the computer version) goes back.


-- 
Mike Temkin
...!{ihnp4,sdcrdcf,hplabs,psivax,ttidca}!csun!mst
Cal. State U. Northridge, School of Engineering and Computer Science

slocum@hi-csc.UUCP (Brett Slocum) (06/27/88)

In article <1321@csun.UUCP> mst@mx.UUCP (Michael Temkin) writes:
>>> It does play the game which is
>>> sold by Activision under the name "Shanghai".  To the best of
>>> my knowledge, this game is original to Activision, although
>>> they have apparently done nothing to protect the game
>>> from duplication.
>
>A friend of mine played a similar game on the Plato system (CMU system
>I believe) about 4 years ago.  I don't recall the name, but the board
>was set up the same as the Activision game.  It was played using a 
>CDC-721 touch screen terminal.
>
>Does anyone else know of an older version of this game?  It might be
>interesting just how far it (the computer version) goes back.

I remember playing this on PLATO at least 6 or 7 years ago.  On
one of the 'ancient' Magnavox plasma panel screens with IR touch panel.
I don't remember if that was the same as the 721 or not.

-- 
Brett Slocum   UUCP: ...uunet!hi-csc!slocum
               Arpa: hi-csc!slocum@umn-cs.arpa
"My name is Inigo Montoya. You killed my father. Prepare to die."

rabbit@psivax.UUCP (Joe Kwan) (06/28/88)

In article <1321@csun.UUCP> mst@mx.UUCP (Michael Temkin) writes:
)>> It does play the game which is
)>> sold by Activision under the name "Shanghai".  To the best of
)>> my knowledge, this game is original to Activision, although
)>> they have apparently done nothing to protect the game
)>> from duplication.
)
)A friend of mine played a similar game on the Plato system (CMU system
)I believe) about 4 years ago.  I don't recall the name, but the board
)was set up the same as the Activision game.  It was played using a 
)CDC-721 touch screen terminal.


I played this version on the CSU (California State University) PLATO
(Control Data Corporation) system a few years ago.  It was also called
"mahjongg" on that system and played in the same way.  As I remember,
a few months after I played that, the Macintosh "Shanghai" game came
out which seemed to play the same turtle solitary mahjongg game.

pokey@well.UUCP (Jef Poskanzer) (06/29/88)

Well, the last part of mahjongg2 has finally arrived.  Thirty-eight parts,
about 50K per part, total size 2,011,435 bytes.  It took a week to dribble
out.  Amazing.  And now for the next few weeks, those two megabytes will
sit around in EVERY SPOOL PARTITION ON THE NET taking up space.  Whether
anyone on that system wants to play mahjongg or not.  Whether they have
a Sun or not.

On the other hand, if either the author, opus!markh, or the moderator of
comp.sources.misc, billr@tekred.TEK.COM, had taken my suggestion of tarring
and compressing the tiles, things would have been noticeably different.
Instead of the tiles taking up 1.88 meg out of 2.01 meg, they would have
taken up 207K out of 340K.  That's a factor of 9 compression for the tiles,
and a factor of 6 reduction in the total space used.  Instead of 38
installments, there would have been 7.

Here's how it should have been done:

    tar cvf tiles.tar tiles
    compress tiles.tar
    uuencode tiles.tar.Z tiles.tar.Z > tiles.tar.Z.uu
    rm tiles.tar.Z
    split -840 tiles.tar.Z.uu tiles.tar.Z.uu
    rm tiles.tar.Z.uu

And here's how the files would have been unpacked on the receiving end:

    cat tiles.tar.Z.uu?? | uudecode
    zcat tiles.tar.Z | tar xvf -
    rm tiles.tar.Z.uu?? tiles.tar.Z

Simple, eh?  So why wasn't it done this way???  Is someone a BOZO???

And is it going to be done this way in the future????
---
Jef

             Jef Poskanzer   jef@rtsg.ee.lbl.gov   ...well!pokey
              If entropy is increasing, where is it coming from?

markh@cvedc.UUCP (Mark Holm) (07/08/88)

[Flame on]
And again, Jef posts to the net instead of to the author so he might get some
recognition for something other than bad mouthing people who are just 
following the system. For your information, I had several long phone 
conversations with Bill over how to (re)post mahjongg. I started out by sending
him a patch file and the source to the icons. We then discussed  cutting
net bandwidth by compressing and uuencoding the files, but Bill said that the
GENERALLY ACCEPTED PRACTICE was to send source out clear and he decided to
do it that way and include a complete (patched) source set as well. I personally
think that Bill is doing a great job given the volume of source that he has to 
clear, and I think he should be commended on a job well done. So if you
do not like the way the job is getting done, either get in a position of
influence or do it yourself!
[Flame off]

Now that I have that off my chest, please check comp.sources.bugs for the first
official patch to the icon files. This patch moves that numbers and letters that
get covered by stacking to the lefthand side of the tiles. For those of you
who like the tiles the way they appear in a real set ignore this patch 
(I did ;-). The nice people at Sun went through my code and changed a goodly
portion (most) of event.c to change from up buttons to down buttons for 
selecting tiles and extended the single help to show multiple matches. I 
like it! I really did not want to finish figuring out the button down drag
algorithm anyway, as nobody was using it (except me) in the beta version. Which
was why it was (almost) stripped out anyway. I also have a (real nice) shuffling
algorithm that was contributed through channels. Gives a nice even distribution
of tiles. Games are a little harder, but what the heck! I will try to get that
patch together and out tomorrow. If not, it will be two weeks before I get back
from Sun training and I will post it then. So, you might want to hold out for 
the official version as opposed to rogue patches ;-).

===========================================================================
Mark Holm                                ..tektronix!ogcvax!cvedc!exc!markh
Exceptions                                     ..sun!cvbnet!cvedc!exc!markh
126 NE Grant                                            Phone (503)648-8307
Hillsboro, Oregon 97124                   Messages only until after 6:00 PM