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

Getting Applet Parameters from Slick2D Game

In a Slick2D game, how can I access parameters passed to the AppletGameContainer? I've got a Slick2D game that I'd like to run both as an applet, and as a standalone application. When the game is running as an applet, I'd like to access some…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
0
votes
1 answer

Slick Java Library - update method

Ok I am developing a game and I am trying to work out why the slick update method isn't working, basically in the tutorial I was watching it worked but on mine it doesn't. I asked on the you tube tutorials video and no one knew why this happened. So…
0
votes
1 answer

Slick2D: Type safety warning when initialising font

After following a Slick2D tutorial on custom fonts, it provided me with the following code to initialise it: titleFont.addAsciiGlyphs(); titleFont.addGlyphs(400, 600); titleFont.getEffects().add(new ColorEffect()); //Type safety: The method…
njallam
  • 476
  • 9
  • 23
0
votes
1 answer

Why does my string from my JComboBox return as null

Tile Selection protected void myBox(ActionEvent evt) { if (patternList.getSelectedItem() != null) { System.out.println(patternList.getSelectedItem().toString()); getImagePath(); } public String getImagePath(){ jk =…
Capitals
  • 1
  • 4
0
votes
2 answers

run time error in java slick2D project while using AppGameContainer

Hi I am trying to make a java game using slick2D and lwjgl 2.8.4. But I am not being able to implement AppGameContainer class. It causes a run time error. My code is given below: import org.newdawn.slick.AppGameContainer; import…
shaonAshraf
  • 1,107
  • 1
  • 11
  • 21
0
votes
1 answer

Exported Runnable Jar File - I know what's wrong but not how to fix

How to export to runnable java file with eclipse using slick and lwjgl (Light Weight Java Graphics Library)? So, I have done some research into this and believe I have found the root of the problem and what needs fixing, now I need to figure out how…
Kira Namida
  • 279
  • 3
  • 16
0
votes
1 answer

ArrayIndexOutOfBoundsException on getColor() method in Slick

I have this code to create an ArrayList with all the pixel locations where there is actually a pixel (alpha != 0). The code is as follows: public ArrayList getPixels() { ArrayList output = new ArrayList(); Image…
njallam
  • 476
  • 9
  • 23
0
votes
1 answer

Changing Default Font in Slick Graphics API

I am attempting to change the default font for the Slick Graphics API to simply draw the title of a game I'm writing, but I can't seem to get it to work (it doesn't draw anything, just leaving the screen blank). I want to use one of the standard…
GravityScore
  • 297
  • 3
  • 12
0
votes
1 answer

Java Slick2D and Jbox2D

I have recently started to develop games in java using the Slick2D library and am really enjoying it. I have come to a problem where my game need physics and after browsing the web I have decided to use Jbox2D physics engine. Before installing…
Jake Runzer
  • 957
  • 3
  • 17
  • 35
0
votes
1 answer

How to use JBox2D debug-draw in Slick2D?

JBox2D, the Java port of the Box2D physics engine, features an extensible module for creating debug drawing of shapes. How can I use this with the Slick2D game library?
liamzebedee
  • 14,010
  • 21
  • 72
  • 118
0
votes
1 answer

Slick cannot load the image?

So I'm following thenewboston's tutorials on Slick 2D. I'm loading the Image exactly as he said: private org.newdawn.slick.Image playNow; ... public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { ... playNow = new…
mattbdean
  • 2,532
  • 5
  • 26
  • 58
0
votes
1 answer

Java Slick2D Shooting Issue

I am generally new to both Java and Slick2D, and even after browsing Google, I couldn't find the answer to my question. In my game I have a character that can currently run back and forth, and jump. I want him to be able to shoot projectiles, but…
0
votes
1 answer

Stop sprite from ghosting through another sprite

Ok so I've just started learning java (I usually program in Objective-C). My first game is a game similar to Pokémon, however, its a lot more simplified obviously... The trouble I'm having is I can't find a way to stop 2 sprites from 'ghosting'…
Savlon
  • 744
  • 2
  • 11
  • 18
0
votes
1 answer

endless background for the level

Could you please help with the endless background for the level? I'm currently writing a primitive game using slick2d, the gameplay is similar to Mario. I have two pictures - img1 and img2 (both 1280x480, while the screen resolution is 640x480).…
Eugene S
  • 99
  • 1
  • 11
0
votes
2 answers

How to make slick2d resizable

Hey guys I was wondering if there was a way to make slick2d resizable by the user.(I have researched this and only found out how to make the program resizable within the program) Here is my code and thanks in advance. package Main; import…
me me
  • 778
  • 2
  • 7
  • 18