The Slick2D graphic engine and utility collection is meant to make the development of games using LWJGL easier.

learn more… | top users | synonyms (1)

0
votes
1answer
24 views

How can I make an soundsystem with slick?

My Question would be , how can I develop an easy-to-use Soundsystem under slick-util? Under the function a.playAsSoundEffect(1, 1, true, x, y, z); it allready works to create a static ...
0
votes
0answers
19 views

Collision detection in slick [closed]

I tried to play a little around with slick in Java. My map which I created in tiled looks like this I only have those two different tiles and the black ones got the "blocked" property. The black ...
1
vote
0answers
41 views

Slick2D v LibGDX: [closed]

Okay. You might have seen some of these posts on forums here and there, but I wanted to ask this here mainly because everyone here is focused on game-dev and there seems to be quite a few Java ...
0
votes
0answers
18 views

Slick2D changing image's color with drawFlash and using alpha

I have an image, where I have a round soft white feathered ball in the center of it. I plan to use it for my lighting in my 2D game. I could not find any proper way to drawing lighting with many ...
0
votes
0answers
27 views

Slick2D/LWJGL Drawing coloured lights problem

I am using the Slick2D engine. I've followed this snippet for creating light sources. I have followed step step, added what is actually important for me, and tested it and the lighting effects ...
0
votes
0answers
18 views

Drawing jbox2d shapes in slick2d

How would be the best way to go about drawing polygons in slick after forces where applied to them via jbox2d? There seems to be no way to get the vertices of a body defined in jbox2d...
0
votes
1answer
64 views

LWJGL/Java - Implementing a writeable text box?

I would like to create a writeable text box where a user can input text into it. A nice "send" button that the person could click to send the text to the server would also be nice. I currently haven ...
0
votes
1answer
74 views

How to achieve a Gaussian Blur effect for shadows in LWJGL/Slick2D?

I am currently trying to implement shadows into my game, and after a lot of searching in the interwebs I came to the conclusion that drawing hard edged shadows to a low resolution pass combined with a ...
0
votes
0answers
25 views

Moving a tiled map in a jframe

I rendered a tiled map, with the help of slick2d, in my JFrame in Java. I can move my main character, but it is just that the character itself moves. I would like to do it that, if the player moves, ...
1
vote
1answer
62 views

Java Slick2d Animation not working

Hello everyone I am trying to make a simple 2d game using java and the slick2d library. this is my first time doing it and i need some help. Right now I am trying to make the Animations for the ...
0
votes
1answer
56 views

Slick and Timers?

I'm making a game where I need events to happen in a precise amount of time. Explanation : I want that event A happens at 12000ms, and event B happens every 10000ms. So "if"s should looks like this. ...
4
votes
1answer
80 views

Why is my Slick2D spritesheet animation cut off when it loops?

I am loading a SpriteSheet with Slick2D and using the Animation function in the render method to display it. The spritesheet loads perfectly, but when the animation loops, it does so moved down a few ...
0
votes
1answer
94 views

Using Single Image for Map in 2D Platformer

I'm fairly new to game development, and have been messing around with Slick2D. Currently, my map consists of objects that are represented as rectangles. If I wanted to use am image simlar to: How ...
0
votes
0answers
53 views

Cube projection composed of smaller cubes not lining up

I am trying to make a cube projection composed of other cubes, similar to a Rubik's cube but completely static. I can get one cube to work, but when I join multiple, they don't line up. I am using ...
0
votes
1answer
43 views

java slick2d - key press being ignored

I have the following in my update funtion. The first input for key_enter when textPos!=2 works fine, but the one when textPos==2 doesn't work. The key up and down work fine though. The ...
0
votes
1answer
105 views

Why does my character move up forever when he jumps with this code?

I've been doing some stupid stuff in Slick2D+LWJGL and I've run into a problem. I press the UP arrow and my character continues to go up until I let go :/ Here's the code: if ...
1
vote
0answers
32 views

java slick2d - gettileproperty returns true when it shouldn't

