GSP: GameShell-Phaser

Based on the work on the nwjs + phaser.io tutorial, a new project has risen…

GameShell-Phaser aka GSP

GSP consists of two parts:

  • GSPLauncher
  • GSPGames

GSPLauncher

GSPLauncher is a phaser.io application that does what’s its name implies. It launches other games (and applications). Basically it can launch any kind of HTML/JS application but currently it is restricted to phaser.io games. This is the main application of the GSP project.

GSPGames

GSPGames is the sibling of GSPLauncher. It contains phaser.io games suitably ported for GameShell. Currently I have “ported” just two small games, Breakout and Invaders as examples and I hope the community here to contribute and port many many phaser.io games for GameShell. A porting guide is published here: https://github.com/pleft/GSP/blob/master/GSPGames/README.md

Installation

Installation is pretty straightforward. Just ssh to your GameShell, git clone the main repository and execute the gsp-installer.sh script. This script will download nwjs, and create the GameShell menu item and icon. Reboot your GameShell and voila the new menu item should appear!

Select it and enjoy! More detailed instructions can be found at: https://github.com/pleft/GSP/blob/master/README.md

The main repo can be found here:

It is still work in progress feel free to contribute and give me feedback with issues, bugs, or ideas.

6 Likes

Won’t boot. I’ve chmod and chown the GSPLauncher and gsp-installer.sh

I’ve also changed permission and ownership on ~/apps/launcher/Menu/GameShell/GSPLauncher.sh

Just boots back to launcher

EDIT: I have seriously tried everything and I can’t get this to boot. I’d love some help I love this idea

Hi thanks for trying out. It’s weird because I am following the instructions and it installs fine on my GameShell
Let’s try some troubleshooting. Are you sure the GSPLauncher.sh script points the correct directory? The instructions are valid provided you git clone from your home directory /home/cpi. So you should have a folder:

/home/cpi/GSP/

Does this folder exist on your GameShell? Can you list it’s contents?

I am posting all the procedure output run on my GameShell:

Linux clockworkpi 4.14.2-clockworkpi-cpi3-ge499fae #4 SMP Mon Jul 23 07:07:59 UTC 2018 armv7l

___/\/\/\/\/\__/\/\/\/\/\____/\/\/\/\_
_/\/\__________/\/\____/\/\____/\/\___
_/\/\__________/\/\/\/\/\______/\/\___
_/\/\__________/\/\____________/\/\___
___/\/\/\/\/\__/\/\__________/\/\/\/\_
______________________________________
Welcome to clockworkPi

For more information please visit:
https://forum.clockworkpi.com

HAPPY HACKING

Last login: Thu Aug 16 08:30:33 2018
cpi@clockworkpi:~$ pwd
/home/cpi
cpi@clockworkpi:~$ git clone https://github.com/pleft/GSP.git
Cloning into 'GSP'...
remote: Counting objects: 111, done.
remote: Compressing objects: 100% (96/96), done.
remote: Total 111 (delta 31), reused 63 (delta 9), pack-reused 0
Receiving objects: 100% (111/111), 931.18 KiB | 541.00 KiB/s, done.
Resolving deltas: 100% (31/31), done.
cpi@clockworkpi:~$ cd GSP
cpi@clockworkpi:~/GSP$ chmod +x gsp-installer.sh
cpi@clockworkpi:~/GSP$ ./gsp-installer.sh

******* 1) Installing NWjs...
--2018-08-16 08:58:41--  https://github.com/LeonardLaszlo/nw.js-armv7-binaries/releases/download/v0.27.6/nwjs-sdk-v0.27.6-linux-arm.tar.gz
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/42462194/8938eade-13f9-11e8-9e7b-9583fbff6d3b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180816%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180816T055843Z&X-Amz-Expires=300&X-Amz-Signature=49bed43a35431b3a874554193b1e92817181708e309792f8f295e61fd0dbe40f&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnwjs-sdk-v0.27.6-linux-arm.tar.gz&response-content-type=application%2Foctet-stream [following]
--2018-08-16 08:58:43--  https://github-production-release-asset-2e65be.s3.amazonaws.com/42462194/8938eade-13f9-11e8-9e7b-9583fbff6d3b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180816%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180816T055843Z&X-Amz-Expires=300&X-Amz-Signature=49bed43a35431b3a874554193b1e92817181708e309792f8f295e61fd0dbe40f&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnwjs-sdk-v0.27.6-linux-arm.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.232.203
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.232.203|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74754862 (71M) [application/octet-stream]
Saving to: ‘nwjs-sdk-v0.27.6-linux-arm.tar.gz’

