[Game] AHK Mahjong Solitaire

Post gaming related scripts
User avatar
SpeedMaster
Posts: 100
Joined: 12 Nov 2016, 16:09

[Game] AHK Mahjong Solitaire

17 Nov 2017, 19:13

I decided to write a mahjong game to challenge myself. Here is the code ... :geek:

Code: [Select all] [Expand] [Download] (mahjong.ahk)GeSHi © Codebox Plus

Last edited by SpeedMaster on 06 Dec 2017, 06:19, edited 5 times in total.
TheDewd
Posts: 807
Joined: 19 Dec 2013, 11:16
Location: USA

Re: [Game] AHK Mahjong

22 Nov 2017, 15:42

Your Base64 PNG image encoding can be optimized to make your code more compact. See below:

Original: 8.74 KB (8,950 bytes)

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

bla :="iVBORw0KGgoAAAANSUhEUgAAADYAAABPCAMAAACXtsbmAAABJlBMVEUAAAC5k2O9kl+6kV+5kF6+kl6+k17ZxZu4jVnk2LHCk13z68br5b52SBPs48Xu5cft48bv5cjr4sTx58nr4cXw5sjp4cXx6crW0Lj7+Ozo4MTh2sDc1byzrZjf2L7W0bq1r5vf2MHt5cnn3sTc1sDZ07zUzrjSzLWVi3WRh3Hd177c1LrQyrRJOyf38+Ty7NT479Df172/taSZkHtGNiL49Ob07dbm3sL8+u7379fz683j28DY0bjTzbfUzrXKw7KxqpZIOSVENSH69uf28+TY0ruSiXT7+O7x6dLa1b3At6aWjnnv6dH17M6bkn769eXj28Pk3MHNxbXFvqzHwK/Cu6meloJgQR2rn4aMgWv48Nnp5MymjWh+dmNvYk2TckeEaUVNOB7/66GVAAAADXRSTlMAA04ZFKFYUUkXllZOmUa9hwAAApVJREFUWMPl1+tS2kAYgOEIWmvboIJizCIYIAkGKCUgtE0iYgsKlPOh2nPv/yb67RqyzGSs4ZuOf/oawwbmmcBmYUAQ1+zlzoYAiWIDmpnT7mQyNU1z3jXZjdmdzSazxrwxaXS7cF+ja97+pG57kzrx+viBrllvlx0Pa6Nv1IXC4MTzj26veefLhsPhB7fhl9JX7RdzcD6xdPOJdcMqudVKNbd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eLzsQOsur+yiOCDYGVaUJAw0lNUOlYbclDtjIOOUZ5d21U7uDFkVZryFyUSxQqTmUvmBKV103I4lGK1Wdl9MXmma7dNpxw7dGQNjle78RMmVluRsH03UUowxmFbTWJIoz0/MJyTKOsudmYcS9LeUJKL5icXhAOVUPFCzGUPebcrA7Pxwc/FY1OtUVrZJznpJ0blXi/ouFUUDok05mZ8o+HXXju06UHQoQBRhAAgujIJxWn8cMdFlljvDJyeYH9/VX1Qm2tWSjNf2nJ8sz2+NArvCTLMwMizS3TxVfmqqMcq5zOKdDJ9StasmmSg/1VQyvlNyzHKZRmGm91wtTh4/3VJSckiyKDxNtzLy7zJydXZ+srl4sTEg2mahHxsjLykp0j8+GW/ouxOQnIp3ZzRMDHlRAYm1KbjYpxEFnZFTAfsmZYxsB4wokFYW5qdoiSWRw+VMJcwv8sA1FabraBXMNC2YYaVAcE1TFEXTNLgowXS5uzMMfYAUJOXmGiv6cC5udyQnw3b07Ei3+U/1EJZz5swW97Zv345W+Gt2LYew5fS/2Jp/Y+v/yXk8K1f8E/OsWr5b7YGtXLtctcKD3TLVyl/pRHy9/FauIwAAAABJRU5ErkJggg=="

