New Game: Mahjong Solitaire

People are still making stuff for the Sinclair related machines. Tell us about new games and other software that runs on the Spectrum, ZX80/ZX81, Pentagon and Next.
User avatar
Under4Mhz
Drutt
Posts: 15
Joined: Fri Apr 23, 2021 7:36 am
Location: Brisbane

New Game: Mahjong Solitaire

Post by Under4Mhz »

Match the sames tiles until all the tiles have been removed.

Season tiles are interchangeable with each other as are the flower tiles.

Z or fire button to select and match tiles. X key to show tiles blocked from view.

Can you clear all the tiles?

Image Image

Image Image

ZX Spectrum 48K version
https://drive.google.com/file/d/1ndFkiU ... sp=sharing

ZX Spectrum 128K version (with enhanced sound)
https://drive.google.com/file/d/1FGvXLM ... sp=sharing
User avatar
Under4Mhz
Drutt
Posts: 15
Joined: Fri Apr 23, 2021 7:36 am
Location: Brisbane

Re: New Game: Mahjong Solitaire

Post by Under4Mhz »

New release 1.01:
- Fixed title music for 128K

ZX Spectrum 128K
https://drive.google.com/file/d/1RlQvua ... sp=sharing

Please let me know if you find any issues.
zxcygnus
Drutt
Posts: 31
Joined: Mon Aug 24, 2020 3:11 pm
Contact:

Re: New Game: Mahjong Solitaire

Post by zxcygnus »

It looks and works really nice. It is probably best looking Mahjong on ZX Spectrum. Thank you.

But again - why that black border around? I think, green would look better.

Will you publish source codes too?

Image
https://cygnus.speccy.cz/ - mostly harmless user of ZX Spectrum 128k +2, Betadisk with TRDOS 5.05cz or DivIDE with ESXDOS
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: New Game: Mahjong Solitaire

Post by 4thRock »

Great work, really enjoyed it ;)
I like that the tiles are nicely drawn and in color. Interface is simple and responsive enough.

My only problem is with the green colour on pieces. Green is really problematic on the Spectrum. It's too light so it won't contrast well with white.
Also the Green background doesn't help. It's confusing, ideally you should use separate colours for separate elements.

Just a suggestion:
Image

Constructive comment I hope! :D
zxcygnus
Drutt
Posts: 31
Joined: Mon Aug 24, 2020 3:11 pm
Contact:

Re: New Game: Mahjong Solitaire

Post by zxcygnus »

I really like tiles as they are now and i like green background. But maybe as selectable "high contrast" option? Would be fine.

Another detail i don't understand - why separate 48k/128k versions? Is only reason AY sound? Cannot be selectable (with autodetection if memory pages are available) for computers with only 48k memory, but with AY interface?
https://cygnus.speccy.cz/ - mostly harmless user of ZX Spectrum 128k +2, Betadisk with TRDOS 5.05cz or DivIDE with ESXDOS
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: New Game: Mahjong Solitaire

Post by 4thRock »

[mention]zxcygnus[/mention] Yes a contrast option would be great!
Green background is not a big problem, as long as the tiles use different colours. This would work well for me:
Image
User avatar
Under4Mhz
Drutt
Posts: 15
Joined: Fri Apr 23, 2021 7:36 am
Location: Brisbane

Re: New Game: Mahjong Solitaire

Post by Under4Mhz »

zxcygnus wrote: Mon Jun 28, 2021 9:09 am But again - why that black border around? I think, green would look better.

Will you publish source codes too?
I agree, a green border would be better. The black is because it's easier with the 48K sound engine. I have to have a variable and mask with the set background colour, which will mess with the sound timing (or change it each time I release a different game, which won't work long term). It's a matter of spending time on it.

Some point in the distant future I'll probably release the source. Right now I just want to code. If anyone thinks they'll find bit of my code useful, I don't mind releasing that part.
User avatar
Under4Mhz
Drutt
Posts: 15
Joined: Fri Apr 23, 2021 7:36 am
Location: Brisbane

Re: New Game: Mahjong Solitaire

Post by Under4Mhz »

zxcygnus wrote: Mon Jun 28, 2021 9:48 am Another detail i don't understand - why separate 48k/128k versions? Is only reason AY sound? Cannot be selectable (with autodetection if memory pages are available) for computers with only 48k memory, but with AY interface?
Yes, it's just for the AY sound. I have two source files for sound, each with the same functions, but writing to the different sound hardware. I simply compile in the right one - this is just the quickest and easiest approach. To be able to change the sound dynamically, I have to start writing object oriented code (structs of function pointers) which is a few days work. I'd rather be writing the next game. I didn't really think it was a problem for people to pick the version for their system. I suspect most people have either a 48K or 128K and will only use one.
zxcygnus
Drutt
Posts: 31
Joined: Mon Aug 24, 2020 3:11 pm
Contact:

Re: New Game: Mahjong Solitaire

Post by zxcygnus »

