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.

694 questions
4
votes
2 answers

My LWJGL and Slick2d application won't run from runnable jar file

I am using LWJGL and Slick2d. I have made a project and it runs fine from within eclipse but when I export it as an executable jar file it does nothing. I tried running it from the command prompt and it gives me this error: Exception in thread…
4
votes
3 answers

How to debug a runnable jar, when crash doesn't happen in debugger?

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?
Matthew
  • 199
  • 1
  • 6
4
votes
2 answers

Proper Collision

So basically im trying to figure out how to make a proper collision between two Rectangles. Detecting isn't the problem, but the rectangles begin to clip. I wanted to reset the position, but how do I do that. I'm trying to use dx and dy to reset,…
B.Friedrichs
  • 148
  • 7
4
votes
1 answer

Leiningen and Clojure dependencies

I'm fairly new to clojure but I've been having trouble finding good resources and examples online, so hopefully someone could point me in the right direction. I've started a project with lein, project.clj looks like this: (defproject scratch "1.0" …
Mediocre Gopher
  • 2,194
  • 1
  • 20
  • 37
4
votes
2 answers

Maven assembly plugin redownloading dependencies in jenkins

For some reason, maven seems to be attempting to download my project's dependencies every time I try to build it with Jenkins. There are a few problems. The first one is it shouldn't be doing this at all, and the other problem is it's not even…
Talon876
  • 1,442
  • 11
  • 17
3
votes
1 answer

A* Pathfinding - Java, Slick2D Library

So I use Slick2D and I am making a game. It has a TiledMap and entities (as any other game) and I want a way to use A*. I don't really know how to use it because I can't find an explanation. Just for those who don't use Slick, it already has…
user1217946
3
votes
1 answer

SLICK2D game state not registered

I have a slick2d JavaGame called I hate Christmas. The game will not let me transition to the next state. It says No game state registered with id of 1. When I run the same exact code in Game.java, It works fine. Here is my code Game.java package…
user3769211
3
votes
1 answer

SLICK && LWJGL Flickering Issue

I have an flickering problem with rendering tiles. Rendering Method. int tileSize = TileManager.tileSize; for(int y = 0 ; y < mapHeight ; y++){ for(int x = 0 ; x < mapWidth ; x++){ …
3
votes
2 answers

Collision Detection with Java, Slick2D and Tiled Map Editor

I've been stuck on collision detection and how to handle it for a VERY long time. I need help understanding how to use collision detection with Tiled map editor. I have the TMX file parsed and displayed with a player, camera and keyboard movement.…
Phippre
  • 55
  • 1
  • 6
3
votes
3 answers

Read/write txt file for saves

I have now written high scores to a text file at gameover, and read them at game load. The problem I have now is that the txt file highscores.txt isn't found anywhere because I haven't created it. Is it possible to have the file created whenever it…
Mamshmo
  • 71
  • 8
3
votes
1 answer

Trouble with slick.util and lwjgl textures

So I've recently started making a simple 2-D java game using jlwgl and slick-util. I ran into a problem when trying to load in textures to place on my tiles. I am using slick util to try and load textures in. This is the method I am using to do so. …
3
votes
0 answers

Could not locate OpenAL library

I am currently writing a game using the Slick2D library, which uses LWJGL. My LWJGL version is 2.9.3. I am using Netbeans 8. I tried adding sounds to my game, for example a music track on the main menu. Problem is, I get this exception when I run my…
Fire Yoshi
  • 41
  • 4
3
votes
1 answer

Java Slick2D Image equals method

I need to quickly tell if one Slick2D image has the same pixel data as another Slick2D image. The .equals() method does not accomplish this. Is there a way to do this?
Harrison
  • 668
  • 6
  • 13
3
votes
1 answer

Drawing an arc backwards?

I am porting some of the Slick Graphics class to work with AWT, but I've run into a problem. Slick, being run on OpenGL, draws arcs clockwise. AWT defines them as being drawn counter-clockwise, like in math. I'm wondering how I can draw Slick's arc…
Octavia Togami
  • 3,638
  • 4
  • 29
  • 42
3
votes
1 answer

Draw Image Not working Slick2d

The weirdest thing is happening, and I can't figure it out. I am making a StateBasedGame, and in one of the BasicGameStates, I'm trying to draw an image. It shows up white, though. Code: @Override public void render(GameContainer arg0,…
Samuel Noyes
  • 2,373
  • 1
  • 19
  • 32
1
2
3
46 47