In this example, I was able to remove 2,436 characters from the script.
User avatar
SpeedMaster
Posts: 100
Joined: 12 Nov 2016, 16:09

Re: [Game] AHK Mahjong

23 Nov 2017, 06:27

TheDewd wrote:Your Base64 PNG image encoding can be optimized to make your code more compact.

Hello,
Tanks for your help, I updated the tileset with yours. :thumbup:
Btw, your "2D Project" inspired me to make this game. Using a 2D data grid to make a game is a great idea, Thanks. 8-)
I think that Hellbent is also making a game (Minesweeper) using a similar approach. :roll:
https://autohotkey.com//boards/viewtopi ... =5&t=38971
Helgef
Posts: 2483
Joined: 17 Jul 2016, 01:02
Contact:

Re: [Game] AHK Mahjong

23 Nov 2017, 07:46

Wow! Looks great, good job!
I do not remember the rules for this game though :think:.

Thanks for sharing :clap:
User avatar
joedf
Posts: 6019
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: [Game] AHK Mahjong

23 Nov 2017, 09:56

I gotta try this :+1:
User avatar
SpeedMaster
Posts: 100
Joined: 12 Nov 2016, 16:09

Re: [Game] AHK Mahjong Solitaire

23 Nov 2017, 18:06

Hello,
I changed the name of the game to "Mahjong Solitaire" so it will not be confused with the traditional form of Mahjong.
"Mahjong Solitaire" is also known as "Shanghai MahJong" or "Shangai Solitaire".

Helgef wrote:I do not remember the rules for this game though :think:.

Mahjong Solitaire is an easy to learn matching game puzzle which makes it very popular. ;)

rules:
http://www.mahjongdragon.com/mahjong_rules.php
video:
https://www.youtube.com/watch?v=kwtFQkO7f8E
Helgef
Posts: 2483
Joined: 17 Jul 2016, 01:02
Contact:

Re: [Game] AHK Mahjong Solitaire

23 Nov 2017, 18:24

rules wrote:All of the seasons and flowers can be matched with each others,

This is very nice, thank you :)
User avatar
lmstearn
Posts: 135
Joined: 11 Aug 2016, 02:32
GitHub: lmstearn

Re: [Game] AHK Mahjong Solitaire

28 Nov 2017, 06:39

Beautiful! All that's needed is a click sound for tile select, and click_success for match. :)
The bottom of the form is obscured by the taskbar- if there is a taskbar showing it shouldn't be a drama creating the form in the remainder of the screen.
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
User avatar
SpeedMaster
Posts: 100
Joined: 12 Nov 2016, 16:09

Re: [Game] AHK Mahjong Solitaire

30 Nov 2017, 19:02

lmstearn wrote:Beautiful! All that's needed is a click sound for tile select, and click_success for match. :)
The bottom of the form is obscured by the taskbar- if there is a taskbar showing it shouldn't be a drama creating the form in the remainder of the screen.

Thanks for your feedback. :roll:
New version 1.5
- Reoganized layout to support resolution (1280x800)
- Sound effects (press F2 to enable/disable)
- Score
User avatar
SpeedMaster
Posts: 100
Joined: 12 Nov 2016, 16:09

Re: [Game] AHK Mahjong Solitaire

06 Dec 2017, 06:24

New version 1.6 :)

- Undo moves button.
Xatmo

Re: [Game] AHK Mahjong Solitaire

14 Dec 2017, 00:52

Great Game got to 57 points on a hard shuffle then got blocked lol.
User avatar
SpeedMaster
Posts: 100
Joined: 12 Nov 2016, 16:09

Re: [Game] AHK Mahjong Solitaire

14 Dec 2017, 14:24

Xatmo wrote:Great Game got to 57 points on a hard shuffle then got blocked lol.

the "hard shuffle" generates a blind and raw shuffle (like you would do if you have a real board game) in this case, the puzzle may or may not have a solution, on the other hand the "smart shuffle" plays the game randomly and backward to ensure a path to the solution in that case the board is always solvable (=at least one solution exist) although it is sometimes difficult to find the winning path and you may end up in a blocked situation. ;)

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 3 guests