RSS
 

Posts Tagged ‘peggle’

Modifying the Peggle Deluxe Game

06 Dec 2015

So some time ago I modified a the video game Peggle Deluxe which is a PC game by Popcap Games. My little baby brother had really gotten into the game and I wanted to add him as a character! I found a baby photo of him and thought I’d simply have to replace one image in the game directory.

Turns out this was not the case.
The majority of the files for this Popcap game, like other Popcap games, were stored in a file called main.pak. The first step was to extract the contents of this package.

Luckily, an online post was able to help me here (link).
Essentially I had to run the QuickBMS extractor application and supply it with 7x7m.bms and main.pak.

Links to the aforementioned files:
QuickBMS
http://aluigi.org/papers.htm#quickbms
http://aluigi.org/papers/quickbms.zip

7x7M Archives Script
http://aluigi.org/papers/bms/7x7m.bms

I decided to extract the contents of main.pak to the game directory. I also renamed main.pak to main.pak.bak. This forces the game to look for files in the current directory (as main.pak is missing).

Lastly all I had to do was modify one of the character templates and replace the pictures with pictures of my baby brother. I decided to replace the Dragon character (because its OP and also because my brothers favourite character is the Pumpkin so I thought I’d leave it intact).

Here are some images of what I changed (all changes made with Photoshop):

Main Template

This template contained the main images. There were four images, one of the character looking to the left, one looking towards the center (angled left), another looking towards the center (angled right) and finally one looking to the right. Its important to note the eyes were not in this picture (they move around in the game depending on where the mouse cursor or ball is).

Peggle Main Ali

Black and White (Cutout) Template

This template is simply the inverse of the main template images. The black parts of the image correspond to the background behind the character (that is, they act like a green screen).

Peggle-Cutouts

Eye Template

Finally, this template contained the eyes for the character at the correct pixel locations corresponding to the main template.
Peggle Eye Mask

Eye Bug

I saved all the above files and run Peggle! The images showed up fine but the eyes were missing entirely. I quickly narrowed the issue down to a character.cfg file which contained the following character profile for the Dragon character:

The four entries for Eyes refer to the pixel offset from the top right of the EyeImage image (Eye template). In this case, the Dragon only had 1 eye (or 2 eyes but attached) whereas our image has 2. So we need to modify the -1 entries so we set the offsets for the right and left eye of each of our 4 images (from Main template).

To find the correct pixels I simply used Photoshop:

Peggle Eye Offset

So the pixel offsets from the top right of the canvas for the first eye is: 25px, 50px (width first then height). I did this for each eye in the main template and came up with the following character profile:

I then loaded up the game to see the results and they work! The eyes weren’t exactly perfect but they were good enough for this project.

My baby brother loved playing as himself in the game and laughed non-stop for 10 minutes!

Here are some pictures of the result:
Peggle Ali Gameplay Peggle Ali Gameplay

 
1 Comment

Posted in Gaming