MahJongg Wii

From WiiBrew
(Redirected from User:JustWoody/MahJongg Wii)
Jump to navigation Jump to search
MahJongg Wii
Mahjongg Wii Icon.png
General
Author(s)JustWoody
TypeBoard game
Version0.8
LicenceGPL
Links
Download
Source
Downloadable via the Homebrew Browser
Peripherals
Wiimote1.svg WiiMote2.svg SensorBar.svg Loads files from the Front SD slot Loads files from SDHC cards in the Front SD slot

MahJongg Wii is a Mahjongg solitaire tiles game written specifically for the Wii, developed with devkitPro tools and using the GRRLib for rendering, sndlib for music and sound, and wiiuse for wiimote.

    • NOTE**

Newest version is NOT the sidelink. Newest version is found below, under the "Releases" section.

How to play

The goal is to clear the board by removing all the tiles. Tiles must remove in pairs. A pair consists of two tiles which both are a) "free" and b) identical (or of the same type).

A tile is "free" when:

  • No other tile is lying above or is partially covering it
  • No other tile is lying to the left or to the right of it (it can "slide" in one or both these directions)

Two tiles are identical if they look exactly the same. The exception to this are the Flowers and Seasons tiles. They are non-identical numbered matching tiles and belong to the same type. All the Flowers tiles match one another and all the Season tiles match one another.

There are four of each tile in the game except for the Flowers and Seasons tiles which appear only once.

It's not as easy as it sounds; you can end up with having matched the "wrong" pairs and you may find yourself stuck, with unmatchable tiles blocking other key tiles so you can't clear the layout. You must be careful before removing a pair, you should look for where the remaining pair is in the layout and plan ahead. If all four of an identical tile are free, remove them to 'unclutter' the field. It's not only a game of pure luck, you have to play strategically.

Play Modes

One player

A single player tries to remove all the tile pairs in the shortest possible time.

Two Player Co-op

Two players play cooperatively trying to remove all tiles in the shortest possible time. Both players can select tiles independently with each player also having the capability to finish off the others pairing by selection a equivalent tile.

Two Player Versus

Two players compete against each other to get the highest score. Points are awarded for each matching tile pair selected, with different tile types being worth different amounts as follows:-

Tile Type Pair Value
Bamboo, Characters & Circles 5
Winds 10
Seasons & Flowers 15
Dragons 20

If one player gets multiple pairs in a row without the other player getting any pairs, points are multiplied by the number of pairs in a row (e.g. x2 x3 x4 etc.)

Stealing - players can select tiles already selected by the other player thus disrupting / deselecting the other players choice.

Controls

Menu

The menu is controlled using Wiimote 1

Wiimote.svg Action
Wii Remote Aim Move pointer
Wiimote A Button Select item
Wiimote B Button Move back to previous menu
Wiimote + Button Page forward (on language selection screen)
Wiimote - Button Page backward (on language selection screen)

Game

The game is controlled using Wiimote number 1 and 2 depending on game mode chosen

Wiimote.svg Action
Wii Remote Aim Move pointer
Wiimote A Button Select tile
Wiimote B Button Clear selected tile
Wiimote + Button Pause / Un-pause
Wiimote HOME Button Quit game / return to menu

All

Wiimote.svg WiiDrawing.svg Action
Wiimote Power Button Wii POWER Button Power off the Wii in standby mode
Wii RESET Button Reset the Wii to Main Menu

Screenshots

Releases

Unofficial Update to v0.97 by pharmville

Download - [1]

No changes were made to the game code, but this was compiled with more recent libogc code, so that the newer wiimote plus (RVL-CNT-01-TR) will be functional in the game.

v0.97 20/12/09

Download - Mahjongg Wii v0.97

  • Build with new devkitpro r18, libogc 1.8.1, libfat 1.0.5
  • Fix array out of bounds (thx to new gcc)
  • Basic high scores for single player and coop
  • 6 new layouts
  • Show left tiles in game
  • Undo of last move (with time penalty)
  • After a game is finished you can restart with a random layout
  • Fix crash if you turn of your Wii while in menu
  • Wide screen option is now set when loading the game
  • Config is saved within the boot.dol folder
  • Add printing version number in the main menu
  • Code cleanup

Known issues:

  • no japanese language
  • currently only english and german
  • sounds are not optimal

