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
-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,682
  • 2
  • 16
  • 24
-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,375
  • 1
  • 8
  • 24
-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
  • 478
  • 6
  • 15
-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
  • 55
  • 1
  • 6
-2
votes
1 answer

How to load custom TrueTypeFonts in Slick2D

People are having a lot of problems loading custom fonts into Slick2D to draw strings with the graphics tool, so here is how I did it.
Mamshmo
  • 71
  • 8
-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 +=…
-2
votes
1 answer

I cannot seem to find an answer to finding the point of collision between two objects with slick2d

I can find IF two objects collide, but not the point in which they DO, I have seen other posts asking similar questions, but the answers have always been too cryptic/made large assumptions on the knowledge of the user, and were always for other…
Krupip
  • 3,570
  • 1
  • 27
  • 40
-2
votes
1 answer

How do I draw text with UnicodeFont with Slick?

I need to know how to draw text with UnicodeFont and Slick. I don't want to make a class that extends by BasicGame or BasicGameState, I just want to implement it straight into my main-class. Thanks.
Taylor Golden
  • 41
  • 1
  • 2
  • 10
-3
votes
1 answer

Computer makes a high pitched noise when running Slick2D java engine

Why does my processor (I think) make a high pitched noise when running Slick2D java game engine with nothing in it, just the source code of the engine with nothing built on top. Is this normal and what could be causing this? (Are other users…
Markusmoo
  • 481
  • 5
  • 15
1 2 3
46
47