Any interest in Mahjong Solitaire? #2376
Replies: 5 comments 4 replies
-
|
It looks fantastic. By the way, to show a bitmap without the rest of the interface of the bitmap editor you may also use function |
Beta Was this translation helpful? Give feedback.
-
|
Think I'm fairly happy with these now. Game in the future once I get some work done on some straggling Interlisp code. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Ryan,
Why do you think that you need to erase first?
You can BITBLT in REPLACE mode and that ought to do the job. Or, am I misunderstanding something?
On the other hand, to REMOVE a tile, you would need to repaint the parts of the tiles that were covered. Some partially, especially due to the 3D perspective and “overhang”. (And the 4 tiles under the single top-most.)
It might be simplest to have versions of tile masks that trim the standard tile for the different cases of displaying the tile:
uncovered (no mask),
partially covered by tiles on level above East, South East, South
(In the image you shared, for the “8 Circles” tile at the left end of the 2nd row, “1 character” is East, “9 bamboo” is South East. For the “5 circles” in the top row “Autumn” is South.
The repainting of the 4 tiles after removing the top-most (center), are just unobstructed.
The more “brute force solution” when removing a tile (pair) would be to repaint the whole stack to a staging bitmap, and then BLT that to the window. Because of the 3D, repainting from upper left across to lower right should give the correct result image.
One advantage of always repainting the whole stack is to see everything happening while debugging. (In debug, just paint directly to the window.)
Matt
FYI: Mahjong tiles are defined Unicode glyphs: U+1F000-U+1F02B. https://en.wikipedia.org/wiki/Mahjong_Tiles_(Unicode_block)
These are out of the MCCS character set range, but could be generated into bitmaps from BDF files and the glyph bitmaps extracted.
From: Ryan Burnside ***@***.***>
Sent: Saturday, November 22, 2025 7:05 PM
To: Interlisp/medley ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [Interlisp/medley] Any interest in Mahjong Solitaire? (Discussion #2376)
I'll post a picture of a traditional layout below.
The tiles actually overlap and obscure the ones below. (And tend to stack upward at a 45 degree angle)
I think what I'd need to do is make a mask and erase the shapes below, using white then overlay it with only the black of the file itself in a 2 pass per tile. Draw them from the first row down, one layer at a time, with each tile whiting out the pixels below then rendering the black part.
Screenshot_20251122_195727.png (view on web) <https://github.com/user-attachments/assets/2c30bc7f-b600-4f51-8c23-19dce82e3872>
—
Reply to this email directly, view it on GitHub <#2376 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB7BB4TSJCOUN7SPQUZGBTL36EP43AVCNFSM6AAAAACMHMPAHCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTKMBUHE2TGOI> .
You are receiving this because you are subscribed to this thread. <https://github.com/notifications/beacon/AB7BB4TUECMVPRHQ7TBIZA336EP43A5CNFSM6AAAAACMHMPAHCWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQA4WRUG.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
|
Matt, I was considering that if I used replace mode the transparent white corners would just be blitted as white (messing up the tiles underneath and not giving me that smooth 45 degree angle). Essentially I think I need 3 notions of color, white, black and the transparent color for the corners of the tiles. The other idea has some merit too drawing the different types of intersections and overlaps. Your brute force idea was what I was thinking ultimately. One function to repaint everything to an intermediate bitmap offscreen that happens once per click if PIECE-REMOVED-P is T. :) I think Medley just might be quick enough to handle it - though I've not smoke tested it yet. Anyway here is the image with all the strange overlaps that can happen. (There are many more in theroy).
|
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've spent the afternoon (about 6 hours) making some tiles (they're still in progress).
I may do a Medley version of the Mahjong Solitaire game if there is interest.
The graphics I did in GrafX2 then imported.
I play occasionally on my Linux computer.

Beta Was this translation helpful? Give feedback.
All reactions