Platforms of Goo modding guide

No replies
Joined: 12/11/2009

PoG version 1.74 now available (since February 2014)
[Platforms of Goo Download Page]

If there's something you really want to know, just ask me at PoG download page.

Now new, bigger, better version of modding guide is available [here]!

Reference Guide:

File organisation - where are stored levels, sounds and images.
Creating & editing levels - some unknown information about making levels.
Resource file format - how to change images in game.
Order file format - how to define custom level set for PoG.
Translating PoG - how to change language of the game.

Since version 1.61 of PoG file organisation is a bit different.

File organisation

Every game resources are stored in folder res containing four main subfolders:
music-contains music files. All music files used by the game have to be stored here.
sounds-contains sound (.wav) files used in game.
levels-contains all levels and level sets definitions. Levels can be stored in subfolders.
images-images used by the game. All tile and background images have to be stored here (or in subfolders). Other images can be stored in other places (but it's better to store them in images).

We can play PoG levels, when they are a part of any level set. Level sets are defined by .ord.txt (order) files. Game reads all order files and every one can be choosed by player. (More informations about order file stucture later)

Each level in PoG is stored in two files:
LevelName.PoG.txt-defines positions of all objects and tiles. There are also specified music theme and starting code.
LevelName.res.txt-defines graphics used in this level. There is defined background image, tile image and custom images for objects.

There are two special files:Default.res.txt stored in images and Default.res.txt stored in sounds. First file describes default images for objects in game. Secound one describes defau;t sounds used in PoG (like sound of explosion, killing monster etc.). Those files works same as in resource files for levels. More information below.

Creating & editing levels

Tool allowing you to create new levels for Platforms of Goo is Platforms of Goo Level Editor (PooGLE), that you can download from PoG page. I'm sure, that using PooGLE is described in program's help [F1]. Here I want to give you some information about creating levels, not included in help, but maybe important.

Background image
Allowed image formats: .jpg, .png, .bmp, .gif(not animated!).
Background image can be tiled or stretched to the screen size.
Stretched image's size is not important at all (but there is only 640x512 pixels on game screen; there's no reason for using larger images). Since version 1.11 we have scrolling and levels can be larger than 20x15 cells. Stretched backgrounds always fills all the screen (behind all tiles and objects). When the view moves with player, stretched bakcground moves with the view (stays in fixed position at the display).
Tiled background is repeated in every direction to fill all the level. It has fixed position in level. When the view moves with player, the background remains static relatively to walls. I've never used it, but you can draw all the level on backgound image and not use tiles at all.

Tiles
All static graphics in level is built of small squares (32x32) called tiles (tiled background is not). Without tiles you can't see walls in the level. Tiles can also represent grass, signs or trees that not collide with the player.
Every level has specified tile-image, that is cut into tiles. There are 4 tiles per row and "unlimited" columns of them. Every tile has letter-code. By pressing [insert] key you can enable the dialog allowing you to put coordinates of tiles stored below the 6th row. Tile images can be the same formats as background.

More information about Advanced Level Code you can find in ALC Overview.

Resource file format

Game uses two kinds of resource files (.res.txt):
1.Default resource file: Default.res.txt stored in images. And Default.res.txt stored in sounds. They contains default definition of images and sounds in game.
2.Level resource file with .res.txt extension. It describes backgorund, tile and custom objects images for one level.
Those files are different in top lines, but contains common resource definition:

<-- headline and other non-common lines -->
s_wall_cracked,"images\blue\default_wall_cracked.png", 1,0,0, 16,16
s_balloon,  "images\blue\default_balloon.png",         1,0,0, 18,18
s_pokey,    "images\blue\default_pokey_strip3.png",    3,0,0, 32,32
s_bonus,    "images\blue\default_bonuses.png",         3,0,0, 16,16
s_target,   "images\blue\default_redcan.png",          1,0,0, 16,24
s_fire,     "images\blue\default_fire_strip2.png",     2,0,0, 8,8
s_explode,  "images\blue\default_explode_strip2.png",  2,0,0, 46,2
tb_bg,      "images\blue\default_headline.png",        0,0

