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
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…
Plumetone
  • 101
  • 1
  • 9
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
1 answer

How to install Slick2d?

Hi I'm trying to create a game using the LWJGL library and the Slick2D game library however when I attempt to run it I get an error. Here is my code: package test; import org.newdawn.slick.AppGameContainer; import…
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
  • 688
  • 7
  • 15
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,…
John Farkerson
  • 2,543
  • 2
  • 23
  • 33
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
  • 7
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
  • 579
  • 4
  • 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()…
user2223779
  • 47
  • 1
  • 3
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,258
  • 1
  • 12
  • 27
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
  • 625
  • 3
  • 7
  • 23
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
  • 25,305
  • 8
  • 78
  • 114
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
  • 119
  • 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
1 2
3
48 49