I'm trying to implement some collision detection to a test game i've been making. I've used TiledMap to create the map and set a property on one of the tiles to blocked=true This tile is then drawn on ...
-1
votes
1answer
112 views

Slick2D: Resizing the Window

I am using Slick2D, and I wanted to know which is the best way to resize, maximize, minimize the window, For example, Resizing all the images or scaling them, or Slick2D has an integrated method, Any ...
0
votes
1answer
24 views

lwjgl slick textures and glTexParameter

How to make textures fill all area as it is specified? I'm getting small gaps if the texture is smaller than area example: gl_quads setup like these: -1f, 1f, 0, -0.98f, 1f, 0, -0.98f, -1f, 0, ...
0
votes
1answer
50 views

Slick2D: Animation not being parsed from spritesheet correctly

I have a 960x960 spritesheet with each tile being 192x192. I initialized my spritesheet and animation like so: spritesheet = new SpriteSheet("resources/spritesheets/player.png", 192, 192); ...
1
vote
1answer
57 views

How can I check for key releases between keyReleased callbacks?

Slick2D's Input class has a isKeyPressed() method that returns a boolean value according to whether the specified key has been pressed. I want to check if a key has been released in the same fashion. ...
0
votes
0answers
60 views

How can I draw a part of a texture in slick2d?

I know the method for drawing a region of a texture in slick2d: image.draw(x, y, srcX, srcY, srcX2, srcY2); But I have no idea how the texture coordinates work. To draw a region of x:16, y:16, ...
0
votes
2answers
102 views

Slick2D: constructor vs. init method

What is the difference between the constructor of a BasicGameState and the init method? It appears that they are both called at the same time when the BasicGameState is registered in StateBasedGame, ...
0
votes
0answers
77 views

LWJGL Rotating is moving

I am trying to rotate my QUAD even just a little bit. I have read pages like http://www.java-gaming.org/topics/lwjgl-tutorial-series-moving-and-rotating-triangle/30679/view.html In my render() ...
1
vote
1answer
64 views

Slick2D: Initializing graphics object before game loop

I'm using the Slick2D Java game library and I want to set the scale of the graphics object that gets passed to the render method in my game loop. I'd like to do this outside the render method, so ...
1
vote
1answer
107 views

Get Tile Location On Screen (Java Slick and Tiled2D)

I want to create a rectangle around each tile that's blocked value = true. How can I find the X and Y (on screen) coords of the each individual Tile?
0
votes
1answer
182 views

2D Tiled Map - Small tiles or big tiles with pixel-precise movement

I am using Java - LWJGL - Slick2D . I have tried to do a proper collision detection with 32 x 32 tile size but failed three times. I just cant get it to work! I found a youtube video that was using ...
0
votes
2answers
164 views

How can I move a created Image in Slick2D?

