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

use slick2d mouselistener to use this?

i have a image that's the pause menu. it has an exit button. when the exit button is pressed, a dialog appears. this is what i want. so, i have an image, and i set the x and y position of where the mouse should be clicked so then the dialog will…
Maquaree
  • 43
  • 6
3
votes
1 answer

Slick2d | Entity collision detection

The problem: I know this has been asked for many times, but I didnt find any good answers. So I have got some entities for my game, now what is the best way for checking collisions? Links: The game (finished) Code explanation: I've got a list of…
HUNeater
  • 166
  • 3
  • 16
3
votes
1 answer

Creating a Rectilinear Polygon from geometrically combined Rectangles

I've searched everywhere and I just can't seem to figure it out. I find a lot of articles on the decomposition of rectilinear/orthogonal polygons, but nothing on how to construct one. I'm working with Slick2D, and I have a tile map. I want to…
Samich
  • 569
  • 3
  • 13
3
votes
2 answers

What does theta do?

So I've found this class called Vecter2f in Slick2D and inside of it there is a method called getTheta. I don't know what this does but I got the source to the method if that will help. And what use is this method? public strictfp double getTheta()…
3
votes
3 answers

How To Encrypt Resource Files?

Hi I have a game made in Java and Slick2d and I have a folder that contains all of my resources (images, sounds, etc) and I was wondering how to encrypt them so people can't edit them? I tried MD5 but I'm not really sure how it works and I'm not…
3
votes
1 answer

Created Object sticks to the screen and does not move with the map

The problem is about creating objects on the map. Everything would be fine, but suddenly I can only create the objects (which are images), on the screen. Whenever I give some cordination to an object it takes the (0,0) point of the screen, not the…
Dariss
  • 1,198
  • 1
  • 10
  • 26
3
votes
1 answer

Slick Animation - There must be one duration per frame

I am trying to make a game in Slick, and before I start I want to test the helicopter animation I will be using. It just opens and then immediately closes with these errors: Exception in thread "main" java.lang.RuntimeException: There must be one…
Lijap
  • 605
  • 3
  • 7
  • 22
3
votes
1 answer

What is the fastest way to find overlaps in an array of rectangles?

I'm working on a "game" in my spare time, almost purely as a learning experience, and am at the point where collision detection between the player entity and enemy entities needs to occur. Both the player and all enemies share a base class, Entity,…
Mike Trpcic
  • 23,821
  • 7
  • 71
  • 111
3
votes
1 answer

How to package resources, that are accessed directly , into a jar file

I have recently developed a game in Slick2D, i have accessed all my images directly e.g Image i = new Image("address.png"); as opposed to using a class that will load resources or using an input stream. I wondered if it would still be possible to…
Josh Jackson
  • 109
  • 1
  • 2
  • 9
3
votes
3 answers

How can I display text with Slick?

I have been trying to display text with ninjacave's tutorials and lot's of others but I can't get it to work. Could someone give me a link to a tutorial that works? Thanks. The code is below: Main Class: package oregon.client; import…
Taylor Golden
  • 41
  • 1
  • 2
  • 10
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
  • 760
  • 2
  • 7
  • 16
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
  • 7,839
  • 6
  • 24
  • 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…
1 2
3
46 47