Hi everyone, I have a question that probably was made a lot of times but I need an updated answer.
How do I make a library?
I want to make a tilemap library for Processing but I don’t know how to proceed. I found a lot of info about this but mostly is for previous versions of Processing, should I use Eclipse? Thanks in advance.
1 Like
Take a look at this video from Daniel Shiffman, it should help you out. ;D
1 Like
Thanks, I’ll check it out
Shameless self-promotion: this tutorial talks about using Processing in Java, and includes a section on building Processing libraries.
1 Like
In a nutshell (for APDE)
- convert your code from pde to java package. With Apde, look at build/src/processing/test to find the generatedv java source code for your pde
- when you can compile/test in your sketch::
- find an existing and working simple library. (In lSketchbook/ibraries
-make a copy, lets call it mylib - rename/edit/delete/create things like revisiions.txt as per Processing rules
- in the mylib/libraries/mylib.jar (which is just a zip), remove everything
- now copy the class files as found in build/bin/classes/mylib after a sketch compile into the jar
- almost there, we have a valid jar!
- re-dex to create Sketcjbook/libraries/mylib/library-dex/mylib-dex.jar
and it works in APDE!
Test…
Now update docs, examples, src, etc pp.
Preparing a tutorial for APDE, this might be the start…
1 Like
1 Like
Check the Processing wiki under Library Guidelines: https://github.com/processing/processing/wiki
Kf
1 Like
You might also want to look at existing tilemap libraries and how they are set up. For example, ptmx:
1 Like