Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm rewriting my game now using software designing patterns and want to do the code, most correct I can. While implementing MVC(Model View Controller) I got a question which I would like to discuss or to hear some opinions of experts. The question is about management of unused frames... For example next sequence of windows: ResourceLoadingWindow -> LoginWindow -> GameWindow Definetly that I don't want to reuse ResourceLoadingWindow , since I'm using Java Applet and I don't see any situation when I will need to reuse it. The different story is about LoginWindow, which can be reused a lot of times, because some player would want to Logout and come back again in few minutes for example. I would like to know, following the MVC structure, should I destroy window, removing it from ContentPane or just hide? Maybe I need to unregister it from controller or I shouldn't do so?

Thanks in adavance.

share|improve this question
add comment

1 Answer

I'd say hide it. Then it's loaded and you can just call it whenever. If you're changing accounts then why load another copy, right? It's pretty lightweight though, I bet, so use whichever is easiest for now.

share|improve this answer
    
Well I was discussing MVC implementation on Stackoverflow and it seems (in my case) it more reasonable to create and destroy unused frames always. But anyways thanks for advice. –  Serhiy Apr 11 '11 at 22:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.