i’m porting my J2ME 2D game engine to J2SE and i was wondering which classes should i use to archive the best performance. I’m currently using SingleFameApplication for creating a window, a FrameView for the main game loop and a JPanel for a surface to render on. But this probably wont do..
The problem is when i start the engine in opens a window but when i start executing (rendering + physics + collision detection) it hangs. Can someone explain which classes to use? Should i put the game loop in a new thread (or does frameview have its own thread)? Should i use JFrame instead of SingleFrameApplication?
I dont think choosing the right Frame has much to do with this.
Could you provide more info of the crash / hang? Until then I guess we would be shooting in the dark.
Yes, always a good idea to have the loop in a Thread (with all the critical processing) and only paint when needed. (much like the progress bar analogy)
regards