Page 1 of 1

GP in a web browser

Posted: Dec 15th, '16, 17:32
by JohnM
GP now runs in a web browser! You can run it at:

https://gpblocks.org/run/gp.html

(Note: For security reasons, the https: prefix is required to use the microphone for sound input in the Chrome browser. In the future, other browsers may also require that prefix to access the microphone or other browser facilities.)

A few notes for anyone trying GP:

A number of small GP projects are built in. You can open those projects by clicking the "open" button.

You can also open your own GP projects by dropping the project file onto the the GP browser window. The file name must end in .gpp. You can also import .png images and .wav sound files into a project by dropping them onto GP. Uploading files and opening projects is slow, so be patient.

If you create or modify a project using the browser version of GP, the "save" button will save it in your "Downloads" folder. In Firefox, the saved project has the name you gave it. In Webkit browsers, the file is called "Unknown" and you'll need to rename it manually. I'm not sure about other browsers.

If you put your project on a server, you can make GP load that project on startup by adding the project URL after a hash mark like this:

https://gpblocks.org/run/gp.html#gpbloc ... mplate.gpp

(Note: There could be some cross-domain access issues when your project is on a different server from GP. I haven't tested that case.)

Browser GP runs on many mobile devices, with varying levels of performance. Of the mobile devices I have, the iPad Pro gives the best performance and has enough screen real estate to be useable. Browser GP also runs on the low-cost $89 Amazon Fire HD tablet. The performance isn't great, but simple things can be done. Browser GP also runs on phones. The screen space is too small to be useful for programming, but a phone might be okay for viewing existing projects.

Keyboard input on Android devices is awkward because Android doesn't make keyboard events available as they are typed; you need to enter an entire word or phrase, then hit the enter key to push it to GP. Hitting the enter key by itself will insert a newline. When running on Android devices, a "backspace" button appears above the GP canvas that allows you to backspace or delete text in a GP window or field. It's not elegant, but it does the job, and so far I haven't found any other way to enter a backspace on Android.

Of course, the desktop/laptop version of GP offers better performance, better integration with the file system and copy-paste, and a few additional features. See the "Download GP!" forum thread for the latest version.

I'm interested in experience reports of Browser GP running in Edge, IE, Opera, or other browsers besides Chrome, Firefox, Safari, and Amazon's Silk browser.