To help to fix those issues check: Talk:MahJongg_Wii#Further_development

More info: wii mahjong

v0.8 23/02/09

Download - Mahjongg Wii v0.8

  • Added multiple tilesets!
  • Added character voices on 2 player versus mode
  • Re-encoded and removed cracklys from the sound effects
  • Added graphic when two player game ends as a draw
  • Tidied up and fixed bugs around the placing of tiles / shuffling
  • Fixed bug where saved music volume was not being used on startup
  • Changed screenshot function to output filenames with date and time instead of just one
  • Cleaned up the code that deals with memory allocation of textures in the menus
  • Added new menu music + other music tracks for the different tilesets/themes during the game
  • Fixed some memory allocation problems that may have caused memory to be held onto when mahjongg is exited and could have caused problems moving between the menu and the game if done numerous times
  • Added pressing A button on already selected tile deselects it
  • Added proper support for widescreen including options to turn it on or off
  • Changed config loading and saving to include widescreen and tileset selections. Does in a way that is backwards compatible with version 0.7 config files
  • Added Norwegian language support
  • Changed internationalisation code to fully support utf8 encoding thus giving the use of non-ASCII characters without the need for mapping
  • Change to auto detect whether the game has been loaded from a loader or not and exit accordingly (either reset to menu or back to loader)
  • Fixed even more bugs

non-HBC v0.7 09/01/09

Download - Mahjongg Wii v0.7 non-HBC

This is a version that is intended for use outside a loader

  • The only change from the standard version is that when exit is pressed this version resets the Wii instead of going back to the loader

Please do not embed this into any copyright software (e.g. copyright protected channel components)

v0.7 06/01/09

Download - Mahjongg Wii v0.7

  • Changed to automatically select the language based on the Wii menu language settings (Nintendo only support Japanese, English, German, French, Spanish, Italian, Dutch) but as Mahjongg Wii supports more languages, I have kept the language selection screen, but moved it to be accessible via the game options screen
  • Added three new tile layouts - fortress, crab and spider
  • Changed placement algorithm to handle complexity of new tile layouts
  • Added a layout selection screen which can be accessed by selecting change layout from options menu
  • Changed all the backgrounds from png to jpeg and at same time doubled their resolution so they now look much cleaner
  • Added hint functionality to the game (not hover hint) so that if it the icon is pressed a hint selection is highlighted in flashing yellow and 30 seconds are added to the time as a penalty
  • Added Wiimote rumble when a tile pair is successfully selected
  • Added an option to turn the rumble feature on or off
  • Added the saving and loading of configuration data to SD card (mahjongg.cfg on root of SD)
  • Added SDHC support
  • Added Danish language support
  • Wrote language selection paging - now with 9 languages per page with the plus and minus buttons (or on screen equivalents) used to move between them
  • Added button B usage as an alternative back button whilst in the menus
  • Added callback functions so that power and reset on the Wii now work and power button on the wiimote now turns the Wii off
  • Fixed several bugs

v0.6 08/11/08

Download - Mahjongg Wii v0.6

  • Added versus mode!
  • Re-factored the tile selection processing and completed all coding around tile selection for both versus and coop modes
  • Added option to restart the game when paused or no more moves left
  • Added option to start a new game without going back to the menu when current game has finished
  • Changed so that if only two tiles are left which are on top of each other the game finishes
  • Fixed bug where tile placement algorithm gets stuck in an infinite loop when it cannot place all tiles successfully. Now if this occurs it finishes the shuffle and returns to no more moves mode
  • Alternated which pointer is drawn first every frame to not give the advantage to player one in two player versus mode
  • Added separate tile selections per player (this affects the co-op mode as well as the versus mode)
  • Added Hungarian, Finish and Swedish languages

v0.5dol 27/10/08

Download - Mahjongg_Wii_v0.5 DOL VERSION

  • Changed the application from ELF to DOL for compatibility with the Hombrew Channel beta 9

v0.5 12/10/08

Download - Mahjongg_Wii_v0.5.zip‎

  • Added multi-language support currently supporting English, French, Italian, Dutch, German, Spanish, Catalan, Japanese and Portuguese
  • Wrote an algorithm to initialise the tiles so that tiles pairs are added in a selectable order
  • Added a language selection menu including waving flags when hovering above them
  • Allowed entering and exiting pause in game by pressing the plus button on the wiimote
  • Allowed the type of game to be selectable by hovering over the pictures as well as the text
  • Changed all selectable text so that they are selectable for the size of the text for the chosen language

