Opinion about programming languages similar to Processing

Hi everyone,

I code in Processing for about a year and I’m trying new creative coding languages like OpenFrameworks and SFML. The problem is that they are annoying to setup (I’m don’t know much about C++) and I can’t use them properly.

Does anyone use them? Are they faster or has something that Processing doesn’t has?

Thanks!

1 Like

Hi RenanRabelo,

I’m using SFML on other project using c++ language.

Processing has been designed to ease as much as possible creating visual arts with code. It is a wonderful tool to start coding because you don’t need to setup anything and you don’t need to really understand how it works under the hood. You just write setup() and draw() and you are good to go.

Another great thing about it is that you don’t need to compile your code and it comes with its own IDE to simplify even more the process of creating visual arts with code. And its cross-platforms !

If you are more advanced, you can use everything delivered by the Java language as well as modifying the processing framework to fit your needs better.

The SMFL is a bit more low level, it simply brings you the basics functions that you would need to create a window and draw things on the screen. Most of the time, you will need to build another level of abstraction on top of what the SFML is offering to fit your own needs. But here you can customize it as much as you want since you are making the decisions. Also you will need to compile your code to be able to run it and compile for each operating system that your are targeting.

You are not limited to c++ with SFML, other languages are supported although the c++ is the official language. The advantages to use c++ over Java is mainly performance. But what you gain in performance you lose in user-friendliness so to speak.

3 Likes

I use openFrameworks once in a while. People often say “openFrameworks (c++) is faster than Processing (java)” but with a modern computer I think the difference is small unless you are obsessed with the number of particles you are throwing and pushing to the limit. C++ is often handy when you want to work with hardware because they normally provide SDK in C/C++ and you need to bind it to Java when working with Processing. But as you mentioned setting openFrameworks up is hard and working with external library is even harder as you need to properly link them.

Also openFrameworks is not adding new features anymore if I understand correctly. If you are interested “new” environments you may want to check out tools like openrndr and nannou (which, however, are moderately difficult to set up too).

4 Likes

Hi @RenanRabelo ,

I agree on what the others said, Processing was developed using Java which is a higher level language than C++ because it’s more abstracted from the complicated parts of the memory management (there’s a garbage collector) and it runs on a virtual machine (the JVM and that’s why Java programs can run anywhere as long as you have the JDK/JRE).

In C++ on the other hand, you directly compile your code to machine code, you can deal with memory allocation and pointers and talk with low level APIs like OpenGL or Vulkan for 3d graphics.

If you are concerned with the setup work, you might want to choose p5js because you can literally run it on every computer today that has a web browser because it uses JavaScript (yes JS is everywhere now :wink: ). Specially with the web editor, you can start coding in seconds :

https://editor.p5js.org/

If you want to explore other frameworks, you can take a look at that nice github repo :

2 Likes

Just for fun, I’d really suggest giving Hydra a run out…

https://hydra.ojack.xyz/ … you can even get it to play with p5js.

And then, once you try TouchDesigner,
https://derivative.ca/

… you might also enjoy these visual tools…

https://puredata.info/
http://idflood.github.io/ThreeNodes.js/index_optimized.html#example/geometry_and_material1.json

https://shaderfrog.com/app/

Have fun…

3 Likes

wow that’s great. I know there is a good learning material on hydra… Hydra Book (yes I wrote it :stuck_out_tongue:)

I tried nodes.io a bit and found very confusing. It’s a nice framework but offers very little so you need to create your own framework on top of it to do something. Also it’s electron based and doesn’t support web if I understand correctly. Cables is perhaps more beginner friendly:

And if anyone’s trying pure data, I recommend purr data as the interface is much nicer:

https://www.purrdata.net/

2 Likes

Hi :slight_smile:

After trying a few dozen languages I think programming languages often produce programs that are only as fast as the knowledge of the programmer allows, instead of the theoretical maximum speed achieved when writing an optimal program by someone very experienced.

Different questions: how long will it take me to learn to write faster programs in language X? How long will it take me to master that language? How does the future of that language look like? Is writing programs in that language an enjoyable experience? How is the community? What are my goals when learning new tools?

2 Likes

That’s a very good point. Well-optimised C code might outperform Java in places, but “average” Java can outperform C because there is more potential for the JIT compiler to prove logic and optimise performance. Then you have things like GraalVM, which allows polyglot (multi-language) programming on the JVM, including running C at close to native speeds. In fact, languages are possibly less interesting then ecosystems these days, except in terms of how they perform in the mind of the coder.

Thanks for including PraxisLIVE! :smile: In some ways it’s similar to nodes.io but for the JVM. It’s a code-first nodes environment - nodes are a way of organising code (why do we use the file system for that?!). And on the visualisation side, nodes are effectively individual Processing sketches.

2 Likes