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
3
votes
1 answer

How to install Slick2d in Netbeans

I have been searching for quite a bit now but I have never been able to figure out how to install Slick2d into netbeans 7 on windows. Every search I have done has given me bad results and errors in my projects. Thank you in advance.
me me
  • 778
  • 2
  • 7
  • 18
3
votes
2 answers

Error with Slick2d

I am trying to get Slick2d up and running in eclipse by following this tutorial. When I try and compile a test application I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: org/newdawn/slick/BasicGame at…
2
votes
1 answer

Android SlickAE (libgdx) No class def found error

This is the directory structure of my main project, which I'm calling from my Android project. src └── legless ├── entities │   ├── Bullet.java │   ├── Creep.java │   └── Hero.java ├── Game.java …
yasith
  • 8,981
  • 7
  • 27
  • 32
2
votes
2 answers

Slick2D - How to use Fonts

I am coding a game in fonts and I encountered a problem. I have no idea how to use fonts even though I tried everything. Can you also please explain what is a glyph? And where to get .fnt files if that is needed?
user1217946
2
votes
2 answers

Slick game engine not working with JFrame

I want to integrate slick in JFrame. But I am facing following problem: 1. When I try to close frame, it stop slick game but not frame. Please find my code as below: CanvasGameContainer canvasGameContainer1 = new CanvasGameContainer(new…
2
votes
1 answer

Slick2D Movement Issue

So, I converted a game to Slick2D. The movement is broke, and I am at a loss. Before, we used KeyPressed and keyReleased methods, but now with Slick2D movement isn't working right. Yea, nothing has gone right with converting to Slick2D. First the…
ajwgeek
  • 21
  • 5
2
votes
1 answer

drawing Strings in the (java game using LWJGL and slick2D) is not working properly

I am building a game in Java using some openGL libraries. I have almost finished the application but i have some really ridiculous problem. All I need to to is to change the default color of the text to some other color, in my case its black.…
Milos
  • 394
  • 2
  • 19
2
votes
0 answers

Mouse coordinate issues in Slick2D

For development purposes of my game, I want to display the coordinates of the mouse in my window. I am having a couple of issues with this. First, the axis appears to start in the bottom left. I would like it to start in the upper left because…
ShoeLace1291
  • 4,551
  • 12
  • 45
  • 81
2
votes
1 answer

ERROR:For input string: "" when I add object layer to my tilemap

I am currently trying to render a tilemap I made with Tiled using Slick2D, and everything works fine until I include an object layer in my tilemap. I have searched the internet far and wide for an answer to my dilemma, and it seems that most other…
Clausiel
  • 53
  • 5
2
votes
1 answer

Java Slick2D Line Constructor throws NullPointerException

In Java Slick2D, I am attempting to make a line using a constructor that takes two float arrays, as detailed here: http://slick.ninjacave.com/javadoc/org/newdawn/slick/geom/Line.html My code is the following: float[] floatArray1 = { 10.0f, 155.0f…
Alex W
  • 321
  • 4
  • 12
2
votes
2 answers

NetBeans Slick2D setup problems

I just followed the Slick2D setup tutorial located Here, and then copied the "Hello World" project from the same wiki. I changed all of the class references and library references so they were named correctly, and tried to run it. Got this…
Tiggerbiggo
  • 31
  • 1
  • 4
2
votes
2 answers

LWJGL hangs when loading PNG image using Slick2D TextureLoader

On Mac OS X El Capitan, OpenGL version 4.1, my LWJGL 3.0 app hangs when calling the Slick2D function TextureLoader.getTexture() Here's the code I'm attempting to use to load the texture. It is run on the same thread as the main loop, and is called…
Jojodmo
  • 23,357
  • 13
  • 65
  • 107
2
votes
1 answer

OpenGL won't render with top left coordinates

I got my projection matrix setup with glOrtho() like this: glOrtho(-Application.HALF_WIDTH, Application.HALF_WIDTH, -Application.HALF_HEIGHT, Application.HALF_HEIGHT, 1, -1); So, when I draw something at origin (0; 0), opengl draws it at the center…
ibe
  • 185
  • 1
  • 11
2
votes
1 answer

How to make the cursor encaged in an area of my window

what I would like to achieve is having the cursor of my game stay in the the "gameplay" area of my window, so the user cannot move the cursor out of those bounds. I DO NOT want the cursor to stay in ONE position, I still want the user to be able to…
Plumetone
  • 101
  • 1
  • 9
2
votes
1 answer

Why does a Slick2d Point not intersect a Rectangle?

When I execute this block of Code: Point p = new Point(1,1); Rectangle r = new Rectangle(0 ,0 , 10 ,10); if(p.intersects(r)){ System.out.println("Collided"); } It never prints Collided. Why is this? Both Objects are…
Oliver-R
  • 163
  • 1
  • 9