Squeak implementation of the classic arcade game Pipe Mania


Using the SAR file

The SAR (Squeak Archive) file includes all the code and resources of the game. To use it, you need to download the latest Pharo or Squeak image and an appropriate virtual machine for your operating system.

After starting the environment, you can install the game by dragging the SAR file into the Squeak window.

Using the Project file

The PR (project) file includes all the code and resources of the game. Its suitable for installing on the XO laptop. For detailed instructions refer to the documentation.

Starting the game

There are actually two ways to start the game:

  1. Open a workspace and type PlGameMorph new openInWorld and then right-click on it and select do it.
  2. Open the Objects menu also known as Parts Bin, select the Games category and drag the Pipes game icon into the world.



The goal of the game is to connect the water source with the drain. This is done by clever placement of the linking tiles also known as pipes. One has to be fast because the water will start to flow after a specific time and the game is lost if there are any unconnected pipes that cause the water to leak out.

Winning the game

Starting the Game

Button Meaning
Restart Creates a new game and places source and drain randomly on the field.
Start Starts the game and displays the pipe selection box.
Start Pauses the game and hides the pipe selection box. The game can be continued by clicking on the start game button.

Selecting Pipes

The pipes can be dragged from the selection box on the right and dropped anywhere on the field unless the field is already occupied by another pipe. In this case, a red frame will be displayed around the target position instead of a green one. Only the three lowest pipe parts may be dragged, the other ones are just used as preview.

Selecting Pipes

The Link Parts in Pipes

Pipe Types

From left to right: corner pipe, T-Pipe, dead end pipe, straight pipe, intersection pipe.

Finishing the Game

Image Meaning
Timer If the countdown timer runs out, the water starts flowing. If all pipes are well connected and the water actually reaches the drain, then the player wins the game, but whenever the water reaches an open end, the player will lose.
Flooding the pipes If the timer has not expired, but the player has already completed the pipe construction, then he or she might use the waterflow button to start the water manually. But be careful: after triggered the water flow, no more pipes can be put on the field.
Closing the game By using the close button, the player can quit the game anytime.


Each pipe has a costs and will decrease the players score when placed on the field, but will gain a reward if water flows through the placed pipes. This way, unused pipes on the field are lowering the score and economical use of pipes is required.

Pipe Type Cost Reward
Corner pipe 10 30
T-Pipe 20 60
Dead end pipe 5 15
Straight pipe 10 30
Intersection pipe 20 80


There is an extra bonus if the player reaches the water drain and the remaining time will increase the score if the player used the waterflow button.

Changing the Theme

Changing the theme

By clicking on the theme button, the graphics of the game can be changed at runtime. In the current version, there are two themes:

  • The desert theme
  • The simple pipe theme