// These control how big the opened window is.
int CANVAS_WIDTH = 480;
int CANVAS_HEIGHT = 360;
void settings(){
size(CANVAS_WIDTH, CANVAS_HEIGHT, P2D );
}
(And a few other things)
Basics needed for a demo
Processing
Rocket & Moonlander
General tips
Graphics
Music
Graphics usually in sync with music
Last few minutes
These vary depending competition rules and categories |
Started in copyparties back in the days
People started to make 'intros' to copies left over space
Eventually the idea of making real-time computer grapchics separated as it’s own art
Size-limited compos, e.g. 4k intro + full no-size limits categories
https://processing.org/ "Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts."
Free & Open source
Works on major PC platforms
Integrated development environment for writing, compiling and running sketches
Has it’s own simple programming language
Internally transformed and run as Java code
Good tutorials, examples and reference (https://processing.org/reference/)
Imports go before these (e.g. import moonlander.library.*;
)
Useful for constants
Used when a variable needed in both setup() and draw()
Can be mostly ignored
Used if using variables for the size() function parameters
// These control how big the opened window is.
int CANVAS_WIDTH = 480;
int CANVAS_HEIGHT = 360;
void settings(){
size(CANVAS_WIDTH, CANVAS_HEIGHT, P2D );
}
Called once per sketch before draw
Used to initialize systems
void setup(){
size(480, 360, P2D); // Size and render mode
// OR
fullScreen(P2D); // (use this for compo entry)
frameRate(60); // Target framerate
... //other initializations
// Moonlander init, to a global variable
moonlander = Moonlander.initWithSoundtrack(...);
moonlander.start();
}
Draw one frame to the screen
Normally the first line clear the screen
(But can be left out for interesting effects)
Moonlander update() method must be called
void draw(){
background(0);
moonlander.update(); //needs to be called every frame
...
}
General problem: How to sync music into graphics?
Solution: Make demo as a function of time and use a tracker
→ Rocket https://github.com/rocket/rocket
Integration to Processing done via Moonlander library https://github.com/anttihirvonen/moonlander
Live editing numeric values for variables at time instants
Can move forward and backwards in time while sketch is running
Define interpolations between defined values
Read values to Processing via Moonlander
Configuration can be saved as a file to be run without Rocket
First install Minim dependency
Sketch → Import Library → Add Library
Download Moonlander and unzip to your Sketchbook location
File → Preferences "Sketchbook location"
(libraries subfolder, next to minim folder)
Use music that you have created yourself or have a license/permission to use
Making it yourself will give you more control, but the learning workload might be outside the scope of the event
In both cases, you’ll need the tempo BPM number (Beats Per Minute) for Moonlander
For free music Google "Royalty free music" and/or "Creative Commons music", or https://incompetech.com/music/royalty-free/music.html
Check the license and make required attributions
In practice choose something that is Creative Commons (CC) and mention in the credits, however do not use CC-ND (Creative Commons "No Derivates") |
Use version control (e.g. Git), or at least backups
Make something you can submit first, improve later
Doublecheck the final version is correct one
Have fun :)
Code everything as function of time
Code everything resolution independent
Only needs to look good on the compo machine
Effects can be short and can be repeated
Use a "scene" variable in rocket for pacing
Libraries
PeasyCam
QueasyCam