Questions tagged [slick2d]

Slick2D is a wrapper around the LWJGL OpenGL library for Java.

Slick2D is a simple, Java-based 2D game development library. You can read more about it on the Slick2D homepage.

The goal of Slick2D is to provide Java game developers with a library that handles gaming sub-systems, so the developer can focus on building their games. Library features include:

  • Hardware-accelerated graphics via a OpenGL
  • Complex audio rendering via OpenAL
  • Input handling for keyboards, mice, and gamepads/controllers
  • Several 2D game primitives, such as sprites, images, 2D tile maps
  • Geometry helper classes that facilitates collision detection
  • Path finding helper classes for path planning and route calculations

Slick2D is multi-platform, with desktop support for Windows, Mac OS X, and Linux. At the time of this writing, an Android Edition (SlickAE for Android development) has been discussed, but not released.

Note: The other slick tag is related to a Scala data access library, which is unrelated to this tag.

726 questions
-1
votes
1 answer

Character collision with walls

My problem is that when ever my character moves into the side of the map it slowly moves more into the wall(even but when the character dies this stops. Can you tell me what to change about my code so this wont happen? package Slick.jar; import…
DrDrep
  • 11
  • 3
-1
votes
1 answer

How can I fix this slick2D hello world program to work with windows 8.1?

I think windows 8.1 is the problem anyway. I'm using the tutorial on Slick2D's website to create a hello, world program to ensure that my installation of slick went well. This is the relevant code: //init stuff AppGameContainer…
grey00
  • 469
  • 2
  • 13
-1
votes
1 answer

Slick Texture loader and glBlendFunc interfering

I have an issue regarding LWJGL and Slick If I import a texture using Slick while having alpha blending enabled, the display will stop rendering! Here is the code. Upon start it will simply render a purple square. Once the button T is pressed it…
-1
votes
1 answer

getting sprite coordinates of mouse position java slick2D tiled map

How to get sprite coords of mouse position? Game engine Slick2d. Tiled map 16x16. Camera public class Camera { public int x, y; Object object; public Camera(int x, int y) { this.x = x; this.y = y; } public void tick() { if(object !=…
-1
votes
1 answer

How to getTileProperty while using multi-layer map?

I'm new to Slick2D, and I'm using Tiled to make .tmx map. for (int xAxis = 0; xAxis < map.getWidth(); xAxis++) { for (int yAxis = 0; yAxis < map.getHeight(); yAxis++) { int tileID = map.getTileId(xAxis, yAxis, 0); String value =…
Fuuka Adachi
  • 23
  • 1
  • 7
-1
votes
1 answer

using the jlwgl and slick libraries

I got the following Error as I compiled my program using the jlwgl and the slick library: Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path There are really many posts on that ! But I really didn't get the…
BoJack Horseman
  • 4,406
  • 13
  • 38
  • 70
-1
votes
2 answers

Slick PNGDecoder Error - java.lang.UnsupportedOperationException: Unsupported format for this image

I'm making a simple little Galaga clone in Java with the Slick library. Unfortunately, I've run into an issue in which I get this error, followed by the game closing: Mon May 12 08:54:32 EDT 2014 WARN:class org.newdawn.slick.opengl.PNGImageData…
othinolis
  • 1
  • 1
  • 4
-1
votes
1 answer

Slick2d/LWJGL - Making a simple pong game issues

This is my class: public class Play extends BasicGameState{ public int state; private Input in; private int rh = 100, rw = 10;//racket - Width , Height private boolean left;//trye if the ball is going left Ball b;//the…
user3535778
  • 135
  • 2
  • 15
-1
votes
1 answer

java RuntimeException in slick2D game project

I have created a new thread in a project having this code : battleStart = new Thread(new Runnable(){ @Override public void run() { while(compteur<50){ BattleStart.draw(0,0); try { …
user3578325
  • 239
  • 2
  • 6
  • 12
-1
votes
1 answer

Enter State error, Slick2d

I am creating a flappy bird esque minigame. For some reason there is an error when I try to enter my actual "playing" state from the "menu" state and the "level" state holds it all together, a new error is thrown as it was working before. Any help…
-1
votes
1 answer

slick2d image java.lang.NullPointerException

this is my first time posting on here. I've been looking around for a solution but no luck so far. I'm pretty new to coding so I apologise in advance for horrible programming faux pas, anyway I'm using java and slick2d and I am coding a game. The…
-1
votes
1 answer

Can't figure out how to make a character jump in Slick2d+LWJL

I have been thinking about this and I cannot think of anyway I can make a character jump in my game. It s a platformer, state based game in slick2d+LWJGL. Here is my code package net.battle.main; import java.io.Console; import…
user2580555
  • 329
  • 2
  • 4
  • 13
-1
votes
1 answer

Destroy image object present in grid when an object enters the grid

I am learning game programming. I am trying to make a game similar to Pacman. I have made a grid with x[] and y[] (no using tiled). when sprite is in a specific grid I want to destroy its food item which is an image within the grid and add 1 to…
Arslan
  • 1
  • 1
-1
votes
3 answers

Java - How to properly use Extends/Implements

Okay so I am kind of confused about the uses of "extends" and "implements". Let me give a scenario, let's say I am making a simple tower defense game. So it was my understanding that if I made a class (TowerBase.java), I can fill it with variables…
willbattel
  • 1,040
  • 1
  • 10
  • 37
-1
votes
1 answer

How to trigger a function every time a key is pressed with slick2D?

I am trying to make a graphical text box for my game. I need to trigger a function called addChar(char c) with c being the key pressed in character form.