Chunk Munch

From WiiBrew
Jump to navigation Jump to search
Chunk Munch
TypePuzzle game
Version0.4 (14-aug-2009)
Downloadable via the Homebrew Browser
Wiimote4.svg SensorBar.svg Loads files from SDHC cards in the Front SD slot

Chunk Munch

A simple yet addictive game, just point and click on two or more connected and identical 'chunks' to 'munch' them up.


Currently 1 point for the first 'Chunk' after that each additional chunk gives a +2 bonus. The minimum amount of 'Chunks' that need to be connected is 2, which means that 3 points is the lowest 'move' possible ;-)


Skinning support

This game supports the user supplying his or her own images, which can be separated into skins (or themes) by placing them into different folders next to the game. To create your own skin follow these steps, all images can be supplied optionally.

  • Step 1: add a new directory give it the name of the skin/theme
  • Step 2: Add the following:
    • background.png (The screen currently is 640 by 480, non transparent because it’s the background)
    • 10 png files (for best quality: square images, with transparency, 64 by 64) named 1.png to 10.png
    • cursor.png (hot spot should be in the upper left corner)

The game doesn't check / care about any of the image sizes, just don't make anything too big, also 1 through 10 should be square for best quality. The background will probably be wrong if you supply a too large image, so just stick with 640 by 480 for now. ;-)


If you would like to add skinning support or XML settings / savegame capability, contact me at freezydev(at) I can give you the important parts of the code.

When I find the time I might make a game template, so that all new programmers can get SDL up and running without having to program the entire engine from scratch.

The code is a bit of a mess, which is not surprising, it has survived three platform rewrites (Windows, Wii GX, Wii SDL). The original code dates back to about two years ago. I am still finishing up the game by adding stuff like sound, music and multiplayer. I will try to clean up the code and make it easier for others to read / understand.

I will never share the code of the game itself (MY PRECIOUS!), though I am planning on releasing the code for all the functionality's it is accumulating (anything that uses public libraries is programmed separate from the actual game code. Ok, except for string manipulation) C++ class inheritance rules!

Change log


  • Texts are now much clearer (added a black or white edge through multiple font renderings)
  • Multiplayer co-op, with color and number seperation (skinning support for colors will be added later)
  • Example skin update, to make it look a bit nicer
  • Used fractal art instead of a gradient fill for Example Skin Background.
  • Found and fixed a bug where the game would think it had ended, even though there was still one move left


  • Fixed two small issues with loading partial skins;
    • In the menu when selecting colors (images that weren't loaded weren't being replaced with basic colors)
    • In the game the last loaded image was not shown if it wasn't number 10


  • New Icon for HBC
  • Changing sizes is now easier (larger clickable area) also shows amount of pixels
  • Skinning support works!! ( currently I use png files, ico's will load but wont be pretty :-( )
  • Last known Skin will try to auto load, on failure it goes back to internal default.
  • To create a skin: add a directory, fill it with background.png, 1 through 10.png, cursor.png (all files are optional! :-D items not found will default back to old style)

It also doesn't care about size, just don't make anything too big, also 1 through 10 should be square for best quality.

  • TODO: add a way to define the cursor hot spot.
  • TODO: Test how many directories it can handle (should be a lot)


  • First beta given to a friend of mine.
  • Got XML save / load to work, savegames now work :D yay!

Known bugs:

  • the game might decide you have no more 'Chunks to munch' in some rare cases, even though there is one left. I'll fix this as soon as possible
  • When I have a USB harddrive attached, the code randomly dumps sometimes ingame to mouse.o code.


  • Added column and row refilling
  • Enhanced the movement of the 'Chunks'
  • Expanded the option menu with:
    • Added a single 'Chunk' as a size & color preview
    • Refilling (None | row | column | rows first | columns first)


  • Rewrote the visualisation from GX back to SDL (Yay, SDL finally works for me on the Wii!)
  • Added options to the option menu (4 different sizes, refilling (yes/no))


The original game was made by me for the PC, which included 10 colors (still in the game). To make it work on the Wii I rewrote the visualisation parts to GX, which did not work as well for me.

Work in progress

14 aug 2009: Chunk Munch just hit 2000 downloads! I wanted to upload the latest version to celebrate this :-D

13 aug 2009: Added a border to the fonts by rendering in multiple passes around the destination with the reverse color! :-D It might not be optmized, but that can be improved later by adding a pre-rendered glyph rendering system. SDL TTF is very nice again, now that I have found a way to add a quick border around the text.

Added a simple check from IR data to detect on screen cursor, or just don't draw it. I find it strange that the error code of the WPAD_Probe doesn't supply a proper OFF/Detached result. Instead it returns no error... Was not using it properly ;-)

12 aug 2009: Finally found some time for this project again :-P I am planning to add a more to the game this weekend, therefor I might delay releasing untill Monday.

Here is a quick update:

  • Added basic multiplayer co-op, basically it's now a multi-wiimote, all four players work towards 1 score
  • Increased the size of the basic cursor, now in 4 default colors!
  • Experimented with the font, decided to look for a different system. SDL TTF is just too unclear with some test skins
  • Ico support is still not returning proper colors :-(

Todo before next release:

  • Test and try to improve multiple Wii Mote detection (some report on while off, or make a mess of the wiimote handshake (2 player 2 wiimotes, only 1 responds)). On the upside: once the wiimotes are working correctly they stay that way.

Todo to improve Skin support:

  • Add skin XML, containing: menu text color, cursor hot spot, player 1-4 cursor color code, field offset (x & y)
  • Add support for loading multiple skin cursors (we need 4 different cursors now).
  • Add default behavior: if only one cursor found, add a colorcoded number on the cursor

7 aug 2009: Wrong: zoomSurface is giving me the wrong colors, I am trying to solve the issue. Right: It was the ICO support from IMG_Load, discarding ico support.

I think it's because the Wii SDL is not supporting 32 bit surfaces. At least my 'exampleSkin' directory icon loading works :-P I already added some code which will try loading different extensions from subdirectories. If all else fails, it shows the 'default' look for the parts it cannot load / find.

I am expecting to have a stable version with subdirectory skinning support later today.

6 aug 2009: I can now load a background from a skin folder! :-P, the rest of the skinning support is not working yet. the files need to be in just the right format before the Image SDL functions will accept them :-(

I might need to reprogram some of the Icon file loader to make sure it works with standard icons found on the web (which seem to be the best choice to support easy skinning for this game)

5 aug 2009: Working on the first skin, took me about 2 hours to get the code together and whip up some simple testing graphics. Unfortunately it doesn't work yet and I have to get some sleep before work tomorrow. Hopefully I will have a rudimentary skin support update on Friday.


This is my TODO list, sorted in the order of: "most likely to be done first"

  • Find a better font library (instead of SDL TTF), or find a way to add shadows to current fonts.
  • Multiplayer Co-op.
  • Add turn based multiplayer
  • Music ( After skinning support, using the same system to find and load :-P )
  • Sounds (add settings to skin XML to specify different sounds: per chunk (one for all, file specific), per click (menu), chunk slide, chunk fall)
  • Skinning support, find a way for people to share skins, increase support for different image files ( Please help me by sending me your images! As I am not an artist ;-) )
  • Skinning support; add a file scanner and a random selection system (load a different set of 10 everytime!)
  • Skinning support; add XML settings per skin (like player colors, text colors)
  • Add split screen mode (separate players, separate fields)
  • Add split screen mode (2 Players VS, 2 PLayer Co-op & 4 Player Free for All)

Thanks to

The game still needs a nicer logo. If you would like to see your name in the thanks to list, please send me artwork for this game :P