[RESOLVED] Use of LegacyApplication

I am in the process of updating my app to 3.1 (yes I know I’m a bit behind the times!). Reading through the changes to SimpleApplication/LegacyApplication/Application I’m a bit confused on what is now considered best practice. I understand SimpleApplication is really designed to simplify things rather than provide control. But what about LegacyApplication? The name seems to imply that it’s deprecated (otherwise why call it legacy) but implementing Application instead would require a lot of boilerplate code to be added that already exists. What’s considered best practice now?

Apologies if I missed something in the doc about this.

1 Like

Maybe this will help?

1 Like

One reason for this change is because eventually SimpleApplication will get replaced by something with a better name precisely so that folks quit thinking “I shouldn’t use that because my app isn’t simple.”

Do not extend LegacyApplication. Extend SimpleApplication.

When in doubt, see above.

Only masochists extend LegacyApplication… and then only when they have time to pull the screws out of their thighs and spit the chunks of glass out of their mouths. :wink:

2 Likes

Ok that’s perfect - thanks. I saw quite a few samples that extend LegacyApplication which had confused me. Also when I reread the final paras of https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_simpleapplication.html I realised I’d misread “So SimpleApplication is handy for test projects” to mean “don’t use SimpleApplication other than test project” when really it should be read “So the default SimpleApplication constructor is handy for test projects”.

Conclusion is that I’ll continue to extend SimpleApplication.

1 Like