Questions tagged [slick]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

How to fix exception:Resource not found: testdata/alphamap.png?

I keep getting this exception:Resource not found: testdata/alphamap.png when trying to use Slick in my program. How can I resolve this error?
Vern Evens's user avatar
2 votes
0 answers
364 views

Having difficulty integrating flow field with flocking algorithm

I have been tweaking my path-finding in my game for a while now, and it's mostly functional, but there are some major issues that are holding me up. I have a flocking algorithm implemented to help ...
Darin Beaudreau's user avatar
0 votes
0 answers
50 views

Why does a part of the background turn white when the image disappears? Photo attached

I have an image of a fish that I've drawn to the screen, which has a transparent background: When the ninja touches the fish, I want the fish only to disappear, without affecting the background. ...
llleyylllla's user avatar
0 votes
1 answer
117 views

How can I make my animation switch frames automatically without pressing any keys?

So I have been trying to figure out for so long how I can loop the frames on my animation automatically without entering user input to prompt movement of my object. I have four different frames for a ...
llleyylllla's user avatar
0 votes
1 answer
435 views

Slick2D noClassDefFoundError for StateBasedGame

I'm trying to write a 2D game using slick2D, and I thought I set everything up correctly, but I'm getting this error: ...
moreQthanAs's user avatar
0 votes
1 answer
65 views

Rotating an image in Slick2D in place in a tiled map?

I just finished writing a parser for TMX data (Tiled maps), and the way Tiled handles rotated tiles is by using three bit flags for flipping an image horizontally, vertically, and diagonally, to allow ...
Darin Beaudreau's user avatar
1 vote
1 answer
63 views

Playing one song after another results in horrible grinding noise; how can I fix this?

I'm currently working on a game using slick2d java framework and I want to set it up so that the intro to a piece of music will play once, then the main body of the piece loops infinitely. I've got: <...
Chrisjde's user avatar
2 votes
1 answer
83 views

Z axis in slick2D

Firstly, I'm very new to slick2d, java, and coding in general, so if I apologise for any very obvious or basic errors that I've made. I'm developing a JRPG type thing in slick 2d and the battle ...
Chrisjde's user avatar
1 vote
1 answer
306 views

How to create post-processing effects in Slick2D?

As I get closer and closer to the end of the feature development for my game and the beginning of the graphical overhaul, I keep thinking of ideas for graphical effects that would make my game even ...
Darin Beaudreau's user avatar
4 votes
1 answer
677 views

Wind-blown fire particle effect from scratch

I want to create an effect of fire and be able to give it a variable amount of "wind" to make it blow to the side. I don't want the particles to just curve off to the side, but to flow through the air ...
Darin Beaudreau's user avatar
0 votes
1 answer
459 views

Issue with OpenGL texture rendering

I am developing a game in Java using LWJGL2 and Slick, and I am encountering an issue when rendering a graphic. Instead of filling the quad with the texture, it appears to be partly repeating it. The ...
Alex's user avatar
  • 3
1 vote
1 answer
206 views

Character getting stuck when colliding from the top

when my character goes onto a box that I am trying to make him collide with he gets stuck. The way I have it configured is that at the end of every frame, the characters x and y values are stored in ...
user108901's user avatar
1 vote
1 answer
332 views

Slick 2D Image move along with shape

I am trying to move my image along with the shape so I can make the collider with the shape (some kind of space shooter) but my image does not move along with the circle I make for it. It dissapears ...
newbiejava1998's user avatar
1 vote
1 answer
238 views

How to run JarSplice from the command line? [closed]

I've tried java -jar jarsplice.jar --help and "" /? which just launches the UI. I'd like my game to automatically be packaged ...
Shaun Wild's user avatar
0 votes
2 answers
159 views

Running Slick2d outside of the IDE

I am looking for advice how to solve an exception I am getting, I've looked around and seen people get the same error but most people whom had it seems to run on old graphics drivers and once they ...
Alex's user avatar
  • 1
0 votes
2 answers
112 views

How do I pass my objects to the update method?

I've had formal education in Java for around half a year now, and as a hobby I would like to attempt game development. I've downloaded the Slick2d library to help with this. I've run into a problem ...
user3500869's user avatar
0 votes
1 answer
326 views

How do i eject bullet shells from a gun? Java/slick2d

So, here is my problem: I am working on a top down 2d shooter in Java and have a character, which can move and rotate/fire to the mouse direction. Shooting guns etc. works fine but now i am trying to ...
Cringe's user avatar
  • 1
0 votes
2 answers
371 views

