Hi again,
I've started on my launcher, however I have become a bit concerned over how the code will actually work for a couple of reasons!
so, here is a section of code for the launcher:
private void startGame(){
try {
Display.setDisplayMode(new DisplayMode(800,600));
Display.create();
} catch (LWJGLException e) {
e.printStackTrace();
System.exit(0);
}
window.dispose();
window = null;
c = new Client();
}
/* (non-Javadoc)
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if(e.getSource() == loginButton){
//Login stuff Here
//Then if okay, start game!
startGame();
}
}
and the client:
public Client(){
// init OpenGL here
while (!Display.isCloseRequested()) {
// render OpenGL here
Display.update();
}
Display.destroy();
}
Now, I'm a bit lazy when it comes to taking on big tasks with little guidance (

), so this is really how far I've gotten with the playable side of things.
So, when I ran this the first time (without the lines
window.dispose(); window = null;
I noticed that the button which is pressed stays pressed (i.e. looks like it has frozen) so I'm concerned first of all about the threads which are being used!
Secondly, my code to destroy the JFrame after "Login" seems to be a bit off (my faut really, but is this the best way to do it?)
Finally, how do I pass the lwjgl Display from the launcher to the Client? I know it is working at the moment, but would it be better to run the display in a thread inside the client or in the client constructor?