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

Move tile by tile with dynamic speed

I'm using java with slick2d library and trying to move tile by tile with dynamic speed. I have tried a couple methods but none of them can move with dynamic speed between the tiles. Can someone help me with that and give some examples? edit: this…
-1
votes
1 answer

Slick 2D: Render Null Pointer Exception

So my problem is when a state that I've created gets called, I get a NullPointerException. Thing is, it's not null, at least I think so. Could someone tell me where the NPE is coming from? PS: This is sloppy code, because I haven't cleaned it…
infamoustrey
  • 730
  • 8
  • 16
-1
votes
1 answer

Add a pictures to a card value?

I'm currently making a card game(made a custom one instead of lame poker), and basically I want to add pictures based on the value of the card. It's separated into a/b(a being the suit, b being the value). Chunk of code I'm assuming will change to…
Hayden Holligan
  • 1,822
  • 2
  • 19
  • 26
-1
votes
1 answer

Moving a ball is very jaggedy for some reason?

'Im making a simple game, and for part of it I want there to be enemy's which will attack you. To do this first I need to make them move In this code the "Enemy" Is just a ball. I'm using an object called "mob1" as the balls location, so that later…
-1
votes
1 answer

destroy an entity after a time limit in marty engine +slick

Is there a way to destroy an entity after a predefined time limit exceeds.? I want to destroy a ship when it's lifetime(measured in seconds) exceeds. thanks.
Sudheera
  • 1,727
  • 1
  • 12
  • 28
-1
votes
1 answer

When drawing ImageArray on screen with For-loop, keep drawing on screen / When making it .jar, it wont execute

I made this 2D game in Java, with Slick. The problem seems to be in this code: public void initRedAndBlueBall() throws SlickException { // Makes sure the red and the blue ball aren't too close for(int i = 0; i <=…
-1
votes
2 answers

How do I check an array against itself in java

I am trying to create a basic falling sand game in java, I have each particle store it's X and Y in a Point array. Each Point array is specific to it's element, so sand and water are two different arrays, what i would like to know is how do i check…
user1610541
  • 111
  • 1
  • 11
-1
votes
1 answer

why does my animation blur when I move the character in slick2D Java?

ok So ^^ is a picture of two sprites side by side. The left sprite is the character after it has completed an animation.. The right sprite is the character as a static image.. As you can see, for some reason the left after animation sprite is…
Savlon
  • 744
  • 2
  • 11
  • 18
-1
votes
1 answer

Java - Slick2d: Very low framerate

This problem is not mine, so I will need some time to provide details. XY sets up the Java environment for Slick2d programming based on a tutorial video series. XY uses same code as the tutor, but tutor gets 800 FPS and XY gets 5. The application is…
Aaron
  • 65
  • 1
  • 7
-2
votes
2 answers

Updating Items in Arraylist throws ConcurrentModificationException

I am making a game in java with lwjgl and slick. And I have a World that contains a arraylist with all items laying on the ground that it has to update. But when it updates the items a second time it throws a ConcurrentModificationException. How can…
Jakibah
  • 53
  • 6
-2
votes
2 answers

JSON and Eclipse - Why is an exception being thrown?

I know a fair amount about java but am new to Slick2d and JSON. I cannot figure out why an exception is being thrown when trying to load the .json map file. I am using eclipse, slick2d, lwjgl and json. I built a map file and it is located in eclipse…
squirt706
  • 33
  • 7
-2
votes
1 answer

there are two loops in the F250.java Class that wont run

The F250.java class is a gun object, and there are two methods that draw and update the bullets coming out of the gun. I made a Bullet class and made a bullet array in the F250.java…
-2
votes
1 answer

Java Tile Collision Not Working?

I'm doing collision but when I press the key to move it crashes and says that my isBlocked boolean has something wrong and I cannot figure it out, heres the class: public class Map_Test { private boolean[][] blocked; private static final…
Genthorn
  • 21
  • 8
-2
votes
1 answer

How to have String/Image disappear after a set time in Java

I was just wondering if there was a way to have an Graphics object that is a String (g.drawString(...)) or an Image (g.drawImage(...)) disappear after a set time once it has been rendered to the screen. I am writing a game in Java and would like a…
-2
votes
1 answer

Jumping Doesn't Work Slick2D

I have this code, and when I press space, it goes all weird. I have tested it, and jump() is being called when I press space. I don't receive an error for anything. public static void update(int delta) { if (!grounded && !jumping) y +=…
1 2 3
48
49