NOW ALL RESOURCE CHANGING YOU CAN DO WITH PoGLE (version 0.60+). Information stored below can help you to understand requriments of particular images.

All resoure definitions beginns with built-in resource name. Then there is file path between ". Finaly there are some important numbers.
List of customizable resources built-in names:
s_wall_cracked - cracked wall images. Can contain more than 1 image. Random frame is chosen for the wall. With ALC even the animation can be turned on.
s_gear - gear image. Can be multiple. Random frame is chosen.
s_balloon - balloon-monster image. Can be multiple. Random frame is chosen.
s_evileye - evileye image. Has to contain two images: eye and pupil.
s_pokey - pokey-monster image. Has to contain three images: angry body, normal body and eyes.
s_bit - bit-monster image. Has to contain two images: body and pupil. Creatively customized to create ZBomb balls (chapter 5).
s_bone - bone-monster image. Has to contain two images: head and jaw.
s_bomb - bomb-monster image. Has to contain five images: body, spikes, normal eyes (closed), valve and on-fire eyes (opened).
s_guy - main Goo Ball image. Has to be single image.
s_eye - main Goo Ball's eye image. Have to be single image.
s_bonus - bonus items image. Has to contain five images: bone bonus, bomb bonus, fire bonus, water bonus and balloon bonus.
s_target - Goo-Drink can image. Can contain any number of images used for animation effect.
s_explode - explosion light image. Can contain any number of images.
s_splat - main Goo Ball splat image. Can contain any number of images. Random one is chosen.
s_fire - fire particle image. Can contain any number of images.
s_bitchars - ISH particles created by Bit Balls and their emitter. Can contain any number of images.
s_fistyeye - image of Fisty's eye. Has to be single.
s_fistyarm - image of Fisty's arm. Has to be single.
frog_bg - image of Fisty displayed behind objects. Single image.
frog_fg - foreground, static image of Fisty. Single image.
tb_bg - image of headline. Single image.
the_start - background of main menu. Shouldn't be customized (customizing it in levels gives no effect).

