The OPENRNDR Guide has a post titled Setup Your First Program
But what about your second program? When I started experimenting with OPENRNDR I remember thinking that I should repeat this process every time: clone the template, wait for indexing, etc. Not ideal if you want to create lots of experiments.
BUT
It’s not necessary!
You can stick to one template!
Instead of editing src/main/kotlin/TemplateProgram.kt
directly, every time I want a new program I right click on that file to copy & paste (= duplicate) giving it a new name.
If a program grows to be 2 or 3 files I create a package for it and move those files into that package. That way I can iterate fast and jump between experiments within one IDE project.
Maybe a bit messy but hey, it’s my playground
One drawback may be that all files need to be in a compilable state. That means that you can’t leave a file mid sentence and continue with another file. That mid sentence needs to be commented out. In some cases I comment out the whole file if it’s not the right time to work on it.
What are your approaches and tricks to experimenting and iterating?
ps. One nice feature of the Screenshot()
extension is that it saves the image with the name of the file that produced it. Same when exporting video files. That means that even if I only have one screenshots folder, the files are automatically named after the kotlin program that produced it. Super convenient!