Author Topic: QB64 Mahjong  (Read 30008 times)

0 Members and 1 Guest are viewing this topic.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
QB64 Mahjong
« on: September 26, 2018, 12:14:36 pm »
This is a Mahjong Solitaire program, updated from where it first appeared at [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there].  This version has been produced with InForm.  You will find that the tile images are unique (and one set is QB64-specific).

Incorporating InForm into a project is extremely easy, and I encourage its widespread use.

You will need the User Manual to download.

Richard

04/07/20: User Manual Updated (for easier Dropbox download of program).  176 previous downloads.
 

 
screenshot.jpg

« Last Edit: July 04, 2020, 05:21:08 am by Qwerkey »

FellippeHeitor

  • Guest
Re: QB64 Mahjong
« Reply #1 on: September 26, 2018, 12:28:31 pm »
Cool screenshot, Richard. I'll be sure to check the game out when I get home tonight.

Fellippe.

FellippeHeitor

  • Guest
Re: QB64 Mahjong
« Reply #2 on: September 27, 2018, 12:13:22 pm »
Great job indeed, Richard. Keep it coming and thanks a million for the support.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 Mahjong
« Reply #3 on: August 28, 2019, 10:30:32 am »
Hi Richard,

I saw you application for tool box for this game, didn't remember it so checked it out. How did this get by me? My mother plays and I have been asked to come learn and play when they are short a partner, apparently they need 4.

So I am interested in learning maybe and maybe I was expecting your game to need 4 players.
Nope! Yours is a solitaire game with computer, I just learned, excellent, I am further intrigued.

Beautiful! I was expecting thousands of lines of code but you have it in at around 700, nice.
Also nice, clever selection of images for tiles / groups and the splash screen, cherry blossom QB logo :)

I just noticed in screen shot the tiles are stacked in like a pyramid, interesting...

As I said I was hoping to learn from your game, but I encounter this in PDF Manual:
Quote
QB64 Mahjong
This is a Mahjong Solitaire program.  The program plays exactly as the “Turtle” Mahjong Solitaire in Microsoft Windows (Windows 8 or earlier).  All the moves are as standard Mahjong Solitaire – you play by pairing tiles until zero remain.  I do not give the detailed rules, as I assume that everyone will be familiar with the game.  I use my own scoring scheme.  There are bonus scores for removing all four of each matching type together.

So I guess I need to learn more about playing, I gather it is about matching tiles but where do matches go?

Perhaps you can recommend a link for getting started? so I might practice a little with your game.

Thanks

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: QB64 Mahjong
« Reply #4 on: August 28, 2019, 12:21:14 pm »
bplus, I have never played "proper" Mahjong (or Mahjongg - how do you spell this game?), so I can't help you with the rules for that.  For Solitaire Mahjong, the 144 tiles are stacked in a pyramid on top of each other (as you say) and you have to take off the tiles by taking two tiles together.  The User Manual will tell you which tiles can be paired with which to do this.  Tiles which are not under existing ones and which do not have a tile on both sides can be removed if paired with an appropriate other.  I hope that explains the rules for the solitaire game.  In our household, we very much enjoy the game.  You can check out Microsoft's* Solitaire where there are variants in starting layout.

* Note to Odin: I should rightly be chastised for recommending any of this dreadful company's products, but beg not to be blackballed from the site for this heresy.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 Mahjong
« Reply #5 on: August 28, 2019, 01:29:14 pm »
Thanks Qwerkey, that should be enough to get me started down the path of trial and terror :)

Update: Oh man! click the right tile and it flashes what other tile to click, easy peasy! Am I in training wheels mode?, good thing because I don't understand why some combo's work and some don't.
« Last Edit: August 28, 2019, 07:04:28 pm by bplus »

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: QB64 Mahjong
« Reply #6 on: July 03, 2020, 05:34:37 am »
@FellippeHeitor I am updating this old program (with maybe a view to putting it into Games).  The Form (QB64Mahjong.frm) needs updating to make it look a litle smarter.  However, when I update the Form with UIEditor and then move the new form into my existing QB64Mahjong Folder, the IDE gives the following error:

 
Mahjong.png


I have previously over-written Forms in this way without problems.  Any ideas?  The Form has been updated with a newer version of Inform.  Is this going to be the problem?  Thanks.


Offline gaslouk

  • Newbie
  • Posts: 29
    • View Profile
Re: QB64 Mahjong
« Reply #7 on: July 03, 2020, 06:25:22 am »
If there are new controls, they must be updated in the .bas file.
"dim shared something.bt or somethiong.lb" or anything else new.
« Last Edit: July 03, 2020, 06:40:49 am by gaslouk »

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: QB64 Mahjong
« Reply #8 on: July 03, 2020, 06:49:28 am »
@gaslouk Yes, I have already updated the .bas file with the new controls (that bit I do know how to do - at least I think that I do!).

Offline gaslouk

  • Newbie
  • Posts: 29
    • View Profile
Re: QB64 Mahjong
« Reply #9 on: July 03, 2020, 07:17:01 am »
Upload new .frm file
In my PC i must put all envelope path to run the program inside QB64 catalog.
« Last Edit: July 03, 2020, 07:30:58 am by gaslouk »

FellippeHeitor

  • Guest
Re: QB64 Mahjong
« Reply #10 on: July 03, 2020, 08:24:19 am »
Quote
The Form has been updated with a newer version of Inform.  Is this going to be the problem? 

Yes. The newer form will require you to use the newer library files - InForm.ui and xp.uitheme. Replace the older versions in your project's folder.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: QB64 Mahjong
« Reply #11 on: July 03, 2020, 10:00:48 am »
Dear me!  That has done the trick.  Why I didn't just do that, I don't know.  It was the sensible thing to try.
« Last Edit: July 03, 2020, 01:31:45 pm by Qwerkey »

FellippeHeitor

  • Guest
Re: QB64 Mahjong
« Reply #12 on: July 03, 2020, 10:05:02 am »
Good to know it's solved! Looking forward to the Mahjong update.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB64 Mahjong
« Reply #13 on: July 04, 2020, 11:26:42 am »
Looking good! @Qwerkey

I am thank full the window fits my screen.

I will mention to others that you can get the game from the PDF file in a zip package.

For players unfamiliar with the game (as I was), you just click a tile and all the matching tiles you can pair and eliminate WILL light up for you. The object is to eliminate all the tiles and I imagine there is some luck involved in the pile you start with and maybe? some skill involved in the order you remove tiles (not sure about that as I am not practiced with game yet). I am wondering if you reach a point of looking at a pile and seeing it is impossible to clear.
« Last Edit: July 04, 2020, 12:17:30 pm by bplus »