I want a image to follow the mouse, and I use Image class of Slick 2D: public void init(GameContainer gameContainer, StateBasedGame stateBasedGame) throws SlickException { mouseImage = new ...
2
votes
1answer
177 views

How do game developers make their game available for most of the resolutions?

I'm developing a game with Java using Slick2D and I want to make a game that could target all the recommended resolutions, as you can see in almost every game you could have an option of changing the ...
1
vote
1answer
189 views

How can I improve the performance of texture switching without resorting to atlasing?

I'd like to use texture images that are not a sprite sheet or other form of texture atlas, mainly because I'll be consistently adding and swapping textures while I figure out the direction my game ...
1
vote
1answer
141 views

Random lines away from images in java2d opengl game

Working on a java game that uses some pngs images for icons/textures. A few images ( fewer than 5, out of dozens ) are showing some odd parallel "artifact" lines. They move with the image, are ...
0
votes
1answer
364 views

LWJGL font not rendering, even with depth test and texture_2D

I'm running into an odd little problem here. I'm attempting to render a basic console over my LWJGL-based application, which should be easy enough through a decorator pattern of renderers (as in, one ...
0
votes
2answers
267 views

Slick2D - Entities and rendering

I have been trying to create my very first game for quite a while, followed some tutorials and stuff, but I am stuck at creating my entity system. I have made a class that extends the Entity class and ...
0
votes
1answer
250 views

Java Slick2D - Problem using ScalableGame class

I am having a problem adjusting the size of the screen while using the ScalableGame class from the Slick2D library. I would like the background and objects (images and graphic shapes) to adjust to ...
1
vote
1answer
184 views

How to only render part of an image in lwjgl/openGL

I'm making a mining/building game in java using slick2D and I want to make it so you can only see a few blocks in any direction while you are underground. The best example I could find of what I want ...
0
votes
1answer
88 views

Streaming resources

I'm writing a game using the Slick2D library. I recently added a loading screen using deferred loading. I use the Music class to load OGG files to be used as music. These take an excessive amount of ...
0
votes
0answers
233 views

Java Slick2D rotating Shapes

I'm having a problem with rotating a Shape in Slick2D for Java I have a code in screen render which works properly: Shape box = new Rectangle(100,100,32,32); box = box.transform( ...
0
votes
3answers
379 views

Tile Map World Background

I am making a 2D top-down game in Java using the Slick2D library. However, this question applies to all ways of making games of this nature. My question is: How would I do a background for the world. ...
0
votes
0answers
64 views

Slick - create new texture from part of existing texture

Say I have the following image: I want to resize this texture, so I can have resizable buttons with a texture. Now, as you can't repeat a certain area of an image in OpenGL, I have to create a new ...
2
votes
1answer
47 views

What measurement units are used in the return value of the getWidth method in the UnicodeFont class supplied by Slick2D?

I'm working on a small component for a game that essentially wraps the provided String so that it fits within the width of the provided rectangle. The rectangle is provided by the Slick2D library as ...
1
vote
0answers
74 views

Slick2d font rendering makes all other drawings vanish

I'm converting a java game to lwjgl and slick-utils. I've followed the slick2d examples for font loading/rendering but I found that the font shows as a solid box of color unless I add the following ...
1
vote
1answer
344 views

Including slick2d or slick-util in maven build?

I'm converting a project to lwjgl and trying to use slick-util as well. There's no slick-util maven repo anywhere (nor slick2d itself anymore). I've included local dependancies before using ...
0
votes
0answers
95 views

Nifty-gui and Slick2D, how do I set it up?

I'm trying to set up Nifty in Slick2D. I'm new to Slick2D and Nifty but I have some experience with Java. Following the guide: ...
4
votes
1answer
743 views

How do I draw a full resolution texture to a window of the same resolution?

My image is 1280x800, and my screen size is 1280x800. It should draw perfectly. I'm creating a quad the size of the screen, and setting the texture to fit the quad. But right now it draws a square ...
1
vote
1answer
2k views

How do I detect and handle collisions using a tile property with Slick2D?

I am trying to set up collision detection in Slick2D based on a tilemap. I currently have two layers on the maps I'm using, a background layer, and a collision layer. The collision layer has a tile ...
1
vote
1answer
130 views

(Java + Slick) How to rotate the Graphics (g) around the X-Axis?

I already tried it by using GL11.glRotatef(45, 1, 0, 0), but the result looks like this:
-2
votes
3answers
724 views

LWJGL vs Slick2D vs OpenGL. What is the difference?

I was wondering what the difference was between LWJGL, Slick2D, and OpenGL. If I'm not mistaken LWJGL is a library and it has the methods and such, but what are the other two for and how do they use ...
0
votes
1answer
518 views

Slick2D and Nifty GUI

I am currently trying to combine both slick2d and nifty to work together. I've had some amount of success - I can now actually run my test and it won't crash. As far as I can tell, it will also ...
1
vote
1answer
196 views

Slick2D : translate -> scale -> translate doesn't return to the old position

I am trying to implement zoom using Slick2D library. As I understand, to zoom something on non (0,0) coordinates, we need: translate so the target point is in (0,0) apply scale factor translate the ...
5
votes
3answers
212 views

Serialization of objects problem

i have a problem with serialization (saving and loading game variabiles), when i save evreything seems to be saving correctly but when i try to load it only detects first 3 objects i saved and the ...