Hello everybody,
I have been designing modules for myself for quite some time now so I think I have become familiar with the Editor. It allowed me to make more and more complex pieces and here my problem starts…
I have just made one GamePiece with a quite complex behavior using ActionButtons, TriggerActions… All in all, my Piece uses 450+ Traits in its definition. Everything works as intended but the Editor started having real performance issues like double the time needed to open it, clicking on any entry in the Module tree (like any MapWindow or any Prototype definition…) takes about 4-5s for it to become highlighted in blue (ie: selected) and after, say, 45min to 1h of the Editor being open I get a pop-up message stating that memory has run short ; requiring me to close and reopen VASSAL. (Weirdly though, that same GamePiece in actual game does not lag that much (not the fastest but definetely playable).
I am not very surprised that such a “heavy” GamePiece creates performance problems but now is the time for me to find a way around. I note that you can add a Java class at the Module level in the Editor. I know nothing about Classes or Java programming in general but I may want to dive into it if I know Classes will solve my issue.
Please correct me :
As I understand, Java classes are compiled pieces of code in which I could basically write anything I want to have in my Module, sparing me any performance issue thanks to the compiled nature of the Class.
In my case, is it possible to write a Java Class that would replace my GamePiece (the Class will hold the definition). I don’t need custom code, everything I use already exists in the Editor (triggers etc…) ; what I need is just to write it in a Class, compile it and then getting both what I already have thanks to the Editor AND solving the performance issue.
Thank you very much !
Greetings,
Math