Ben Simms

Processing development in Intellij – 3 simple steps and pictures

Step One:

Assuming you have intelliJ and Processing installed, launch IntelliJ.

The first thing we are going to do is grab the core library.

File – Project Settings – Libraries – Add – Java

Screen Shot 2014-07-13 at 20.26.57Screen Shot 2014-07-13 at 20.29.34

Now select OK and return to your project. We must extend our class with PApplet (Processing Applet) this gives our class access to the Processing methods.


Step Two

Because we are using PApplet we have to tell IntelliJ where the main method lives, use the below code and make sure PApplet.main matches the name of your class.

Screen Shot 2014-07-14 at 08.51.10

  1. static public void main(String args[]) {
  2. PApplet.main(new String[]{"YOUR CLASS NAME HERE"});
  3. }


Step Three


As part of the build process we must tell IntelliJ where the module lies. Select the following button and hit ‘Edit – Configurations’

Screen Shot 2014-07-13 at 20.38.28

Screen Shot 2014-07-13 at 20.41.35

Now select the displayed module.


That’s it your now ready to run your Processing application by hitting the run icon (top right). Now you can enjoy the benefits that IntelliJ brings with it’s suggestive inputs etc..

Anytime Bulb Mode – Now exports a gif!


I just added the ability to export an animated Gif, this way you can replay the construction process over and over again; looks pretty cool! The playback of the gif is very slow because the image is huge (for the web), so I need to find a way to compress the Gif before it finishes the animation, anyway it gives a good impression of how the app works

Anytime Bulb Mode


A few weeks ago I decided I should get back onto this project and see if I couldn’t fix a major blocker I had. The problem I had was with the motion tracking library, unfortunately the drivers for it were no longer supported and on-top of that I couldn’t get the basics running on the Raspberry PI.

With that in mind, I figured I would try and make my own version, a bit scary and perhaps optimistic but I thought “what the hell” and gave it a go.

Progress was slow to begin with, but I started to research the Capture library for Processing and realised it was smart enough to pick out every pixel colour it could find in an image or video feed!!! So all I had to do was think of a way to track the desired colour.

Some time later I got it to a working state. The behavior wasn’t exactly what I wanted, mainly I was tracking individual pixels whereas my previous library was able to find a collection or matching pixels at once, the difference being the old library would build the image much quicker and also create a nice outline image. (I’m still aiming for that effect)

Anyway, I started using my code to take some images and create some awesome art and I decided at this stage I would create a branch for it and also big it up a little.

The art was great and I could easily see it on an album or just all a sweet looking background!


Screen Shot 2014-06-21 at 21.38.38

The images below show the progression of my code and it’s behavior

Screen Shot 2014-06-21 at 21.40.37

Tracking a colour and drawing ellipses at the location.

Screen Shot 2014-06-28 at 11.09.05

Bigger ellipses and coloured. It was looking too real so I quickly deviated away from this effect

Screen Shot 2014-06-27 at 17.12.20

Not that you can tell, but at this stage I got the image drawing quickly


Switched to vertexs (which took quite some time) but the effect was much more inline with my previous app


Added more colours to paint with


An example result, what I call Star-mapping!


Sub Attack

1024x500Free Version Android:

Ad Free Version Android:


!!Grab yourself some Arcade Action!!

Please note, you can also purchase Sub Attack without the ads.

Welcome on-board captain, the ship is now yours! Take control of her, drop mines and blast the enemy submarines to pieces.

Don’t forget, if you can get a high kill chain you can call in crazy air support!
Look out for the golden submarines, they always carry goodies!

*Retro inspired game play, sound FX’s, music and graphics!
*Pick up and play gameplay (Perfect for commutes, sitting on the bog or just killing time)
*Build and collect insane power ups, including Space Invaders, big lasers and metal fences to name a few!
*Intuitive controls that work perfectly
*Simple gameplay with a growing challenge
Classic Arcade action in the palm of your hands!
The entire game for less than the price of one game in the arcade :)






promo3 promo4

Super Punch Bag – in the works

I set myself a little challenge this month, trying to catch some of the Flappy bird flotsam I’ve decided to challenge myself to make 4 games, all with a really simple yet infuriating theme. Enter ‘Super Punch Bag’

The game is simple, time your swings to hit the punch bag away from your face and into the shields. Clear all shields in one swing and you gain a point!

Yes, this game is hard!

