In my opinion your code would really be improved by using object- oriented program. You can create separate classes to store that long list of variables in the beginning of your program. For example you can create a ‘Ball’ , ‘Racket’ and ‘Airplane’ class. Check out processing’s tutorial on OOP
3 Likes