EDIT: I’ve decided to switch my project to Eclipse, and completely rewrite it, as it grown badly into a mess of no classes, hundreds lines of code long singular functions, huge load of global variables, and overall spaghetti code I’d like to completely remake.
Original post:
Out of boredom, I’m working on what I want to be a full-on nice 2D platformer game engine thing. The problem is that I’ve got so much code I have to scroll a lot.
At first, I avoided this problem by splitting the code into multiple tabs. However, now I have too many tabs, and it still takes long to scroll in every one of them!
I’m thinking of splitting my project up in some nice way, like exporting stuff to a separate library one way or another, but this would mean moving that code out of reach of my fingertips - what if I would suddenly want to tweak some of it?
Should I move on and turn it into an Eclipse project that uses Processing libraries?
I’m kind of scared of that it would be different workflow, as, as far as I know, Processing combines all of these tabs into one long .java
file that stores all of the code in a single class, which scares me with thoughts that I would have to rewrite references to functions that I’d move into different files, or something else.
Also, I like using functions that do “magic”, i.e. operate on global values of the whole sketch that are not related to these functions themselves, i.e. changing them. How would I move these functions to a different class while keeping all of their operations on these global variables valid?
By “global variables” I mean the ones you define in Processing code, not in any function, i.e. these:
(yes, I know that this isn’t a good way to do it as these declarations are barely sorted and are all over the place… But eh.)
In other words, I’m scared of having to rework most of my code to turn it into a fine Eclipse project.
What tips do you have that would allow me to turn my code into an Eclipse project with least amount of effort and workflow change?
Or, is there some cool addon or something that would turn the tab interface into a Sketchbook-like list or maybe even a tree so that the project would be easier to work with?