I wrote that there can be more images in one. This feature is allowed only for sprite images (names of sprites start with s_). Multiple image is a strip of images with the same widths and heights. Watch original resources to understand it better. First number after file path for sprites is number of images it contains (in PoGLE you cn't put number of subimgs larger than 12). Animated .gif images are multiple itself, and the number is ignored (but required).

There are two different image definition kinds:

SpriteName,    "file path", images, back, 0, center_x, center_y
nonSpriteName, "file path", back,   0 

Parameter called back is mostly equal to 0. You should use 1 only when you are using .bmp or .gif image, and you want to make them transparent (then every pixel with the same color as in bottom-left corner will be invisible). This functionality doesn't work correctly with .jpg and .png images.
Then there is 0. It can be 1, but it's really small effect (and no effect, when you are using .png images).
Center coordinates (sprites only) are really important. They describe point that is center of image rotation and is placed in center of object.

Order file format

Order file (.ord.txt) describes level set. There are stored level names, subtitles, kinds and congratulation text. Below is simple order file:

Platforms of Goo Level Set. Levels: 5
Image:"hard_island.jpg",0,0
Music:ThirdWheel.mp3
After:chapter1\level1
ShortName:My levels
Name:My Awesome Levels
sBeginning#Welcome!#It's just the beginning...
bMyLevels\apocalipse#Super challenge#really important level
rFrictionless#No friction#You want to go back?
sChallenge2#The hardest challenge#mind your step...
fNanoLevel#Really small level#Beware! You can't fail!
-----------------------
2$35f;white:You have finnished
2.5$60f;yellow:This level set
2$100f;green:CONGRATULATIONS!
1$35f;green:PLATFORMS OF GOO##Copyright by Goosweek 2010
"sd_destroy_monster"

1st line is headline. The most important thing is the number of levels. All digits stored in this line will be read as one number of levels. Official chapters use a bit different format.

Then there are few optional lines.
Image (shown in "island_view") is described by file name (or path relative to images folder) and two numbers - their meaning is same like setting of non-sprite images in .res.txt files.
Music (played in "island_view") is described only by the file name (or path relative to music folder).
After is a path of level that have to be solved to unlock the level set.
ShortName is the name shown in main screen of the game. If not specified, the next parameter is used.

Last parameter is Name of level set shown in the "island-view". The name is everything that is after Name: and before end of line.

Then there are level definitions in order that is equal to order of playing.
1st charracter defines type of level. There are 5 possibilities:

    snormal level. This level you can fail and restart as many times as you want.
  • fUltimate Level ™. When you fail this level, the game is over. You have to play this level every time, you enter the level set.
  • bBreak Point ™. You have to play this level every time, you enter the level set, but you can fail and restart as many times as you want.
  • tTutorial Level. Yu don't have to complete it. It can be always skipped.
  • r -Return Level ™. When you fail, you have to play previous level again. 1st level mustn't be failable, because there is nothing before. Using this level kind is deprecated.

After 1st charracter is name of file containing level definition (the part of file path after [game_dir]\res\levels\ and before .PoG.txt).
File name ends with # separator.
Then there are level name (displayed at the beginning of level with large font),
# separator again and subtitle (displayed at the beginning of level with small font).

After descriptions of levels there is separation line (its content is ignored).
And final few (at least 1) lines are definition of congratulation texts. Single line defines one frame with text or sound, that should be played.
Text-frames definitions:
1st parameter is real number and ends with $ separator. This is scale of showing text.
2nd parameter is integer and defines time of showing frame. One second is equal to 30 time units. Value smaller or equal to 0 makes game crash.
3rd parameter is charracter, that defines interpolation of frames. If was set to f, frame will fade into black before the next frame appear. If it's any other letter, the next frame will appear the previous one is still visible.
After ; separator there is defined color of text. It can be simply name of color, but can be also expression black+make_color_rgb(15,100,255) using RGB color format. make_color_rgb(r,g,b) can be replaced with hexadecimal index of color like $FF0065. Expression ends with : separator.
And finaly there is text displayed in that frame. # breaks line.
Adding sounds (available since PoG 1.14):
There are three methods of playings sounds:
1. Loading (and playing) new sound:
"EndingTheme.mp3",3
First thing is name of file located in music folder. Then, there's a number depending on sound file format. If it's mp3 it has to be 3. If it's mid it has to be 2. wav sounds needs 0.
2. Playing loaded sound again:
"1"
The only parameter is a number of loaded sound. Every sound, you loaded using previus instruction, got its own number. First loaded sound got 1, secound - 2 stc. You can use the number of sound to play it.
3. Playing built in sounds:
"sd_destroy_monster"
Every sound has its own identifier, and you can play it between frames using this identifier. If you change sound using resource changing mechanism in last level (played just before the congatulation text) it remains changed until the end of congratulations.
The following sounds exists:
sd_splash1, sd_found, sd_can1, sd_hurra, sd_death, sd_water, sd_ignite, sd_explode, sd_destroy_monster, sd_bit_death, sd_bit_shoot.

Translating Platforms of Goo

Platforms of Goo were released in English nad Polish version. Game can be also translated to any language based on latin alphabet (coded on 8 bits). Sadly it requires copying game files and permanently replacing texts with their translation.
First step is to translate file res\Info.PoG.html. It contains the game information in HTML, but at the beginning there are all inscriptions used in PoG (but not level names). Try to save line ends signed with #.
Translating chaptre files is generaly simpe: replace every level name and subittle with their translations. Also transalte word "Chapter" on the top and chapter's name after :.
To translate hints form the first level, you have to modify text in Advanced Level Code. It is the only risky step in the process of tanslation Smile

-Goosweek, Platforms of Goo author.