nwjs-sdk-v0.27.6-linux-arm.t 100%[==============================================>]  71.29M  1.25MB/s    in 70s

2018-08-16 08:59:55 (1.02 MB/s) - ‘nwjs-sdk-v0.27.6-linux-arm.tar.gz’ saved [74754862/74754862]

nwjs-sdk-v0.27.6-linux-arm/
nwjs-sdk-v0.27.6-linux-arm/swiftshader/
nwjs-sdk-v0.27.6-linux-arm/pnacl/
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_libpnacl_irt_shim_dummy_a
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_crtbegin_o
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_pnacl_json
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_libcrt_platform_a
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_libgcc_a
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_ld_nexe
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_crtend_o
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_pnacl_sz_nexe
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_libpnacl_irt_shim_a
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_crtbegin_for_eh_o
nwjs-sdk-v0.27.6-linux-arm/pnacl/pnacl_public_arm_pnacl_llc_nexe
nwjs-sdk-v0.27.6-linux-arm/icudtl.dat
nwjs-sdk-v0.27.6-linux-arm/nw_100_percent.pak
nwjs-sdk-v0.27.6-linux-arm/nacl_helper
nwjs-sdk-v0.27.6-linux-arm/snapshot_blob.bin
nwjs-sdk-v0.27.6-linux-arm/resources.pak
nwjs-sdk-v0.27.6-linux-arm/credits.html
nwjs-sdk-v0.27.6-linux-arm/locales/
nwjs-sdk-v0.27.6-linux-arm/locales/ro.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ro.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/pt-BR.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/en-US.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/mr.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/kn.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/gu.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ms.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/de.pak
nwjs-sdk-v0.27.6-linux-arm/locales/bn.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/ja.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/he.pak
nwjs-sdk-v0.27.6-linux-arm/locales/he.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/nb.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/id.pak
nwjs-sdk-v0.27.6-linux-arm/locales/el.pak
nwjs-sdk-v0.27.6-linux-arm/locales/en-GB.pak
nwjs-sdk-v0.27.6-linux-arm/locales/hi.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/cs.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ms.pak
nwjs-sdk-v0.27.6-linux-arm/locales/da.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/vi.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ml.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/lt.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/da.pak
nwjs-sdk-v0.27.6-linux-arm/locales/bn.pak
nwjs-sdk-v0.27.6-linux-arm/locales/uk.pak
nwjs-sdk-v0.27.6-linux-arm/locales/es.pak
nwjs-sdk-v0.27.6-linux-arm/locales/hi.pak
nwjs-sdk-v0.27.6-linux-arm/locales/fa.pak
nwjs-sdk-v0.27.6-linux-arm/locales/sv.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ar.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/uk.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/tr.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/nl.pak
nwjs-sdk-v0.27.6-linux-arm/locales/pt-PT.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/mr.pak
nwjs-sdk-v0.27.6-linux-arm/locales/fi.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/sv.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/fil.pak
nwjs-sdk-v0.27.6-linux-arm/locales/id.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/tr.pak
nwjs-sdk-v0.27.6-linux-arm/locales/el.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/ja.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ta.pak
nwjs-sdk-v0.27.6-linux-arm/locales/zh-CN.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/fi.pak
nwjs-sdk-v0.27.6-linux-arm/locales/am.pak
nwjs-sdk-v0.27.6-linux-arm/locales/fr.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/pt-BR.pak
nwjs-sdk-v0.27.6-linux-arm/locales/en-GB.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/hr.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/zh-CN.pak
nwjs-sdk-v0.27.6-linux-arm/locales/en-US.pak
nwjs-sdk-v0.27.6-linux-arm/locales/cs.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/ml.pak
nwjs-sdk-v0.27.6-linux-arm/locales/fil.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/lt.pak
nwjs-sdk-v0.27.6-linux-arm/locales/lv.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/ru.pak
nwjs-sdk-v0.27.6-linux-arm/locales/sl.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/nb.pak
nwjs-sdk-v0.27.6-linux-arm/locales/fr.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ar.pak
nwjs-sdk-v0.27.6-linux-arm/locales/nl.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/th.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/es-419.pak
nwjs-sdk-v0.27.6-linux-arm/locales/es-419.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/sl.pak
nwjs-sdk-v0.27.6-linux-arm/locales/hu.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ko.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/de.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/it.pak
nwjs-sdk-v0.27.6-linux-arm/locales/te.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/zh-TW.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/ru.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/sr.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/sw.pak
nwjs-sdk-v0.27.6-linux-arm/locales/bg.pak
nwjs-sdk-v0.27.6-linux-arm/locales/pt-PT.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ta.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/sk.pak
nwjs-sdk-v0.27.6-linux-arm/locales/es.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/fa.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/sk.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/hr.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ca.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/bg.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/et.pak
nwjs-sdk-v0.27.6-linux-arm/locales/sw.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/te.pak
nwjs-sdk-v0.27.6-linux-arm/locales/pl.pak
nwjs-sdk-v0.27.6-linux-arm/locales/am.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/kn.pak
nwjs-sdk-v0.27.6-linux-arm/locales/et.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/hu.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/it.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/gu.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/ko.pak
nwjs-sdk-v0.27.6-linux-arm/locales/lv.pak
nwjs-sdk-v0.27.6-linux-arm/locales/ca.pak
nwjs-sdk-v0.27.6-linux-arm/locales/th.pak
nwjs-sdk-v0.27.6-linux-arm/locales/pl.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/sr.pak
nwjs-sdk-v0.27.6-linux-arm/locales/vi.pak.info
nwjs-sdk-v0.27.6-linux-arm/locales/zh-TW.pak
nwjs-sdk-v0.27.6-linux-arm/natives_blob.bin
nwjs-sdk-v0.27.6-linux-arm/lib/
nwjs-sdk-v0.27.6-linux-arm/lib/libnode.so
nwjs-sdk-v0.27.6-linux-arm/lib/libnw.so
nwjs-sdk-v0.27.6-linux-arm/lib/libffmpeg.so
nwjs-sdk-v0.27.6-linux-arm/nacl_helper_bootstrap
nwjs-sdk-v0.27.6-linux-arm/nacl_irt_arm.nexe
nwjs-sdk-v0.27.6-linux-arm/nw_200_percent.pak
nwjs-sdk-v0.27.6-linux-arm/nw
nwjs-sdk-v0.27.6-linux-arm/minidump_stackwalk
nwjs-sdk-v0.27.6-linux-arm/nwjc
nwjs-sdk-v0.27.6-linux-arm/chromedriver
nwjs-sdk-v0.27.6-linux-arm/payload

