Skip to content

Commit

Permalink
Merge pull request #30 from Cebion/worldofgoo
Browse files Browse the repository at this point in the history
New Port: World of Goo
  • Loading branch information
kloptops authored Feb 3, 2024
2 parents 3aec41b + 2eeeb55 commit 3444d2f
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ports/worldofgoo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Notes

Thanks to the wonderful developers of 2D Boy for creating such a wonderful game.
https://www.gog.com/en/game/world_of_goo

GOG Files are compatible.
Steam Game files may work

## Controls

| Button | Action |
|--|--|
| Dpad | Move |
| A | Left Click |
| X | Slow Mouse |
80 changes: 80 additions & 0 deletions ports/worldofgoo/World of Goo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/bin/bash
if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

get_controls

GAMEDIR=/$directory/ports/worldofgoo
CONFDIR="$GAMEDIR/conf/"

CUR_TTY=/dev/tty0
$ESUDO chmod 666 $CUR_TTY

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

cd $GAMEDIR

# Ensure the conf directory exists
mkdir -p "$GAMEDIR/conf"

# Set the XDG environment variables for config & savefiles
export XDG_CONFIG_HOME="$CONFDIR"
export XDG_DATA_HOME="$CONFDIR"

# Setup GL4ES
export LIBGL_FB=4
export LIBGL_ES=2
export LIBGL_GL=21

# Setup Box64
export LD_LIBRARY_PATH="$GAMEDIR/box64/native":"/usr/lib":"/usr/lib/aarch64-linux-gnu/":"$GAMEDIR/libs/":"$LD_LIBRARY_PATH"
export BOX64_LD_LIBRARY_PATH="$GAMEDIR/box64/x64":"$GAMEDIR/box64/native":"$GAMEDIR/libs/x64"

export SDL_VIDEO_GL_DRIVER="$GAMEDIR/box64/native/libGL.so.1"
export SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig"

export TEXTINPUTINTERACTIVE="Y"

# Extract and organize game files if the installer exists
WOG_FILE=$(ls *.sh 2> /dev/null | head -n 1)

if [ -f "$WOG_FILE" ]; then
unzip -o "$WOG_FILE" > "$CUR_TTY"
# Handle game directory movement based on structure
if [ -d "data/noarch/game/game" ]; then
$ESUDO mv -f data/noarch/game/game "$GAMEDIR/gamedata/"
elif [ -d "data/noarch/game" ]; then
$ESUDO mv -f data/noarch/game "$GAMEDIR/gamedata/"
else
echo "Game directory not found after extraction." > "$CUR_TTY"
sleep 5
exit 1
fi
# Directly search and move WorldOfGoo.bin.x86_64
if $ESUDO mv -f $(find . -name "WorldOfGoo.bin.x86_64" -print -quit) "$GAMEDIR/gamedata/WorldOfGoo.bin" 2>/dev/null; then
$ESUDO chmod +x "$GAMEDIR/gamedata/WorldOfGoo.bin"
else
echo "WorldOfGoo.bin.x86_64 not found after extraction." > "$CUR_TTY"
sleep 5
exit 1
fi

rm -rf data/ meta/ scripts/
rm -f "$WOG_FILE"
echo "Setup complete. Have fun playing!" > "$CUR_TTY"
fi

$GPTOKEYB "WorldOfGoo.bin" -c "./worldofgoo.gptk" &
$GAMEDIR/box64/box64 gamedata/WorldOfGoo.bin

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
25 changes: 25 additions & 0 deletions ports/worldofgoo/port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": 2,
"name": "worldofgoo.zip",
"items": [
"World of Goo.sh",
"worldofgoo"
],
"items_opt": null,
"attr": {
"title": "World of Goo",
"porter": [
"Cebion"
],
"desc": "World of Goo is a multiple award winning physics based puzzle / construction game made entirely by two guys. Drag and drop living, squirming, talking, globs of goo to build structures, bridges, cannonballs, zeppelins, and giant tongues. The millions of Goo Balls that live in the beautiful World of Goo are curious to explore - but they don't know that they are in a game, or that they are extremely delicious.",
"inst": "Copy your Linux Game files (WorldOfGoo.bin.x86, Data Folder) to the worldofgoo folder.",
"genres": [
"puzzle"
],
"image": null,
"rtr": false,
"exp": false,
"runtime": null,
"reqs": []
}
}
Binary file added ports/worldofgoo/screenshot.jpg
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/worldofgoo/worldofgoo/box64/box64
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions ports/worldofgoo/worldofgoo/box64_license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2018-2021 Sebastien Chevalier ("ptitSeb")

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
20 changes: 20 additions & 0 deletions ports/worldofgoo/worldofgoo/gl4es_license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2016-2018 Sebastien Chevalier
Copyright (c) 2013-2016 Ryan Hileman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
38 changes: 38 additions & 0 deletions ports/worldofgoo/worldofgoo/worldofgoo.gptk
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
back = esc
start = enter

a = mouse_left
b = mouse_right
x = mouse_slow
y = o

l1 = -
l2 = f3
r1 = +
r2 = f4

up = up
up = repeat
down = down
down = repeat
left = left
left = repeat
right = right
right = repeat

left_analog_up = mouse_movement_up
left_analog_down = mouse_movement_down
left_analog_left = mouse_movement_left
left_analog_right = mouse_movement_right

right_analog_up = \"
right_analog_down = \"
right_analog_left = \"
right_analog_right = \"

deadzone_mode = scaled_radial
deadzone = 4096
deadzone_scale = 8
deadzone_delay = 16
mouse_scale = 512
mouse_delay = 16

0 comments on commit 3444d2f

Please sign in to comment.