v0.4 02/09/08

Download - Mahjongg_Wii_v0.4.zip

  • Added multiple tile layouts (four to start with) (re-wrote tile engine to handle this)
  • Added shuffle option when no more tiles pairs left
  • Added an icon and count of the number of available matching tiles during the game
  • Made the non-selectable tiles slightly darker that the selectable ones so easier to see
  • Added a gong sound to the start of the game
  • Added new true type font for all non static text (tile layout names, time in game, etc)

v0.3 24/08/08

Download - Mahjongg_Wii_v0.3.zip

  • Added two player co-op mode
  • Added full set of menus as per new graphics courtesy of DayDreamOz
  • Added pause to game mode entered and exited by pressing a pause icon
  • New homebrew channel icon by DayDreamOz
  • Cleaned up resources better
  • Fixed major bugs that was causing game to dump when moving between the game and the menus
  • Fixed graphical glitch on startup

v0.2 26/07/08

  • Added selected pair fading routine
  • Added better font (by making new versions of GRRLib functions) and aligned the text better
  • Added music
  • Added sounds effects
  • Fixed accidental selection of piece below ones just removed
  • Was having problems with using modplay and mp3player at the same time so changed to use sndlib and now both music and sound fx working correctly
  • cleaned up resources properly when existing back to loader

v0.1beta 30/06/08

  • Initial release - Game is playable