******* 2) Updating GSP, any local changes will be lost!
Fetching origin
HEAD is now at ba82141 Update README.md

******* 3) Creating shortcuts

******* 4) removing archives...
***********************************************************************
* If no errors, reboot your GameShell and select the GSPLauncher icon *
*                      HAVE FUN!                                      *
***********************************************************************
cpi@clockworkpi:~/GSP$

Haven’t tried it, but just wanted to say that the Gods font at the launcher page really caught my eye :smiley:

1 Like

Nice to see you also here fellow Gryzor (Retromaniax :wink: )! If sound was working (I am having troubles to make Protracker.js work on my project, code works on nwjs on Windows and MacOS but not on GameShell) you would also hear some great amiga mod (elysium) playing in the background on GSPLauncher.

1 Like

Ahhh too bad! Never played with Phaser, but from what I see on Twitter there’s some exciting stuff around :slight_smile:

Amiga - mehhh give it some ST tracker stuff and I’ll bite :smiley:

Some updates.

Infinite Mario Bros added! Game is playable although a bit choppy and sound doesn’t work at all. The port used is from https://github.com/robertkleffner/mariohtml5 and it is the first non-phaser game added to the GSPGames repo.

Debug Port: 9222
Exposed the port 9222 for debugging on GameShell itself from your PC. It needs ssh tunneling though to access it. Detailed instructions can be found here: https://github.com/pleft/GSP/blob/master/README.md

To update to the latest code, ssh to your GameShell and:

cd GSP
./gsp-updater.sh #warning: this will erase your local changes

or

cd GSP
git checkout master
git pull

gsp.updater.sh doesn’t exist. gap.installer.sh worked though. Infinite Mario Bros appears to only have one functional button; The ‘B’ button, identified as ‘A’ in the game…

LasVegas

Hi! Thanks for the feedback! ‘gsp-updater.sh’ was added in this update so if you had installed a previous version it wouldn’t exist. Sorry for giving wrong instructions above.

As for Mario’s buttons there are two. GameShell’s Button A which starts the game and also makes Mario jump and Button B which makes Mario run or shoot upon picking the flower powerup.