I’m pretty much finished, just doing a bit of play testing, but expect to see this on the app store sometime soon :)


Screenshot_2014-03-03-13-34-20 Screenshot_2014-03-03-13-34-30 Screenshot_2014-03-03-13-34-39

A blast from the future – Short sci-fi story


A blast from the future is a short story I wrote with the purpose of getting a vision out of my head and onto paper. If i had a video crew, special effects department and loads of money I would have made a short film, but I don’t; so instead… I present a story :)


A blast from the future

A fresh, cool and purposeful horizontal line of air was blowing in my hair, the wisp slowly

moved downwards in a calm but timely fashion, it settled briefly on my eye lids before moving down to my chin and back up again where it repeated the process.Slowly I began to open my eyes.

image taken from Forbes

I felt the softness of the foam mattress stiffen, it too started to turn cold. I tried to ignore the chill (which was now becoming frustratingly uncomfortable) by grabbing my blanket and tugging it over my head, it wasn’t long though before that turned cold. There was only one thing left to do, get up.

I slipped out of bed and stood on the warm panel projected on the carpet, a whirl of neon lights flickered beneath my feet but I cared not to watch, I was just waiting for the OK. The panel turned green; “Great”, I thought sarcastically “another perfect day in another perfect world”.

The aroma of grounded coffee beans penetrated the room and I started to feel a little more alive, my stomach rumbled which the house took note off. Looking into the wardrobe I could see a message from house informing me breakfast was on the go. Three draws silently opened, each one radiating a little heat. I put my hands in to take my garments but stopped on the third draw, “Not today” I said to the wardrobe, “I want my grey hoodie”.

One draw closed and another opened, there was my hoodie, much nicer than those all white, skin tight garments. I grab all three garments, my trousers went on first. At first I struggled to find the colour swab tucked within my pocket, but I was adamant that I wasn’t going out in white trousers again. I finally found the tab and moved my finger around on the plastic patch until I found a shade of blue I liked. Then I slipped on the hoodie and socks, both preheated the way I liked them.

I looked at my wife still sleeping and walked up to the bedroom door which effortlessly slid silently out the way. I was just about to step out when I noticed on the wall opposite me scrolling a message, ‘Wrist-com’ was flashing. “Damn” I said silently, I had almost forgotten, I walked over to my bedside table and rested my hand on it. A little blue light shone on my wrist, it moved around in a circular motion for a few seconds and then vanished as my wrist came alive with digital news, weather and the time.

Time to get breakfast I thought as I place my other hand over the Wrist-com.

As I left the bedroom, I slowly walked down the stairs. My current weight and health levels were being displayed at the bottom as a subtle reminder that I must visit the gym… “Not today” I whispered to house, I also gave house the finger, but it didn’t care to note that.

Entering the kitchen I was introduced to a new static background track I hadn’t heard before. It was the sound of a forest, light rain and animals walking, I hated to admit it, but it liked it.

My coffee sat waiting, I caught the colour of the mug fade from red to orange. I knew some people liked to have their coffee poured at a set temperature, but I preferred mine to cool down naturally.

Sat next to my coffee was a slice of toast. Shame, I didn’t want toast today. “House?”, “Yes” replied the house “I don’t want toast today, I’ll have fruit. Give the bread to the birds”

I pushed the rectangular plate into the track embedded into the kitchen table. A transparent lid slid into place and the vacuum was created, the plate slide one way and the bread another. As I looked through the kitchen window I saw the toast projected out of the waste shoot and float slowly down onto the grass, like confetti at a wedding, very satisfying.

My plate of fruit arrived before I had returned my eyes to the table. I tucked in enjoying the array of exotic fruits house had presented. “House”, “Yes Kyle” replied the house, “Show me Isabel” The table came alive with a video feed enhanced by night vision, she was still sleeping, her cot statistics projected on the floor around her suggested she would likely be asleep for another 36 minuets. From the data it looked like she’d had a good sleep, she had entered R.E.M earlier than normal last night suggesting she was more tired than normal. I denied the feed on my Wrist-com, pushed my plate into the track and headed to the bathroom.

A fine fragrant mist landed over me, it quickly penetrated my clothing and I felt damp, but within a heartbeat, I was dry again. House kindly informed me cleansing was complete.

I grabbed the purple PowerMouth liquid from the bathroom sink, I could just about make out a cluster of nano bots hanging together. I’ve never liked that, not when you can actually see them… I gave the bottle a vigorous shake turning the purple liquid into a semi reflective purple. Two shots into the mouth and my teeth where cleaned.

