Game Development Reference
In-Depth Information
Additionally, Processing.js lacks power. In the original version, you can draw thousands of objects to the
screen without sacrificing frame rate. With the JavaScript port, however, there is a significant disparity
between the two. This is largely due to the constraints of using the HTML5 canvas; but with each browser
update, we are seeing increased rendering speeds on the side of the canvas.
How does Processing.js work?
Although Processing.js can be viewed as a “lite” version of Processing, it is still an exceptional tool
considering that it runs on the web. The way it works from a user perspective is quite simple. All you have
to do is code as you would in Processing. Then, when you want to make the project web-ready, you follow
some simple instructions to connect it to the canvas. The way Processing.js works is that it simply converts
what you've written and applies it to the HTML5 element, the canvas tag. It makes life easier for the coder
because instead of learning a new technology, you can simply apply what you already know and instantly
make Processing sketches deployable on the web.
Note In Processing, a sketch is simply the resulting visual application that runs once
your code has been compiled.
Who should use Processing.js?
New coders would benefit from using Processing.js. Since the library revolves around the creation of
visuals, it is a very intuitive way for beginners to learn and understand the concepts of programming. You
don't even need to download any software to get started. If you check out the Resources section of this
chapter, you will find a few different online editors that make working with Processing.js hassle-free.
Web designers who want to add some interactivity or dynamic elements to their web sites can also benefit
from using it.
Game developers are another group that should utilize Processing.js for the ease of creating graphics and
visuals, and the power of flexibility. Not only do I find working with Processing.js more intuitive than
JavaScript and the canvas API, but you are able to intertwine the two.
In short, Processing makes programming accessible. It enables people with little to no coding knowledge
an easy transition to powerful tools. It also provides experienced programmers with dozens of libraries
geared towards coding visuals to accommodate a nearly infinite array of ideas.
What are its strengths and weaknesses?
The two major players in the creative, coding-specific software industry are Processing and
openFrameworks. The major difference between the two is that openFrameworks is based on C++ while
Processing is based on Java. All in all, they are very similar in terms of functionality and capability, much
like Coke and Pepsi. While other creative coding software exists (Cinder, VVVV, and nodeBox, to name a
few), Processing and openFrameworks are the most popular.
 
Search WWH ::




Custom Search