Under4Mhz wrote: Wed Jun 30, 2021 12:14 pmSome point in the distant future I'll probably release the source. Right now I just want to code. If anyone thinks they'll find bit of my code useful, I don't mind releasing that part.
I understand. I was just curious because i still think it would be very nice modify your Klondike to allow mouse control, ideally at a same time with keyboard. I recently published fully commented source code of universal mouse driver (here is last version viewtopic.php?t=5124).

But control Mahjong with mouse would be little harder, because tiles could be hidden behind others.
Under4Mhz wrote: Wed Jun 30, 2021 12:36 pmYes, it's just for the AY sound. I have two source files for sound, each with the same functions, but writing to the different sound hardware. I simply compile in the right one - this is just the quickest and easiest approach. To be able to change the sound dynamically, I have to start writing object oriented code (structs of function pointers) which is a few days work. I'd rather be writing the next game. I didn't really think it was a problem for people to pick the version for their system. I suspect most people have either a 48K or 128K and will only use one.
It is not problem, again, I am just curious. Because why not combine it if space in memory still remains?

Switching between two configurable possibilities is very easy if you are programming in assembler. You can test value or even rewrite address in jp/call. It can be done so it doesn't costs any cpu t-states (clock ticks) during runtime. But i don't know how to do it properly in C for example.

Today, when we have emulators and fast storages for real machines it is really minor detail. Personally i am using DivIDE most of time. But for some exceptionally nostalgic people which are trying load it from real tape on real computer it can be inconvenience. Combine maximum possibilities is one way how to do it better. (and compress final binary file to be smallest as possible)

What i have on mind is for example Jet Story. https://spectrumcomputing.co.uk/entry/2 ... /Jet-Story

In game Jet Story, you can select whatever combination of sounds and sound effects you want totally independently. It is game for ZX Spectrum 48k, but authors expected many users have expanding interface with AY. Which was very popular at the time. On 128k machines is only difference, AY music is switched on by default.

About that border color during sounds - you can use XOR and toggle only one bit which is significant for sound output. It took same time for any color.

Hint: Orfeus? https://spectrumcomputing.co.uk/entry/8523 It have compiler, you can compile music from it to independent binary which can be integrated in game.

If you want make version for Betadisk (TRDOS), i can help you with it.
https://cygnus.speccy.cz/ - mostly harmless user of ZX Spectrum 128k +2, Betadisk with TRDOS 5.05cz or DivIDE with ESXDOS
User avatar
Alessandro
Dynamite Dan
Posts: 1910
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: New Game: Mahjong Solitaire

Post by Alessandro »

I like this new version of the classic Chinese game. Personally I am not bothered by the green background or the black border. My only criticism is that the INVERSE colors of highlighted tiles do not look good to my eyes.

Would you please consider making them just black and white, or blue and white, with the darker color as PAPER and white as INK?
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: New Game: Mahjong Solitaire

Post by azesmbog »

I won the second time.
I would like a restart button - sometimes there is a hopeless situation.
Mouse support would also be desirable. Now there are quite a few clones of the Spectrum with support for Kempston mouse
User avatar
Under4Mhz
Drutt
Posts: 15
Joined: Fri Apr 23, 2021 7:36 am
Location: Brisbane

Re: New Game: Mahjong Solitaire

Post by Under4Mhz »

azesmbog wrote: Wed Jun 30, 2021 8:35 pm I won the second time.
I would like a restart button - sometimes there is a hopeless situation.
Mouse support would also be desirable. Now there are quite a few clones of the Spectrum with support for Kempston mouse
I agree mouse support would be great. At some point I might add it, but it's a fair bit of work.

I can probably add a restart. The reason I haven't is the game will tell if there are no more moves. If you're still playing, there's still a another move to make. There's been a few times when I'm sure I had a bug, but eventually I found the match.
User avatar
Under4Mhz
Drutt
Posts: 15
Joined: Fri Apr 23, 2021 7:36 am
Location: Brisbane

Re: New Game: Mahjong Solitaire

Post by Under4Mhz »

I've create a new release:

- Set background colour to green
- Set highlighted tiles to grey
- Changed green foreground to magenta

ZX Spectrum 48K
https://drive.google.com/file/d/1FHiefH ... sp=sharing

ZX Spectrum 128K
https://drive.google.com/file/d/1aQUYRB ... sp=sharing
Art
Manic Miner
Posts: 206
Joined: Fri Jul 17, 2020 7:21 pm

Re: New Game: Mahjong Solitaire

Post by Art »

It looks very nice, good work!

By the way, it's interesting that this type of game was invented in USA in 1981. The original Chinese mahjong is completely different game, but it uses the same tiles. That's why the American game is called Mahjong Solitaire, Peking, Shanghai etc.
User avatar
Alessandro
Dynamite Dan
Posts: 1910
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: New Game: Mahjong Solitaire

Post by Alessandro »

[mention]Under4Mhz[/mention] Now it looks much better to me, thanks :)
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: New Game: Mahjong Solitaire

Post by 4thRock »

Much better now! :D :D
It's a really good game!

My only suggestion is to have some mention to keyboard shortcuts visible during gameplay. I had to return to the forum to see that X showed blocked tiles.
No need for a full explanation, just something like "QAOP SP Z R" at the bottom right of the screen. That's enough.
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: New Game: Mahjong Solitaire