I looked at my wrist and I could see the activity of the nano bots, they had already cleaned 45% of my mouth. I tapped my wrist twice, who want’s to see that running all day?

I remembered the sensation of the first time I started using this nano mouth wash, I felt disgusted because a cluster of bots failed to break down a fragment piece of pizza dough quick enough, so rather than feeling a nice liquid dust, I felt a hard drop of squishy dough, which almost made me choke, that was when the bots were new. PowerMouth had since been advertising these new purple bottles and to be fair, they seemed to work.

I turned to leave grabbing my coat of the hanger, it was a metal hanger screwed into the wall, some technology just works.

Swinging the coat over my back and through the arms I felt the slight compression, I wished that my wife would stop buying me these tight fitting outfits. I pulled my hood out and let it settle into place. My coat quickly reconfigured itself to take away the newly acquired space generated from the removal of my hood.

My Wrist-com shone through the white sleeve of the coat making all the graphics and text blurry but readable. I used two fingers and slide down my wrist to darken the projection. Time to get the car I figured.

As I approached the front door the key panel was flashing orange, the house started speaking “Karl, you haven’t” I interrupted; I knew what house was going to say. “Yes! alright I do it now”. I tapped the panel with my thumb twice, my little finger once, then made a clockwise motion with my index finder. House announced the new password was sufficient and the front door slid open. I mumbled to myself about getting retina locks and stepped out into the garden.

The car door was open and the arrival time of work displayed in the glass of the entry window. I slipped in. “Morning Kyle” car announced, I didn’t reply. The door slid shut and made a slight hissing sound. Without a word the car began move forward, I was gently forced into the seat by the motion. “Warmer seat and coffee please”. The seat instantly warmed my arse and the heat quickly rose up my back, I think the coat misheard the command, either way it felt comfortable.

A red coffee cup presented itself at the end of the arm rest, I could see the gyroscope cup-holder swinging left and right as the car thrust around corners, I always found it slightly reassuring to see old theories still in practice.

Through the windscreen the news was playing, again my car decided to display 20 news channels at once. This was a re-occurring offense and I had my concerns this car was starting to get a personality of it’s own.

You’re tired Kyle, with your stress and tiredness level currently settling around 30% we could take it down to 22% with a quick power nap before your arrival at your office, would you like me to induce sleeping agents?”

This damn car, I knew buying it was a bad idea, I missed the old cars, they could only talk about directions and repair instructions. I did however feel tired and the coffee wasn’t kicking in. “Yes” I said, “go on then”. I heard a little hiss from behind my ears and my eyes soon snapped together… I was out.

Who knows how long I was out, but a loud bleeping noise pierced right through my ear drums, it was mechanical and obtrusive, my eyes were still heavy from the sleeping agent, it took me some time to orientate myself, with my eyes half closed I reached out my hand and thumbed around to find the source of that repetitive screech, my fingers slid across a black smooth plastic object, I tried to grab the object and bring it closer to my squinted eyes so I could see the screen, but it slipped out of my fingers and feel to the floor. The damn noise was now even further out of reach and all my efforts to mute it had been wasted. There was only one thing left to do, get up!

The Tiny Gif Maker – My new Java app… Finished

The Tiny Gif Maker! sweet little tool for quickly creating animated gifs from your own live video feed!

You can use these exported micro gifs on forums, web posts, comment replies or even little ico’s.

You can download the mac version here for free and I’ll look into creating a windows version.

Features Include:

  • 3 set sizes to export too
  • Add as many or as little frames as you like
  • Automatic looping
  • Individual frames exported
  • Great quality image low export size
  • Takes only seconds!
  • Can be used to create funny little animations


  • Mac OSX
  • Java 7 or above
  • Web Cam (tested with Mac Book air)

The Tiny Gif Maker Postmortem

So this is probably my first bonified “end to end” Java application and it’s far from perfect so for my postmortem ill start with what I don’t like or, what went wrong.

Firstly the size of this app, for what it does, this app is huuuuge, it’s about 40mb unzipped, the main reason for this is the number packed in extras such as the dynamic libraries and jars required to get processing running, but at this stage I don’t want to risk breaking things so I left them in.

Secondly, the interface, after getting the code working, I started putting graphics in and this became a lot more challenging than it should had been, so in the end I just used a series of images that are accessed when key’s pressed. Not ideal, in-fact it’s pretty crap but hey it works (if you do what your supposed too).