Failed to initialise the LWJGL display

I added the fix of adding this line "Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true" to vm arguments, updated my drivers but nothing is working......my error message still remain same has shown in ...
Pearl Silver's user avatar
0 votes
1 answer
798 views

How to export slick2d game into a jar with the res and native folder

I am a beginner in Slick2D. I use jarspliceJarSplice to output Slick2D game. But, but it is export all thingexports everything into one jar. I want to export one jar with the res andand native ...
casper's user avatar
  • 3
1 vote
1 answer
123 views

TiledMap render uses 15% of my cpu

I am a beginner in Slick2D. I used TiledMap render in my game,but I do not know why it use 15%cpu and how to fix it. I used map is 1024*768. This is a part of my code. Thanks for any help ...
vn7's user avatar
  • 11
1 vote
1 answer
151 views

My displayed Tiled map is rendered with different tile indexes than in the editor in Slick2D. Why?

The first picture is what I have in the editor and the second one is what I got when I rendered my map. ...
Yona's user avatar
  • 11
2 votes
2 answers
552 views

Anti-Aliasing Problem

So, I was annoyed by how the HUD for my GameState was very pixel-ated and I wanted to change that through the use of anti-aliasing. However, it works with a small exception: It adds all these lines ...
BlueJet's user avatar
  • 102
0 votes
1 answer
259 views

How does one structure a Player GUI

I am using Java and the Slick2D library. I've been testing around with ways to develop a Player Graphical User Interface (GUI) (to show armour, items picked up, weapons equipped, etc). The one ...
BlueJet's user avatar
  • 102
4 votes
1 answer
632 views

On a 2D generated terrain what is the easiest way to pick tiles for the shoreline?

If I have a two-dimensional array with ones and zeros for water and land respectively how do I choose what shoreline tile to use according to the water and land tiles surrounding it? The shoreline can ...
Hendrik Eerikson's user avatar
1 vote
2 answers
779 views

How do I calculate the tangent to a point on a circle?

I have a line that is from the center of a circle to a point on it's edge that is changing constantly (radius is drawn to a point orbiting a circle) I want to make a line tangential to the circle ...
Matthew Farstad's user avatar
0 votes
1 answer
211 views

Slick2D Simple StateBasedGame not working

I recently started trying to work with outside Java libraries like Slick2D. This is my first time doing so, so I basically have no clue what I am doing. I tried making a simple StateBasedGame that ...
Eames's user avatar
  • 157
0 votes
1 answer
168 views

Slick & LWJGL Flickering Problem

I have an flickering problem with rendering tiles. Rendering Method. ...
Barış Doğa Yavaş's user avatar
-1 votes
1 answer
1k views

Java Move towards point

Ive made this 'game' where you can fire an aibility (a fire ball for instance) from the player towards the mouse (to the point where the mouse was at the time of casting/fireing/shooting the ball), ...
Ivan Jerza's user avatar
0 votes
1 answer
2k views

Good Resources for Random World Generation [closed]

Is there a good reference or tutorials available for adding world generation into a 2D game? I've gotten to the point where I have most of the resources available to add world generation but I don't ...
BlueJet's user avatar
  • 102
3 votes
1 answer
196 views

Slick2D Networking Crash

This is my first post, so I apologize if it's been put in the wrong place or something. Anyways, here's my problem: I've run into an issue with running my client-side code in one of my game-states. ...
user avatar
1 vote
2 answers
1k views

Drawing from an ArrayList drawing same image repeatedly (Slick2D)

This is the game I'm working on. I isolated the problem into this class. ...
Matthew Farstad's user avatar
1 vote
1 answer
322 views

Error When Loading a .tmx TILED map through the TiledMap class

So I made a map using the TILED application and I have it as a .tmx for reasons, but whenever I use the TildMap class in the Slick2D library to render the map on the screen, it gives me an error. Here ...
BlueJet's user avatar
  • 102
0 votes
1 answer
127 views

Is It Better To Generate A Pre-Generated Map or A Randomly Generated Map When Using Tile Properties? [closed]

