Benefits of using an Array?
in
Programming Questions
•
2 years ago
Hi all,
I currently have about 50 images that load in setup(). They're all name differently, and I reference them all at different times in separate parts of the sketch. At no point do I ever need to increment through these images. My question is - are there any benefits to putting these images in an array? I realise I could name them incrementally and load them all in with a loop, but honestly, i think having the variable name
image(car,x,y); is more use to me than using
image(illustrations[02],x,y);
and being able to load the whole lot in a oner...
Are there any other benefits to using an array in this situation other than the ability to address them with loops?
Thanks
Dave
1