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
32
votes
2 answers

Slick2D vs Straight LWJGL

I've been delving into game programming with Slick2D, and I've began to wonder if in the long run, knowing LWJGL would be more helpful. On one hand, Slick2D is fast and simple, but it seems LWJGL is more adaptable in the sense that it has both 2D…
platypirates
  • 331
  • 1
  • 4
  • 5
15
votes
1 answer

Slick2D and JBox2D. How to draw

Before asking this i did A LOT of searching on the net. I just can't do it. It's a little hard for me to understand. So how do i draw the images at the right screen positions coresponding to bodies in world position? Thanx. If anyone else finds…
Romeo
  • 376
  • 1
  • 3
  • 14
10
votes
5 answers

No OpenGL context found in the current thread, how do I fix this error?

I'm working on a card game, and currently have a good foundation but I'm running into an error when I run it in eclipse. I'm also using slick 2d. Here is the error from the console. Exception in thread "main" java.lang.RuntimeException: No OpenGL …
Hayden Holligan
  • 1,682
  • 2
  • 16
  • 24
9
votes
6 answers

"Could not find main method from given launch configuration" when using Java+Scala+Slick2D

I've got a project in which I'm using Java+Scala+Slick2D. The project itself runs well when launched from within eclipse. But when I try to make a jar file, it just refuses to work. Here's the error I keep getting when trying to export it as a…
Plasty Grove
  • 2,473
  • 4
  • 23
  • 34
8
votes
1 answer

LibGDX creating texture from base64 PNG ByteArrayInputStream

I just decided to make the change from Slick2D to LibGDX. However, for me to be able to port my game over to LibGDX I need help understanding how to create textures in LibGDX from my game data files. My game data files are encrypted and the images…
6
votes
1 answer

How can I detect a click on a rotated image in Slick2D?

I have an image that I rotate before I draw. The image is rotated by the angles of a hexagon. In other words, the image basically "highlights" the individual edges of a hexagon. I need to detect if the mouse was clicked inside of this rotated…
ShoeLace1291
  • 4,117
  • 11
  • 41
  • 65
6
votes
1 answer

java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException

Trying to work on a game for school and I keep getting a "java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException" when trying to run using eclipse. Any ideas? Here is my code package javagame; import org.newdawn.slick.*; import…
6
votes
1 answer

How can I prevent Alt key opening Dash Home while my Java app runs in Ubuntu?

I am learning Slick2D, which perfectly serves my purposes of 2D Java game programming. Unfortunately, I have a problem. I don't think it's Slick2D specific, since I think the same happens with Java Graphics 2D. In Ubuntu (I'm using Ubuntu 12.04),…
Corbomite
  • 61
  • 4
6
votes
4 answers

How can I build a Mac OS X .app from an eclipse program

My program works fine in Eclipse. However, if I try to export it as a runnable jar, the jar doesn't open when I double click it. Is there a way, in Eclipse, to export directly to a .app?
Impmaster
  • 187
  • 2
  • 8
6
votes
1 answer

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

I'm building the basic Slick game example explained here: http://slick.cokeandcode.com/wiki/doku.php?id=01_-_a_basic_slick_game, and I'm running into some problems. Specifically, the game compiles just fine, but when I try to run it, Java…
corazza
  • 27,785
  • 32
  • 104
  • 177
6
votes
1 answer

Java Slick scale Image without anti-aliasing

In the Slick library (based off of LWJGL), you can scale images after you load them with getScaledCopy, but it will apply anti-aliasing. I want the edges to stay rough; I'm making pixel art. How can I do this?
Jwosty
  • 3,334
  • 2
  • 20
  • 47
5
votes
2 answers

Write text on the screen with LWJGL

I want to write text on the screen for my game, for things like fps, random text for items and stuff. How can I write that text? Is it possible without the Basic Game class? Isn't there a command like this g.drawString("Hello World", 100, 100);?
julian
  • 4,188
  • 9
  • 38
  • 58
4
votes
3 answers

In Eclipse, my exported executable jar doesn't do anything ! (LWJGL)

Java beginner here. I made a small java app in Eclipse (on Windows), using the LWJGL lib and Slick. Then when I export is as an executable .jar file, and run the resulting .jar, it doesn't do anything. No errors, no nothing - just doesn't seem to…
Orteil
  • 429
  • 6
  • 16
4
votes
2 answers

TrueTypeFont.drawString() not supported

I'm trying to implement 2D text rendering into my LWJGL game and have searched everywhere for a working solution, but keep getting the same error. I am currently trying to follow this tutorial. Here is the error: Exception in thread "main"…
user5838494
4
votes
1 answer

Slick TextField not working

I have a problem when using Slick2D's TextField. When using Slick's 'BasicGame' the TextField works fine - I am able to click on it, type words, and System.out.println the text fields contents. However, when using the same code on a…
P3TE
  • 45
  • 5
1
2 3
46 47