game window not showing up

+2 Shashank P · February 2, 2015
i have followed all the tutorials till the eight video of the Java Game Development with Slick .Though i do not have any  errors ,the game window does not open . please help

Post a Reply

Replies

Oldest  Newest  Rating
0 Jay Deshaun · February 2, 2015
Can you please post your code.
0 Shashank P · February 2, 2015

package javagame;
import org.newdawn.slick.*;
import org.newdawn.slick.state.*;

public class Game extends StateBasedGame{
    
public static final String gamename = "Rift";
public static final int menu = 0;
public static final int play = 1;

public Game(String name){
super(name);
this.addState(new Menu(menu));
this.addState(new Play(play));
}
public void initStatesList(GameContainer gc)throws SlickException{
this.getState(menu).init(gc,this);
this.getState(play).init(gc,this);
this.enterState(menu);

}
public static void main(String[] args) {

AppGameContainer appgc;
try{
appgc = new AppGameContainer(new Game(gamename));
appgc.setDisplayMode(640, 370, false);
appgc.start();
}catch(SlickException e){
e.printStackTrace();

}

}

}
+1 Jay Deshaun · February 2, 2015
I can't seem to find the problem...
I think I would need to install the slick program and watch the tutorials up to your part to see what's the problem.
0 Shashank P · February 3, 2015
Found the fix .Lwjgl 3.0 is not compatible . Had to download Lwjgl 2.9.3 .Thanks anyway Jay.
0 Tom Huffman · February 7, 2015
I think I had the same compatability issue, will try the LWJGL 2.9.3
Thanks for the post
0 Tom Huffman · February 7, 2015
I downloaded lwjgl 2.9.3 and my window is opening. Thanks for Tip!
  • 1

Java / Android Development

107,215 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator