Skip to content

Commit

Permalink
Merge pull request #1352 from son-link/main
Browse files Browse the repository at this point in the history
New port: EntroPipes
  • Loading branch information
Cebion authored Mar 6, 2025
2 parents 2512adf + 13f296b commit d84890c
Show file tree
Hide file tree
Showing 8 changed files with 839 additions and 0 deletions.
76 changes: 76 additions & 0 deletions ports/entropipes/EntroPipes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/bin/bash

XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}

if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then
controlfolder="$XDG_DATA_HOME/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi

source $controlfolder/control.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR=/$directory/ports/entropipes
CONFDIR="$GAMEDIR/conf"
PYXEL_PKG="entropipes.pyxapp"

cd "${GAMEDIR}"

> "${GAMEDIR}/log.txt" && exec > >(tee "${GAMEDIR}/log.txt") 2>&1

mkdir -p "$GAMEDIR/conf"
bind_directories "$HOME/.config/.pyxel/entropipes" "$CONFDIR"
# note: replace gamename with the appropriate value for the game

# Load Pyxel runtime
runtime="pyxel_2.2.8_python_3.11"
export pyxel_dir="$HOME/pyxel"
mkdir -p "${pyxel_dir}"

if [ ! -f "$controlfolder/libs/${runtime}.squashfs" ]; then
# Check for runtime if not downloaded via PM
if [ ! -f "$controlfolder/harbourmaster" ]; then
pm_message "This port requires the latest PortMaster to run, please go to https://portmaster.games/ for more info."
sleep 5
exit 1
fi

$ESUDO $controlfolder/harbourmaster --quiet --no-check runtime_check "${runtime}.squashfs"
fi

if [[ "$PM_CAN_MOUNT" != "N" ]]; then
$ESUDO umount "${pyxel_dir}"
fi

$ESUDO mount "$controlfolder/libs/${runtime}.squashfs" "${pyxel_dir}"

export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

$GPTOKEYB "pyxel" &

pm_platform_helper "${pyxel_dir}/bin/pyxel"

# Enable Pyxel virtual env
source "${pyxel_dir}/bin/activate"
export PYTHONHOME="${pyxel_dir}"
export PYTHONPYCACHEPREFIX="${GAMEDIR}/${runtime}.cache"

# play the pyxel package stored in gamedata
"${pyxel_dir}/bin/pyxel" play "${GAMEDIR}/${PYXEL_PKG}"

# Alternatively, run a python script file
# "${pyxel_dir}/bin/pyxel" run gamedata/main.py

if [[ "$PM_CAN_MOUNT" != "N" ]]; then
$ESUDO umount "${pyxel_dir}"
fi

pm_finish
50 changes: 50 additions & 0 deletions ports/entropipes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# EntroPipes

https://codeberg.org/son_link/EntroPipes

© 2015-2025 Alfonso Saavedra "Son Link" http://son-link.github.io

EntroPipes is a puzzle type game programming on **Python** and the retro game engine [Pyxel](https://github.com/kitao/pyxel/) for **Linux**, **Windows**, Linux base game consoles (like R36S, Anbernic, etc.) and Web Browsers.

Under **GPL 3** license

Based on original idea of [Z80St Software](https://sites.google.com/site/z80stsoftware) and porting for the previous version make with LUA and [TIC-80](https://tic80.com/)

The objective is to rotate the pipes until they are all joined together before time runs out. At the end of each level an extra time is added and points are added for the remaining seconds.

## Installation:

Simply download the correct archive for your system, extract and double-click on the executable. It's as simple as that.

## Download:
* [Last releases](https://codeberg.org/son_link/EntroPipes)
* [Itch](https://son-link.itch.io/entropipes)
* [Online](https://son_link.codeberg.page/entropipes)
* PortMaster: Soon

## How to play:

### Main menu

|Gamepad|Keyboard|Action|
|-------|--------|------|
|D-pad|Arrow keys|Up/Down for select option. Left/Right: Change puzzle size|
|A|Z|Confirm|
|B|X|Return to main menu from Top Score and How to play|

### In game

|Gamepad|Keyboard|Action|
|-------|--------|------|
|D-pad|Arrow keys|Move cursor|
|A|Z|Rotate pipe|
|Start|Enter|Pause game
|Select/Option|Space|If game is paused, return to main menu|

Press **Scape** on Linux/Windows to close the game.

## Puzzle editor:

The puzzle editor is written on HTML and Javascript and based on the original puzzle editor make by Z80St. Simply open **editor/index.html** on your favorite web browser (tested on **Firefox** and **Chrome**) or use the online version [available here](https://son_link.codeberg.page/entropipes_editor/) and create a new issue or send push merge.

The font of the icons has been created with (Fontello)[https://fontello.com/] and the icon pack (Pixelarticons)[https://github.com/halfmage/pixelarticons] (under MIT license).
Binary file added ports/entropipes/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ports/entropipes/entropipes/entropipes.pyxapp
Binary file not shown.
Loading

0 comments on commit d84890c

Please sign in to comment.