So I am contemplating whether or not to add a Pre-Generated Map or a randomly generated map into my game. But I also need to add Tile properties into the map (i.e. so that water tiles aren't being ...
BlueJet's user avatar
  • 102
1 vote
2 answers
1k views

How to make a "Camera" in Java

I need some help with getting my camera to work in java for a game that I am making. The problem is is that I've never made a camera in a game before and this is my first time trying to make one in a ...
BlueJet's user avatar
  • 102
0 votes
1 answer
408 views

Stopping Animations For Player In Java Using Slick2D

I have a problem with stopping animations for a player in Slick2D. I have tried many solutions to the problem and have looked up a couple of resources but I am still stumped by the fact that it is not ...
BlueJet's user avatar
  • 102
0 votes
1 answer
410 views

Java 2d topdown collision

Im making a game and Im working on the collision. First Ill tell you what I want (Ill put in pictures), then Ill leave the code. What I want: I want the player to stop exactly before its collision ...
Ivan Jerza's user avatar
-1 votes
1 answer
862 views

Java map creation

So Im making a topdown 2d rpg in slick2d and lwjgl 2, and I wanna make a map, but not just random map, something like this: The blue stuff is water and rivers, the gray in the middle is "the ...
Ivan Jerza's user avatar
3 votes
3 answers
822 views

Java Slick2d image depth/layering

I'm making a topdown 2d game, and I've made a decent entity system so far. But I want to do the following with it: I want to have drawing depth, so if, for instance, a tree is above another tree, then ...
Ivan Jerza's user avatar
2 votes
1 answer
195 views

Slick2d fullscreen with black bars

NOTE: I am moving this question here from Stack Overflow because I feel it belongs better on this forum. I am deleting the original question from Stack Overflow. I'm working on a game in Slick2D and ...
Ryuluce's user avatar
  • 23
2 votes
1 answer
95 views

Slick2D How to add a method from a diffrent class to a method

I am trying to get keyboard input in a separate class so everything doesn't look as messy. I get the following error message ...
Yuki's user avatar
  • 23
2 votes
1 answer
771 views

Java Slick2D how to draw text with a centered alingment

I've made a button class that can be drawn and clicked on. How can I write the text of that button (using the slick drawing API, g.drawString()) with a Centered alingment (so that the text is exactly ...
Ivan Jerza's user avatar
1 vote
1 answer
197 views

Java heart based health mechanic

so I've made a basic game in java w/ LWJGL 2 and Slick. Right now Im working on the hud and health system. I'm kindof trying to get a minecraft like health system, 15 hearts for health,but I want the ...
Ivan Jerza's user avatar
6 votes
2 answers
645 views

How can I make the code run only once when I release the key?

Im making a game in LWJGL 2 and Slick2d. Im trying to add an item to my inventory by releasing a key (the inventory system works ...
Ivan Jerza's user avatar
1 vote
1 answer
425 views

Java LWJGL inventory using ArrayList

I'm making a game in Java with LWJGL 2.9.3 and Slick2D, and I'm working on creating an inventory. I managed to set it up almost completely, but I ran into a problem. When I'm rendering the slots, only ...
Ivan Jerza's user avatar
4 votes
1 answer
579 views

Java Slick2d lighting using Raycasting

I am trying to make a top down view game in java using the Slick2d library, for lighting I wanted to do something like this : http://www.redblobgames.com/articles/visibility/. I was wondering if there ...
user3558075's user avatar
1 vote
1 answer
122 views

Java delaying commands in a method with time (Sys.getTime)

LWJGL 2.9.3 and Slick2D Hello, so Im making this game and its going quite well, but I cant figure this out: Ive got a 2d tile based map (wich is stored in a 2d array) and each tile has a coresponding ...
Ivan Jerza's user avatar
2 votes
1 answer
402 views

How do I stop off-screen tiles of a 2D tilemap from being rendered?

I am seeing lag because I render all tiles in my map at once. How can I exclude off-screen tiles from being rendered? My tiles are 32×32 and my player is always in the centre of the screen. Here is ...
Hamish's user avatar
  • 31
1 vote
2 answers
2k views

Getting the tile over wich the mouse cursor is

Im making a tilebased game, I have the rendering, the main engine, everything setup nicely (btw Im using LWJGL and Slick). Now this is more of a math question. How do I get the tile the mouse is on, ...
Ivan Jerza's user avatar
1 vote
2 answers
892 views

Random white lines appearing while translating rendering slick 2d images

Hmm I'm getting this weird problem that i think may be a bug with slick but when ever i translate an image in slick 2d for some reason a weird white line appears on the left side of every image like ...
Hamish's user avatar
  • 31
0 votes
0 answers
176 views

Java LWJGL and Slick2D collision with 2d array based map

So I've been making this game recently in java w/ LWJGL (2) and Slick2d. I've done some stuff like the map; it's a simple 2d array it goes through it and based on what id it is its gonna draw that ...
Ivan Jerza's user avatar

1
2 3 4 5