Pipe Nightmare by sterco_raro
A hell of a ride (very broken but WE DID IT)
The plumber's life is often damp and full of pitfalls...
Connect the pipes on the top of the screen to those on the bottom in this almost-non-crashing prototype of a game!

Controls:
- Mouse left click: pick and place a pipe or swipe two pipes
- Mouse right click: rotate pipes
- Escape: quit to menu
For linux users:
The game was developed on Arch Linux and it could crash on distros with a less recent glibc, if you're in trouble you can alwasy run the game from source like this:
git clone https://github.com/sterco-raro/ld51.git
cd ld51
pip install -r requirements.txt
python launcher.py
To remove the installed dependencies, do this:
pip uninstall esper
pip uninstall pygame
pip uninstall pyinstaller
Note: you need python >= 3.10
Tools: - custom engine using Pygame - coded with Sublime Text - graphics made with Adobe Photoshop - FL Studio for audio editing - sounds at home with professional devices
Changelog: - Added the main menu background and logo, made during the jam but forgot to put them in the game - Startup crashes (hopefully) fixed! Let us know if you find other issues - Post jam release: fixed all the major bugs, now there are only the less annoying ones :wink:
| Link | https://github.com/sterco-raro/ld51 |
| Link | https://sterco-raro.itch.io/ld51 |
| Link | https://sterco-raro.itch.io/ld51 |
| Original URL | https://ldjam.com/events/ludum-dare/51/pipe-nightmare |
Ratings
| Overall | 1151th | 2.8⭐ | 32🧑⚖️ |
| Fun | 1157th | 2.55⭐ | 32🧑⚖️ |
| Innovation | 1126th | 2.55⭐ | 32🧑⚖️ |
| Theme | 1144th | 2.7⭐ | 32🧑⚖️ |
| Graphics | 898th | 3.083⭐ | 32🧑⚖️ |
| Audio | 629th | 3.017⭐ | 31🧑⚖️ |
| Humor | 612th | 2.786⭐ | 30🧑⚖️ |
| Mood | 1024th | 2.87⭐ | 29🧑⚖️ |
| Given | 26🗳️ | 38🗨️ |
Traceback (most recent call last):
File "PyInstaller/hooks/rthooks/pyi_rth_pkgres.py", line 16, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 499, in exec_module
File "pkg_resources/__init__.py", line 32, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 499, in exec_module
File "plistlib.py", line 61, in <module>
File "PyInstaller/loader/pyimod02_importers.py", line 499, in exec_module
File "xml/parsers/expat.py", line 4, in <module>
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /tmp/_MEIhA2B02/libexpat.so.1)
[114528] Failed to execute script 'pyi_rth_pkgres' due to unhandled exception!
I made a folder sounds\ and added the following sounds
button_down.wav
button_downup.wav
button_up.wav
fart.wav
flush.wav
ld51fuckmeonmydeathbed.mp3
pipe_drop.wav
pipe_pick.wav
pipe_plop.wav
pipe_rotate.wav
rattle.wav
rattleflush.wav
snap.wav
weird.wav
https://www.soundjay.com/ is where I got sounds from
As for @chrisdedev I'll try it on another linux box and see what I can do, on my box it's working so I need to reproduce that error somehow.
P.S. The "BAD AT WORK" is actually a simple string left there by accident :sweat_smile:
Too bad there is no consequences when the liquid spread all over the pipes.
Still very impressive for a first LD-entry!
View questions out of curiosity :-)
- Is there any screen when the player wins?
- And what program did you use to make this?
- What does the 'Boh?' button do? I could not figure that one out :-)
=====
Edit, I figured it out. I see that the selecting of the pipes is toggled on-and-off while holding the mousebutton. I suspect that you used somekind of 'mousedown' event for that. If so, a bugfix could be to trigger the selecting of a pipe with the 'mouseup' event.
I think that in this case the mousedown is triggered every frame while holding down the mousebutton. Where the mouseup event is usually triggered once.
I finished the level now :-)