Post by azesmbog »

Under4Mhz wrote: Sun Jul 04, 2021 3:40 am The reason I haven't is the game will tell if there are no more moves. If you're still playing, there's still a another move to make.
Oh well. then one of two things.
Either I don’t understand something, or I don’t see the moves.
*del*
I am attaching a snapshot, but in .z80 format
I can attach a screenshot, but I think it is less informative.
https://drive.google.com/file/d/1PWYhta ... sp=sharing
Where am I wrong?))
azesmbog
Manic Miner
Posts: 307
Joined: Sat May 16, 2020 8:43 am

Re: New Game: Mahjong Solitaire

Post by azesmbog »

oops
Sorry I found a solution :(
Sometimes tile after tile merges and it's hard to hit and pick.
Was wrong! I'll fix it! :)
Thanks for the good game!
michellekg
Drutt
Posts: 35
Joined: Tue Nov 14, 2017 9:54 pm
Location: St. Petersburg
Contact:

Re: New Game: Mahjong Solitaire

Post by michellekg »

Under4Mhz wrote: Sun Jul 04, 2021 3:45 am I've create a new release:
Very nice game! For some reason it's nicer to play Mahjong on Speccy then on my iPhone )

May I offer some improvements?

1) That magenta background from 4throck looked very nice. Can you make it optional please? With blue of green foreground of course.

2) How about green border on first screen instead of black one?

3) For now cyan sides of tiles are bright because you need to keep faces of tiles bright white. But I think that it's better for eyes (and for undestanding your field) to make these sides non-bright cyan and make a little part of face of tiles non-bright too (a little bit of grey). Also it's better to print number of tiles with different color, don't you think?

Here's my mock-up:

Image

4) How about "universal app" with 128K and 48K modes combined?
User avatar
patters
Manic Miner
Posts: 471
Joined: Thu Apr 11, 2019 1:06 am

Re: New Game: Mahjong Solitaire

Post by patters »

I used to love Shanghai on the Mac many years ago so I was intrigued to see how you went about designing the graphics for this, with such restrictive constraints. I wouldn't have believed such colourful results were possible!

I think you've absolutely nailed it largely, but I would agree with michellekg that those bright cyan corners of tiles look off - they really stand out as inconsistent. The mock-up above looks better in that regard (making them non-bright). They sort of look at bit like a shadow then, which is more logical.

Also, it looks a bit too magenta now I think. Could a few tile sets be black perhaps? Or does that result in it looking too dull?
User avatar
Under4Mhz
Drutt
Posts: 15
Joined: Fri Apr 23, 2021 7:36 am
Location: Brisbane

Re: New Game: Mahjong Solitaire

Post by Under4Mhz »

New Version.
- Black on number tiles
- Green background on title

Mahjong ZX48K
https://drive.google.com/file/d/1_hkJRE ... sp=sharing

Mahjong ZX128K
https://drive.google.com/file/d/1NcKqvx ... sp=sharing
michellekg
Drutt
Posts: 35
Joined: Tue Nov 14, 2017 9:54 pm
Location: St. Petersburg
Contact:

Re: New Game: Mahjong Solitaire

Post by michellekg »

Under4Mhz wrote: Thu Jul 15, 2021 4:40 am New Version.
- Black on number tiles
- Green background on title

Mahjong ZX48K
https://drive.google.com/file/d/1_hkJRE ... sp=sharing

Mahjong ZX128K
https://drive.google.com/file/d/1NcKqvx ... sp=sharing
Looks very nice, thanks!
michellekg
Drutt
Posts: 35
Joined: Tue Nov 14, 2017 9:54 pm
Location: St. Petersburg
Contact:

Re: New Game: Mahjong Solitaire

Post by michellekg »

Under4Mhz wrote: Thu Jul 15, 2021 4:40 am New Version.
I think I found a little bug. Kinda. If you select a tile and then hover over a tile that overlaps the selected tile with one corner, that corner will not be gray, but white. It's like the bright attribute is being inverted. Here's how in this picture (I have drawn a red circle around this two tiles):

Image
User avatar
R-Tape
Site Admin
Posts: 6408
Joined: Thu Nov 09, 2017 11:46 am

Re: New Game: Mahjong Solitaire

Post by R-Tape »

Zeke wrote: Fri Aug 20, 2021 6:05 pm If you liked best-seller lists and playing cards for the mental fiesta, then solitaire is the game for you.
Welcome [mention]Zeke[/mention]! Do you have a favourite ultimate game?

EDIT - turned out it was Lunar Spambot (user deleted).
merman
Microbot
Posts: 121
Joined: Wed Sep 29, 2021 2:50 pm

Re: New Game: Mahjong Solitaire

Post by merman »

MercCarcade wrote: Tue Feb 07, 2023 5:10 pm I love the idea of seasonal tiles being interchangeable with each other, as well as the flower tiles. It adds a fun twist to the traditional mahjong solitaire gameplay.
That is traditional mahjong - any flower can be matched with any flower, any season with any season. Applies to the game and the solitaire/puzzle type.
Post Reply