problem about slick2d-Collection of common programming errors


  • user2908845
    java rotation collision slick2d
    I have started to develop a basic game in java. The view is top down, the player is represented by a green circle, and the enemies by red circles. The player has a sword. If an enemy touches the player, it gets hurt. If the sword touches an enemy, it is killed.The basic collision detection of the player<->enemies and enemies<->sword work (i use bounding ellipses). But i cannot rotate the ellipse representing the sword around the player. It stays at one place. I have tried with Transform.cr

  • DilanHanrahan
    java lwjgl slick2d
    I’m using slick2d and in my Java application. In my render method I use a method called changeBackground();@Override public void render(GameContainer gc, StateBasedGame sbg, Graphics g)throws SlickException { changeBackground(g); }changeBackground();public void changeBackground(Graphics g) throws SlickException{Thread.sleep(500);g.setBackground(new org.newdawn.slick.Color(0, 255, 0);Thread.Sleep(500);g.setBackground(new org.newdawn.slick.Color(255, 0, 0);changeBackground(g); }When I run my appli

  • genpfault
    java opengl lwjgl slick2d
    I already have a variable calledImage spriteImage;later on in the code I state what it isImage spriteImage = new Image(“content/man.png”);this code crashes my Slick2D application. What is the difference betweenImage spriteImage = new Image(“content/man.png”);andspriteImage = new Image(“content/man.png”);(Which actually works)

  • Matthew
    java slick2d
    When I debug the game in eclipse the game works fine. However, when I make runnable jar out of it the game crashes when enemy gets hit, the rest of the game works fine except that part. What do I do, how do I debug runnable jar?

  • NcAdams
    java animation slick2d
    I’m working on a game with some basic graphics that utilizes Slick2D. In order to display an animation I have to display an image that’s both rotated and scaled, so I quickly discovered that none of the methods in the Animation class would work for me.The solution I came up with was to draw the image at Animation.getFrame() (the animation’s current image). To update the image I call the following lines of code:System.out.println(“Updating animation data…”); a.setAutoUpdate(false);a.update(delt

  • David
    java opengl slick2d
    Whenever I use the method getGraphics() from org.newdawn.slick.Image in fullscreen mode, it causes a crash. It works perfectly fine in windowed mode, and I’ve tried doing stuff like Graphics g = new Image(100,100).getGraphics(), this also causes the crash.I am using Slick2DThis is the output I get: Tue May 07 14:58:08 CEST 2013 INFO:Slick Build #264 Tue May 07 14:58:09 CEST 2013 INFO:LWJGL Version: 2.9.0 Tue May 07 14:58:09 CEST 2013 INFO:OriginalDisplayMode: 1366 x 768 x 32 @59Hz Tue May 07 14:

  • user1897479
    java slick2d
    I have problem with implementation game on website. I have tried to do like in this site : http://ninjacave.com/slickappletI’m receiving this error:ERROR:MainPackage.TGame java.lang.InstantiationException: MainPackage.TGame at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.newdawn.slick.AppletGameContainer.init(AppletGameContainer.java:124) at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:766) at org.lwjgl.util.applet.Apple

  • mr_yogurt
    java lwjgl slick2d slick
    I have recently been programming a platforming game in java, and I have run into a problem when I tried to use a separate class to store my map (tiled). I then tried to fix it by moving the map into the main class, and it didn’t help.This is the code that is causing the problem (When the world.map1.render(0,0) is removed, no problem exists) – I know that I should be using getters and setters. I’m just find them a pain.public void render(GameContainer arg0, Graphics arg1) throws SlickException {

  • Twister1002
    java applet slick2d
    I have been trying to get a slick application to work on a website for awhile now, and I have the HTML code correct, I know that for sure, however I am getting an error from the applet saying this:Initializing real applet Mon May 20 17:07:24 EDT 2013 ERROR:Game.GameBoard java.lang.ClassNotFoundException: Game.GameBoard at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClas

Web site is in building

I discovery a place to host code、demo、 blog and websites.
Site access is fast but not money