Introduction
Welcome to this tutorial / tool introduction. Before we dig into the usage and advantages of Processing3
on the GameShell I want to brief you about the topic and what my thoughts about GSketcher are. I want you to be able to decide if this is something of interest and worth putting your time into. Using this tool saves ma a lot of time when an idea comes to life and wants to be outline immediately on the GameShell.
Is this interesting for me?
I think yes - if…
- you are looking for an easy start in programming graphics and data visualization.
- you wondered if and how to use Processing3 (and corresponding sketches) directly from within the GS-Launcher.
- you want to (start) programming with fast visible progress.
- you don’t want to hassle around with your sketches/projects but still running them instantly on the GameShell.
- you want to show off your badass coding skills by just pulling your GS and launching a neat sketch you wrote!
Uhm, what’s Processing 3?
Processing3 is a Java based development environment for artists and graphic programmers.
Since it is very easy to get started with creating something thats instantly responsive and cool to look at,
I think its a great environment to start programming. To keep things simple I’ll just give a small overview
how to get this all running. A more detailed tutorial for using Processing3 overall may follow.
Further reading:
https://processing.org
What can be done (JavaScript samples):
https://www.openprocessing.org
Well and about GSketcher?
The goal behind writing this tool, was to create a bunch of scripts/resources to kickstart a new sketch and creating all required folders/images/scripts to launch the source code directly from your GS launcher. GSketcher installs a demo sketch and all submenus on first install. All sketches / projects will be placed in a single location on your GameShell and also be launchable via a submenu without a compiling process. The workflow is as follows:
- Connect via SSH to your GameShell
- Tell GSketcher to create a new sketch and name it.
- Edit the sketch code via FTP/SFTP and run it directly via launcher.
Since everything for running Processing3 sketches is automatically generated, starting your sketch is just a button away, after applying changes.
I’ll give it a try!
Okay, cool! Lets see whats required to get started.
Installing GSketcher
To install this tool you just have to clone the repo and install it using the provided skript.
Be sure to install it via cpi user to have read and write access to all required folders.
Prequesites:
- Unmodified launcher structure (launchergo unsupported/untested)
- Tested on OS v0.3 (Lima activated)
- Tested only with built-in display
- Installing via cpi user
Clone repo into cpi folder:
cd
git clone https://bitbucket.org/Hawanna/gsketcher.git
This may take a while, since Processing3 comes bundled with the repo - so you don’t have to fiddle with installing it on your own.
Move into the gsketcher folder and install:
cd gsketcher
./install.sh
Again, this may take a while to extract all files. A sample sketch will be deployed in the menu.
Creating new sketches
To create a new sketch you just execute the provided script for doing so.
cd gsketcher
./run.sh
GSketcher then asks you to provide a name for the new sketch. Remember to reload your UI (launcher), since we are adding content to the menu.
I think this can be included in future updates.
Running sketches!
So, how easy was that? It’s getting even easier!
Just navigate within your GameShell menu to the GSketcher submenu and start a sketch that has been deployed there!
Let’s start coding!
GSketcher creates all sketches in a subfolder within its own location: sketches
.
I’d reccomend using a FTP client like FileZilla editing your sketches.
Just navigate to your GSketcher folder (e.g. /home/cpi/gsketcher/sketches
) and start editing your PDE files.
When saving a file, that has been opened via FileZilla, it asks you if you want to upload the file back to its origin.
If doing so, the updated sketch can be run directly via GSketcher submenu on your GameShell.
Every generated sketch by GSketcher already contains some sample code.
At this point I’d like to hand you over - looking for some tutorials on Processing3 yourself - since this article is just about getting startet and everything setup.
If this article generates some interest in building graphical applications for GameShell via Processing it would be a pleasure to write some further tutorials.
As automatically removing sketches and updating sketch menu icons is not implemented yet, just delete or change the generated sketch folder within:
/home/cpi/launcher/Menu/GameShell/GSketcher/YOUR-SKETCH
and (icons):
/home/cpi/launcher/skin/default/Menu/GameShell/GSketcher/YOUR-SKETCH.png
If you run into issues I’m glad to help.
Future
Yeah, I know - GSketcher is a quite primtive way to manage sketches. Maybe adding more features to uninstall, remove sketches, automatically change sketch launcher images, etc. can improve the usability. Feel free to contribute/recommend/comment.
Thanks for reading - I’ll update this article as the development moves on.
tl;dr
Processing3 sketch creator with menu/launcher integration.
Just edit and you got an App to go.