I have my GameShell “Buttons Layout” set to SNES layout. This apparently just changes the assignments for the Launcher and, optionally Retroarch to swap the A/B and X/Y buttons. So what was ‘A’ on my GS is now ‘B’ and visa-versa. Not a problem, I just have to keep that in mind.

Thanks! I like your work!

LasVegas

1 Like

Since i’m a little more into the black/grey/white icon, i made one for the GSP launcher. Feel free to use it, if you like :slight_smile:.

Launcher

3 Likes

I have exactly the same problem. the folder exists and listed the items below.

The listed items:

drwxr-xr-x 2 cpi cpi 4096 Aug 19 10:12 common
drwxr-xr-x 6 cpi cpi 4096 Aug 19 10:12 GSPGames
-rwxr-xr-x 1 cpi cpi 1190 Aug 19 10:15 gsp-installer.sh
drwxr-xr-x 4 cpi cpi 4096 Aug 19 10:12 GSPLauncher
-rwxr-xr-x 1 cpi cpi 122 Aug 19 10:15 gsp-updater.sh
-rwxr-xr-x 1 cpi cpi 202 Aug 19 10:12 index.html
-rw-r–r-- 1 cpi cpi 1064 Aug 19 10:12 LICENSE
drwxr-xr-x 6 cpi cpi 4096 Feb 17 2018 nwjs-sdk-v0.27.6-linux-arm
-rwxr-xr-x 1 cpi cpi 298 Aug 19 10:12 package.json
-rw-r–r-- 1 cpi cpi 2117 Aug 19 10:12 README.md

Hi, is this folder GSP/ on your home directory /home/cpi?

cpi@clockworkpi:~/GSP$ pwd
/home/cpi/GSP

Great icon! If you are familiar with Github you can contribute to the project by making a pull request to change the icon. If not I can put it in the next update.

Hi, The folder is at that exact location on my GS. triple checked it :wink:

Hmm this is very weird, I always perform the installation from scratch on my GS and it always work. So to summarize:

So assuming that you have run the gsp-installer.sh script which completed with no errors, you should check the following:

GSP is installed in:

/home/cpi/GSP

GSPLauncher.sh shortcut script points to the correct GSP location and nwjs executable:

GSPLauncher.sh location:

/home/cpi/apps/launcher/Menu/GameShell/GSPLauncher.sh

GSPLauncher.sh contents:

/home/cpi/GSP/nwjs-sdk-v0.27.6-linux-arm/nw /home/cpi/GSP --use-gl=egl --ignore-gpu-blacklist --disable-accelerated-2d-canvas --num-raster-threads=2 --remote-debugging-port=9222

/usr/lib folder contains 3 libraries copied from nwjs-sdk-v0.27.6-linux-arm/lib/ folder:

  • libffmpeg.so
  • libnode.so
  • libnw.so

Checked everything and everything seems to be in the right place.

I used the gsp-installer.sh. It executed without errors.

Any other ideas?

hmmm, one other idea that I have just checked out and it behaves as you describe, is that probably the GSPLauncher.sh script has no execution rights (although it should have)

So please check:

cpi@clockworkpi:~/apps/launcher/Menu/GameShell$ ls -la ~/apps/launcher/Menu/GameShell/GSPLauncher.sh 
-rw-rw-rw- 1 cpi cpi 178 Aug 17 22:30 /home/cpi/apps/launcher/Menu/GameShell/GSPLauncher.sh

if it appears like above : -rw-rw-rw- then the script is not executable and you should change it by giving:

cpi@clockworkpi:~/apps/launcher/Menu/GameShell$ chmod +x GSPLauncher.sh
cpi@clockworkpi:~/apps/launcher/Menu/GameShell$ ls -la ~/apps/launcher/Menu/GameShell/GSPLauncher.sh 
-rwxrwxrwx 1 cpi cpi 178 Aug 17 22:30 /home/cpi/apps/launcher/Menu/GameShell/GSPLauncher.sh

Now the script is executable: -rwxrwxrwx and GameShell can execute it.

A new update today!

  • Fellow @Nielsvd contributed a new icon for GSPLauncher (btw looks great on GameShell)

  • html5 pacman game added to the list.

Enjoy both by running gsp-updater.sh script twice (the first time it will update also itself, the second time the updated gsp-updater.sh will also update the GS icon) and then reboot your GS. If you are having problems updating this way just delete the whole GSP folder and git clone the repo from start.

Did the things above and a full reinstall. Both didn’t solve the problem :frowning:

As far as i can see there were no errors during the install.