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

Putting Java Slick game on a website using html

I have made a 2D java game using Slick and it extends StateBasedGame, it does not extend JApplet so it is not really a real application but from the link bellow it shows that StateBasedGame is part of the Slick API and it can be used as an applet if…
Rahul Khosla
  • 349
  • 9
  • 21
0
votes
1 answer

Using an ArrayLIst to create bullet objects in space invaders style game

I am currently working on a space invaders style game but I have run into a bit of trouble with multiple instances of bullets. At the moment I can only fire one. I have been trying to get it to work with an Array List but I just can't seem to get it…
Crispy91
  • 77
  • 1
  • 12
0
votes
4 answers

Multiple extends on Java

I have made a game using Java, my game is a state based game, so it extends StateBasedGame, I want to put the game on a website which will require me to make it an applet (unless there is another way) so it must also extend JApplet, after trying to…
Rahul Khosla
  • 349
  • 9
  • 21
0
votes
1 answer

Java LWJGL Slick TTF blur

I'm having a bit of trouble rendering textures and true type fonts at the same time. The following screenshots portray my problem: This shows the font rendering perfectly. This was before I was using…
Lewis
  • 11
  • 4
0
votes
1 answer

Java Slick2D & lwjgl

i try to write the boot screen to test the game. When I try to run this code, I have some errors. I was looking for some information on anything specific but not learned, besides, someone mentioned that I do not have the graphics drivers, but I…
user1366028
  • 41
  • 2
  • 9
0
votes
2 answers

Collision detection - preventing player from moving after he hits object

I have the following code: if(input.isKeyDown(Input.KEY_RIGHT)){ player = movingRIGHT; pposX -= 0.15f; if(playerR.intersects(rec1)){ pposX += 0.15f; } } if(input.isKeyDown(Input.KEY_LEFT)){ player = movingLEFT; pposX += 0.15f; …
ESipalis
  • 381
  • 4
  • 17
0
votes
1 answer

How do you toggle an image with a button event in Slick?

So I am trying to get a simple GUI setup for my teams game we are starting and I'm trying to make a drop down inventory using "I" as the hot key for it and it drops fine but I can't seem to figure out a way without using a different key to make it…
Tyler Benzing
  • 1,116
  • 11
  • 25
0
votes
2 answers

Why do I need to disable GL_TEXTURE_2D after drawing string in order for shapes to render?

I'm using the Slick2D library in order to render text to the screen but in order to render gl shapes like Rect, I need to first disable GL_TEXTURE_2D. I'm just curious as to why that is needed. Why does GL_TEXTURE_2D disable the rendering of shapes?
Adam Keenan
  • 764
  • 1
  • 11
  • 29
0
votes
1 answer

Integration of Nifty in Slick, tutorial is there

I'm trying to get to use Nifty in my Slick game. However, i can't figure how to even get started. I've found this tutorial:…
Patrick Reck
  • 303
  • 1
  • 10
  • 24
0
votes
3 answers

Editing already existing method

I'm using the Slick library as the framework for my small game. Linebreaks ain't supported by default on the Graphics2d object. However, i found this little fix: private void drawString(Graphics g, String text, int x, int y) { for (String line :…
Patrick Reck
  • 303
  • 1
  • 10
  • 24
0
votes
1 answer

Rotate player to face objective java slick

So I am currently working on learning slick. I was doing fine until I ran into a problem. I have been trying to find a answer for a good hour and could not. So I decided to post it on here. My Problem: I have player on a 800 X 800 Grid. I am trying…
0
votes
1 answer

Java, Slick, An object that shouldnt move is moving?

In my game I'm making, I need NPC's/mobs. I made a class called peasant (my first mob). In the main class from which the game is running, I have all the information, as well as calling an object called mob1 from Peasant I need to make it so that if…
0
votes
1 answer

Importing java variables between classes

I have two classes. One class has a variable "Image plane = null;" in this class (Class1) I call a function move.lookright() which executes a function on another class file called move.java, My issue is I need to import a few variables into this…
0
votes
2 answers

Detect mouseclick on object Slick2d

I've made this code that successfully creates a 16x12 grid by 50x50 squares on a 800x600px board. As you can see, the player moves to the coordinates of the players mouseclick. Each square of the grid has an object of Felt (field) on it, which can…
Patrick Reck
  • 303
  • 1
  • 10
  • 24
0
votes
1 answer

Java Slick making character rotate to selected degree

I have run into a issue while coding my game. I am using Slick Libraries and Light Weight Java Games libraries. I am trying to make my player (Plane) go to a certain area on the map. For example if I set the target coords to (50,50) My plane will go…