Progress

  • 07/04/09
    • I've decided on using one of the game characters as the player character but adding colours from a selectable Mii for favourite colour as robe colour / pointer colour, skin colour and hair colour as well as the name of the Mii.
  • 04/04/09
    • I've been playing around with adding more mii attibutes into the game. I've added face shape and colour as a test and may create a whole mii render class if I get time - there is a whole load of graphics associated with this as well as code so would take some time to do it right
  • 24/03/09
    • Added miilib and used the name of the Mii for display along with the favourite colour as colour of character robes on fastest time screens
  • 21/03/09
    • I've been working on the hi-score processing and am currently in the middle of making a Wii mario kart style display of times going from slowest to fastest for each of the tile layouts.
  • 19/02/09
    • Fixed some more bugs
    • The audio editing software I was using produced crackly raw sounds, I have got a new open source one - Audacity and this gives much better outputs, so I have taken all the current and new sound effects through this and they seem much better than before
    • Refined the use of 2 player versus charcter voices
  • 18/02/09
    • Added graphic when two player game ends as a draw
    • Added new main tileset
    • Added character voices into 2 player versus mode
  • 14/02/09
    • Fixed some bugs that were causing the game to crash with certain languages, turned out to be a too short boundary problem on some string processing
  • 08/02/09
    • Tidied up and fixed bugs around the placing of tiles / shuffling
    • Added 'space' tileset and background
    • Fixed bug where saved music volume was not being used on startup
    • Changed screenshot function to output filenames with date and time instead of just one
    • Cleaned up the code that deals with memory allocation of textures in the menus
  • 01/02/09
    • Added all other processing needed to support multiple tilesets
    • Added new menu music + other music tracks for the different tilesets/themes during the game
    • Fixed some memory allocation problems that may have caused memory to be held onto when mahjongg is exited and could have caused problems moving between the menu and the game if done numerous times
    • Added pressing A button on already selected tile deselects it
  • 31/01/09
    • Added tileset / game theme selection menu. Selection of the different tilesets also changes the background graphic and music in the game
  • 27/01/09
    • Changed to properly support widescreen including options to turn it on or off
    • Changed config loading and saving to include widescreen and tileset selections. Does in a way that is backwards compatible with version 0.7 config files
    • Added support for Norwegian
  • 21/01/09
    • Changed internationalisation code to fully support utf8 encoding thus giving the use of non-ASCII characters without the need for mapping
  • 10/01/09
    • Change to auto detect whether the game has been loaded from a loader or not and exit accordingly (either reset to menu or back to loader)
  • 06/01/09
    • Added callback functions so that power and reset on the Wii now work and power button on the wiimote now turns the Wii off
    • After testing (thanks Cashman) the widescreen function, I am going to remove it from v0.7 and add it to v0.8 as an option as it is impossible to tell how individual TVs deals with widescreen
  • 04/01/09
    • Wrote language selection paging - now with 9 languages per page with the plus and minus buttons (or on screen equivalents) used to move between them
    • Added button B usage as an alternative back button whilst in the menus
    • Added Danish language
  • 03/01/09
    • I've recompiled libogc to the latest trunk version on git and this has fixed all sound problems I was having, yippee! should not be too long before v0.7, I just have to change the language selection screen a little to allow 'paging' as I am adding another language (Danish) and there is no space currently
  • 02/01/09
    • I've been adding translations for new text + fixing bugs, improving the code under the covers over the last couple of weeks - although Christmas has got in the way quite a bit too
  • 10/12/08
    • New libfat (1.0.2) has fixed the problems with SD card loading/saving so now we have full support for SDHC!
  • 09/12/08
    • Compiled with the latest versions of devkitPPC, libogc and libfat, this has caused a few problems - it no longer supports changing of volume for MODs so music volume is not working at the mo + the main reason I did this was to add SDHC support, but use of the latest libfat is making the app crash dump, so I have temporarily commented out the new config save/load function.
    • Added widesceen support, so now should fill screen on a 16:9 HDTV
  • 07/12/08
    • Added the saving and loading of configuration data to SD card (mahjongg.cfg on root of SD). SDHC is not yet supported - although it shouldn't make the game crash just not load and save config data.
    • Added an option to turn the rumble feature on or off
    • Added hint functionality to the game (not hover hint) so that if it the icon is pressed a hint selection is highlighted in flashing yellow and 30 seconds are added to the time as a penalty
  • 30/11/08
    • Changed all the backgrounds from png to jpeg and because of the file size difference also increased the resolution from scaled 320x240 to full 640x480 they now look a lot sharper than before and particularly better on HDTVs
  • 29/11/08
    • Added a layout selection screen which can be accessed by selecting change layout from options menu
  • 24/11/08
    • Added three new tile layouts - fortress, crab and spider
    • the placement algorithm didn't handle the complexity of the new tile layouts, so spent a while figuring out how to make these work, found a couple of bugs in the process
  • 20/11/08
    • Added Wiimote rumble when a tile pair is successfully selected by a particular player.
  • 16/11/08
    • Changed to automatically select the language based on the Wii menu language settings (Nintendo only support Japanese, English, German, French, Spanish, Italian, Dutch) but as Mahjongg Wii supports more languages, I have kept the language selection screen, but moved it to be accessible via the game options screen.
  • 02/11/08
    • Added sequence for when either player wins in versus mode
  • 01/11/08
    • Re-factored the tile selection processing and completed all coding around tile selection for both versus and coop modes
    • Added option to restart the game when paused or no more moves left (I need translations for this see discussion page)
    • Added option to start a new game without going back to the menu when current game has finished (I need translations for this see discussion page)
    • Added total scores for versus mode so that when a game has finished the games won for each player is shown (like Mario Kart on the SNES)
    • Changed so that if only two tiles are left which are on top of each other the game finishes
  • 27/10/08
    • Fixed bug where tile placement algorithm gets stuck in an infinite loop when it cannot place all tiles successfully. Now if this occurs it finishes the shuffle and returns to no more moves mode.
    • Alternated which pointer is drawn first every frame to not give the advantage to player one in two player versus mode
  • 22/10/08
    • Added separate tile selections per player (this affects the co-op mode as well as the versus mode)
  • 15/10/08
    • Started work on the 2 player versus mode - added functionality and displaying of scores, scoring values, multiplier logic
    • Added Hungarian, Finish and Swedish languages
  • 12/10/08
    • Allowed entering and exiting pause by pressing the plus button on the wiimote
  • 11/10/08
    • Changed menu selections so that they are only the size of the text for the chosen language
    • Allowed the type of game to be selectable by hovering over the pictures as well as the text
    • Internationalised all the text whilst playing the game
  • 05/10/08
    • Added Portuguese
    • Added a waving flag effect when the pointer is hovering over a flag.
    • Fully integrated the language selection with the rest of menus + ironed out a few bugs around this.
  • 04/10/08
    • Added Japanese font. As only standard ASCII characters work I had to make a character map for these (I also had to do this for accents,etc in other European languages too)
  • 30/09/08
    • Thought I'd better add an update - I have been working on the multi-language support, I have completed the menu i18n for latin alphabet, and next to add Japanese font (this will use the same code as latin once font done :-)). The discussion page contains translations if you would like to add any languages that are not currently covered. So far (thanks to people adding them) we have (in no particular order) English, French, Italian, Dutch, German, Spanish, Catalan and Japanese.
  • 06/09/08
    • Wrote an algorithm to initialise the tiles so that the game can always be completed. This also replaces the previous shuffle routine.
  • 01/09/08
    • Added new true type font for all non static text (tile layout names, time in game, etc)
  • 31/08/08
    • Added an icon and count of the number of available matching tiles during the game
    • Added a gong sound to the start of the game
    • Added hint icon to the game (hint coding still to do though)
  • 27/08/08
    • Added multiple tile layouts (four to start with)
    • Added shuffle option when no more tiles pairs left
    • Made the non-selectable tiles slightly darker that the selectable ones so easier to see
  • 23/08/08 after v0.3
    • Created a few other tile layouts, need to do a bit more work to add them into the game though
  • 23/08/08
    • Fixed major bugs that was causing game to dump when moving between the game and the menus
    • Added two player co-op mode
  • 18/08/08
    • Added pause to game mode entered and exited by pressing a pause icon
  • 14/08/08
    • I've been re-writing the way the game board works to support multiple tile layouts, as part of this I have also been developing a tile layout editor which I will also release once in a reasonable state. All this should mean that adding some of the new functionality that I want to put in will be a lot easier than before.
  • 05/08/08
    • Programmed the menu as per new graphics courtesy of DayDreamOz
    • Cleaned up resources better
    • Fixed graphical glitch on startup
  • 29/07/08
    • Programmed most of the menu processing
  • 23/07/08
    • Was having problems with using modplay and mp3player at the same time so changed to use sndlib and now have both music and sound fx completed
  • 21/07/08
    • Added music
    • Fixed accidental selection of piece below ones just removed
  • 19/07/08
    • Added selected pair fading routine
    • Added better font and aligned the text better
  • 30/06/08
    • Matching tiles logic
    • no more moves logic
    • game complete logic
    • Tile selection
    • Removal of matching selected tiles + all processing
    • Game timer added
  • 26/06/08
    • Tileset created
    • New game processing done
    • Board rendering added
    • Wiimote pointer support added
  • 23/06/08
    • Tileset created
    • background rendered
    • test tiles rendered