Thirdly, on launch if the app cannot find a web camera, rather than tell the user this the app will just close,.

Anyway, this project was a small project for me and was more about learning Java more than anything else and I learned a lot!

I used two main libraries to achieve this app, the life saver one was called gifMaker and this allows you to import a number of images and it will create an animation out of them, for me though, I needed to use the web camera and that was my second library the embedded Processing camera library.

It was easy enough to capture the frames from the web cam feed, but piecing them together to export as an animated gif was not so.

I hit a ton of issues with this, mainly because I wasn’t aware of some of the methods available in the gifMaker library (lesson learned, Make sure you overview all the methods before using a library). Once I had this side of things working I was really happy with myself. I figured the next part would be a piece of piss, because all I wanted to add was the feature to allow users to pick a size. In my mind it worked like this, they press a number say 1, and the screen re-sizes, when the user presses ‘Spacebar’ to capture a frame, the frame captured would be of the same size.

This actually was much harder (two days on and off) worth of playing and testing. The problem I hit (and it seems obvious now :) ) was making the camera object in the setup method. Processing uses the setup method to do things such as size the Java application window and it’s only called once (as far as I can tell), I couldn’t figure another way to call it again later in the script.

So in my setup I was setting the camera window size to match the Java application size, then when a user changes the java application size I was expecting the frame image to match… But it didn’t because the camera object size hadn’t changed…

To fix this I finally figured out I should create a new instance of the camera object when the user presses the export size button, this way I could dictate the camera size every time, thus Processing would be happy when I capture the frame. Whoo!

And that’s about it, or as much as I can bear to write about it for now at least :) I thoroughly enjoyed creating this app, it’s been a nice distraction from my ATB project.

ATB – The camera, early thoughts.


I want my camera to look and feel like a medium format camera, the reason for this is because A, my camera wont be small and B, they look classic and are held in such a way that I think it will suit my cameras need. Here’s an example of what one looks like (if I can make anything that comes near to this I will be happy :) )




At this stage I’m thinking a strong yet thin type of wood maybe MDF, with a nice sponge and leather coating to keep with the retro look and feel. The button and switches I would like to be trimmed with silver much like the above image.


For my camera I will be using a LCD screen sourced from a portable DVD player, this will be house at the back of the camera and will pretty much take up the entire back, rather than look through a viewfinder you’ll look straight at the screen much like the medium formats I remember from uni. It’s not a touchscreen so I’ll be wiring in switches and what no later.


I would love to get a number of different types of switches going on, dials, knobs, rockets switches etc but I’ll play it from hear and see how I get along, I need to be realistic.


I have a portable battery pack which can power the Pi for hours, probably 9 or 10, I’ve not really tried but needless to say it’s going to be enough. I’d also like to use the pack to power the screen but I’m not sure this is going to work as the screen requires at least 9v.


I’m not sure at this stage how I will get the photos of the camera, I have a few options. I could use bluetooth to transfer, wifi or just a simple USB stick. I’d like to keep it feeling like film the best I can so maybe I will look into a cylinder shaped USB stick.

Anyways, that’s my thoughts for now.


ATB Camera (Any Time Bulb Mode)

One of the photography styles I’ve enjoyed for many years is shutter delay, that is, leaving the shutter open and recording the light that enters. You’ve probably seen it a thousands times before, the shot of the motorway and long red and white trails; that kind of thing. Well I’ve always tried to be as original as I can using different materials such as the glow from glow sticks, apps for creating graphics, projectors and even bomb fires :) All of which have produced interesting results:

Now I want to do something very different, I want to bring together a few projects into one new project :). I want to make a physical camera capable of producing “bulb” shots in any environment (so that it doesn’t have to be night time). I’ve already created the software for this with my java motion camera shots using the JMyron library. I created some great pictures with it:

So now I’m thinking… What if I could get my code running on a Raspberry Pi, and create a little/big portable camera out of it? That would be great, I could take it out and about shooting all kinds of scene regardless of the time of day.

I can foresee a lot of challenges in this, getting my Java code to run on Pi, wiring up the physical buttons, camera drivers, exporting the saved files etc…

Anyway,  this is going to be my next major project and I’ll be blogging about the whole process along the way :)

« Older posts

Copyright © 2014 Ben Simms

Theme by Anders NorenUp ↑