Making Interactive Paint Balls

“Paint Balls Interactive” is the first interactive NFT I have ever published but, it wasn’t conceived as such from the start. Originally, in fact, I published a non-interactive piece but then (for reasons I will explain) I went a step further. Now I would like to share some behind the scenes details on the creative process that led me to the “Paint Balls” pieces.

On a personal level I favour simple geometric shapes, lines, and bold colours so it might not come as a surprise I particularly like minimalism, op-art as well as constructivism too. When I create an artwork, I try to simplify or “remove” elements instead of adding more to the piece.

This was the origin of the idea behind “Paint Balls”: just two simple shapes (a circle and a rectangle) interacting with each other. “Interacting” how? Well, the simplest thing it came to my mind was to treat the rectangles as bridges to cross and the circles as balls that randomly move around. I didn’t want anything chaotic though, so I established some basic rules:

  • the balls follow 8 predetermined directions: up, down, left, right plus the 4 diagonals;
  • the bridges rotate to allow the balls to move, but the rotation is fixed at 45 or 90 degrees (randomly chosen for each bridge);
  • each bridge starting position can only be one of the 8 directions mentioned above;
  • bridges and balls move in turns: bridges turn first, then balls move. They never do it at the same time

Already with these rules I had (at least in my mind) a very neat minimalist piece that was fun to watch as the combination of random movements of balls and bridges created a weird “square dance” effect. I wanted to add some colour too, though. Again, going with the first idea it came to my mind, I decided that each ball had to have a colour and leave a trail behind so to paint all the bridges it passed through. With each ball doing the same, the piece soon became a “war of colours” that was enjoyable to watch.

At this point the piece was substantially ready and, bugs in the code aside, it was doing pretty much what I wanted and the original idea (“two simple shapes that interact with each other”) had found its concrete realisation. Annoyingly though I am a detail-oriented person, so I can’t be satisfied easily like that: I have to go through as series of “what if…” and “how about…”, which tend to collide with the idea of “keep it simple. Minimalist”. In the end the additions I made were pretty much related only to the behaviour of the elements not the visuals, even though the behaviour does influence the visuals in return!

Anyway, first I decided that having the balls overwriting each other’s colour continuously was somewhat unsatisfying from an overall perspective. The idea to have a “prevalence” of a colour vs the others was somewhat appealing, so I decided that each ball, when it is created, receives a small amount of “hit points” (like a character in a video game) and each time they hit each other their hit points are reduced by 1. When a ball reaches zero hit points, it changes to the colour of the ball that caused it to “die” and its hit points are reset to the original amount. In this way you can see that after a while some colours “die out” whilst other take over.

Another change was in the colour selection itself. There are pre-defined colour palettes and one is randomly chosen at the start of the simulation. The palettes can have from 2 to a maximum of 5 different colours. But I wanted some variety, so each time one colour of the palette is chosen there’s a fairly high probability that its hue, value and saturation are modified. In the end you can see various shades of the base colours and every time the simulation picks a new palette the colours are never exactly the same.

Finally, the last change I made was related to the behaviour of the balls. One immediate addition was to let the balls cross more than just 1 bridge at a time. The original version was: “all bridges turn then all balls cross 1 bridge”. Now instead, they can move a maximum of 5 times if they can or “want”. Which leads me to the second change related to the balls’ movement.

The balls move randomly, meaning that when it’s their turn each one of them “rolls a dice” to pick a direction. Well, I decided to somewhat correct that randomness. First of all, I introduced the possibility for a ball to “not move at all”. Secondly the chance to go back from where it came is lower than the chance to pick a new direction. These changes are more subtle as sometimes (due to the way the bridges are positioned) the only way a ball can move is to go back from where it came, but still it does make an overall difference in the balance of the artwork.

At this point I was satisfied and I published the artwork on Hic at Nunc in the form of a 30 seconds clip that is showing one of the many possible interactions between balls and combinations of colours. It is fun to watch, but yet it was only a brief snapshot of a never-ending process of colours overwriting each other, taking over or dying out, all encompassed with a weird “square dance” between the bridges and the balls. At that point I had no real intention to make it interactive, but a comment I received in one of the tweets I put out to advertise it, did point out the obvious I shamefully ignored: it would be much better if it was an interactive piece!

And so it was decided. The code itself was already fine with no obvious bugs, I just needed to add more interaction though. I opted for something straightforward, just few commands for the user: “R” to completely reset the simulation; “A” and “S” to cycle through the background and balls palettes and “P” to pause/unpause the simulation. If you don’t interact with it, it will change colours by itself after 5 to 10 minutes (I call it “soft reset”) and reset completely after 1 to 5 “soft resets”.

Now both pieces are available as 1/1 editions on Hic et Nunc and I can proudly say that the interactive piece sold very quickly! Unbelievable! This has prompted me to create more interactive pieces, so stay tuned for the next one…

My artworks on Hic et Nunc


What do you think?

7 Points

Leave a Reply

Numbed Duck Series 13 : Numbed Vikings