Still to do

  • Animated characters
  • Hover highlight selectable tiles
  • High score tables/screens
  • Selectable characters in 2 player modes
  • The option to have in game background(s) from SD card
  • The option to play music from SD card
  • Continue option if gone back to the menu mid game
  • 3D tiles
  • Help screen
  • On-line / worldwide high scores
  • Voices for actions in versus mode (v0.8)
  • Multiple tile sets (v0.8)
  • Save/load of settings to SD card (v0.7)
  • Hint feature with 30 second penalty (v0.7)
  • 2 player versus mode (v0.6)
  • Ability to restart the game from pause and no more moves (v0.6)
  • Ability to start a new game without going to the menu once a game is complete (v0.6)
  • Multiple language support via language files (v0.5)
  • Algorithmic selection of tile layouts to ensure game can be completed (v0.5)
  • Multiple tile layouts (v0.4)
  • Display a count of number of selectable pairs left (v0.4)
  • Shuffle feature for when no available tiles are left (v0.4)
  • Menus / title (v0.3)
  • Pause mode (v0.3)
  • 2 player cooperative mode (v0.3)

Credits

Graphics

Music

  • Oriental by Allister Brimble
  • Sushi by Dr Awesome
  • Nebulos by audiomonster
  • Childhood by Sandra Chan
  • Egypt crap(?) by the freak
  • Graveyard by fleshbrain

SFX

  • Versus mode characterisations by Banjo Fett
  • Tile click SFX by Partners in Rhyme,
  • Tile pair selected SFX by Chris,
  • Tile pair mismatch SFX by Public Domain

Translations

Development Libraries

The project uses devkitpro, GRRLib, sndlib, libpng, wiiuse, etc.

(Thanks to all the devs on these projects for their excellent tools/libraries)