We were thinking about a health bar or something to lose when there's too much spilling but couldn't make it in time :smile:
@wouter52 thank you so much for your kindness during the jam! About the dragging issue you're right, there's actually no drag n drop. I noticed that on windows the mouse events timings are a bit different than linux so I'm trying to fix it and make it feel the same on both platforms. (see below for a hopefully clearer explanation :laughing:)
To answer your questions:
- No, unfortunately we didn't have time to put a winning/losing screen in the game
- It's basically a wobbly custom engine built using [pygame](https://www.pygame.org) and [esper](https://github.com/benmoran56/esper)! The backbone of the code was made during a three days "personal/fake game jam" we made a couple of months ago to test our skills
- The "Boh?" does nothing, it's a placeholder that didn't grow wings, boh in italian means "dunno" :grin:
To clarify, the mouse events are totally handmade :D there's no separation for up, down events. we basically check each time the mouse is being pressed what's the status of different variables (an active selection, last selection comes from the grid or from the inventory, etc).
To avoid millions of clicks per frame there's an "action cooldown" timer in place that needs more testing and balancing (I need to at least increase its duration).
Congratulations for completing the pipe system! And as already said, thanks all for your comments :violin:
If you'd still like to try it out you can get the source code on [github](https://github.com/sterco-raro/ld51) and run the development version like this:
```
git clone https://github.com/sterco-raro/ld51.git
cd ld51
pip install -r requirements.txt
python launcher.py
```
To clean up the dependencies installed by pip run:
```
pip uninstall esper
pip uninstall pygame
pip uninstall pyinstaller
```
Note: you need python 3.10
Otherwise pretty cool
Console log:
```
File "/home/user/ldjam/ld51/launcher.py", line 24, in <module>
manager.run()
File "/home/user/ldjam/ld51/code/game_manager.py", line 165, in run
self.world.update()
File "/home/user/ldjam/ld51/code/world_manager.py", line 96, in update
self.worlds[self.current].process()
File "/home/user/.local/lib/python3.10/site-packages/esper/__init__.py", line 424, in process
self._process(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/esper/__init__.py", line 405, in _process
processor.process(*args, **kwargs)
File "/home/user/ldjam/ld51/code/systems/timer.py", line 115, in process
self.grid_healthcheck()
File "/home/user/ldjam/ld51/code/systems/timer.py", line 78, in grid_healthcheck
self._healthcheck( ( self.grid.active_inputs[i][0] + 1, self.grid.active_inputs[i][1] ), "up" )
File "/home/user/ldjam/ld51/code/systems/timer.py", line 69, in _healthcheck
self._healthcheck( ( grid_pos[0] + 1, grid_pos[1] ), "down" )
// (...)
File "/home/user/ldjam/ld51/code/systems/timer.py", line 51, in _healthcheck
self._healthcheck( ( grid_pos[0], grid_pos[1] - 1 ), "left" )
File "/home/user/ldjam/ld51/code/systems/timer.py", line 63, in _healthcheck
self._healthcheck( ( grid_pos[0], grid_pos[1] + 1 ), "right" )
File "/home/user/ldjam/ld51/code/systems/timer.py", line 51, in _healthcheck
self._healthcheck( ( grid_pos[0], grid_pos[1] - 1 ), "left" )
File "/home/user/ldjam/ld51/code/systems/timer.py", line 63, in _healthcheck
self._healthcheck( ( grid_pos[0], grid_pos[1] + 1 ), "right" )
File "/home/user/ldjam/ld51/code/systems/timer.py", line 37, in _healthcheck
value = self.grid._get_at(grid_pos[1], grid_pos[0])
File "/home/user/ldjam/ld51/code/components/map.py", line 120, in _get_at
if col < 0 or col > self.map_width: return
RecursionError: maximum recursion depth exceeded in comparison
```
At the moment, it does indeed feel unfinished. You probably know all this already :wink:, but:
- the game crashes quite a lot;
- "buh?" button does nothing;
- for some reason, you can't place pipes on the right side of the screen (even though pipes spawn there);
- there is no end (even when you connect all the pipes, nothing happens);
- there is no real setup to the game - what are the pipes for?, where are they going?, what is the slime they are transporting?, and what is the meaning of life and existence as we know it ;)?
On the definite plus side: I like the graphics and the sounds are good as well!
Here is a screen of the crash error I got the most often:

@scifi6546 @frigusterio @heremeus @frozenfire92 @fabula-rasa
We finally fixed the main bugs!!! It's 1 AM where I live so I think we'll upload the working versions tomorrow morning.
@heremeus thank you for your determination! Hopefully this fix will solve your problems (not the glibc ones though :eyes:)
@fabula-rasa the remaining questions are pretty simple:
- the "boh?" button is a feature ;) it keeps us safe from life's dangers
- unfortunately we didn't put an ending screen in the game aside from a small sfx when the pipes are connected correctly :cry:
- what if the slime is actually transporting those pipes? (42, the main answer is 42 of course)
Oh and thank you **so** much, now I need to rewatch the whole series to satisfy my hunger! All glory to the Hypnotoad!!
42 is indeed the one and proper answer! As is obeying the Hypnotoad. And your welcome - rewatching Futurama is never a bad thing. I can basically play the first 5 seasons in my head in my sleep by now :laughing:
i'm imagining in my mind the scene when you were acquiring the sounds using professional devices
at 4 am during the jam somewhere :heart:
maybe i'm not very smart but it took me 5 minutes to figure out that you can rotate pieces with right mouse button
(should've read the instructions with more attention...)
all written in python? sweet! good job at pushing trough
sometimes I would get double pipes in the drawer, not sure why
no crashes here!
@wouter52 Thanks!! Next time I want to try something simpler and hopefully submit a working build at the end of the jam XD A smaller scope can surely help us
(btw I think I sounded a bit rude while commenting your game, just wanted to say that it wasn't my goal :grin:)
@cannibalgirl sounds, graphics and the late night professional recordings all come from @taxiservice's own hands (and mouth) :copyright: The extra python topping is my doing, so are the random bugs still lingering around :grin: Thank you for your feedback :D (oh and I'm so happy to know the game didn't crash)
The scope of your game looked fine to me, there were just some technical difficlties you needed to overcome. It is common for jam-games to have so-called 'spagetticode' or 'very dirty solutions' to save time. For instance, I could not bother coming up with code that could rotate a tile 90, 180 and 270 degrees (ours works with tiles too), so I asked the artist to make 4 versions of each possible tile and then I used those ^^'
That solution is not 'very nice', but it gets the job done so to speak :-)
I don't know how your game is programmed, but what I wanted to say is: don't be scared to write very veeery dirty ccode to get the job done :-)
Our code is very dirty :laughing: aside from that, I think you're right indeed. Maybe the scope was fine, probably the major problems were complicated maps management and the pipes system integrity check function.
The "inventory" area and the grid area share a LOT of common code but I lost myself in offsets and array referencing because I rushed that part :')
The pipes integrity check is basically a recursive function written a couple of hours before the deadline :D fun fact: I ended up rewriting that function from scratch three times, each one with a similar structure, each time without noticing that the main issue was the grid access :sweat_smile:
I also dug the chill vibe of the music, and the low fi grit of the sound effects. I felt it captured the spirit of windows 95 days.
I took a look at esper, it looks interesting, might have to try it out.