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
28 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
88 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); ...
0
votes
0answers
118 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
0answers
140 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() ...
0
votes
1answer
234 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
305 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 ...
0
votes
1answer
357 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 ...
0
votes
0answers
324 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
0answers
73 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 ...
0
votes
2answers
519 views

How to translate from Slick2d coordinates to jBox2d

I read through this question to try and get a grasp on the topic, but I can't figure out how to apply this to my Slick2d window. I'm trying to do something as simple as place an edge on the bottom of ...
0
votes
1answer
769 views

How handle nifty initialization in a Slick2D state based game?

I'm using Slick2D and Nifty GUI. I decided to use a state based approach for my game and since i want to use Nifty GUI, i use the classes NiftyStateBasedGame for the main and ...
0
votes
1answer
113 views

Is there any map maker for javaME game? [closed]

For the past two weeks I was trying to make a map maker for my java ME 2D RPG game. I failed because i get errors using slick TWL and the forum for this is inactive. So I just wondered is there ...
0
votes
0answers
31 views

How do I convert mouse co-ordinates in Slick2d java? [duplicate]

Possible Duplicate: Java Slick2d - How to translate mouse coordinates to world coordinates I'm really new in Java and I really want to how do I convert the mouse clicks to co-ordinates in ...
0
votes
1answer
2k views

Slick2D - Cannot instantiate the type Image

I am getting this strange error and I cannot for the life of me figure out why: Cannot instantiate the type Image CODE: import java.awt.Image; import org.newdawn.slick.GameContainer; import ...
-1
votes
1answer
1k views

How to change screen resolution in slick2d?

I released my game for testing for both windows and mac. I'm using mac as my development workspace. My friends uses windows and the window was to big. I created a 1000*1500 Screen window. I can change ...
-1
votes
1answer
85 views

Why are only some of my objects being rendered?

Every time I create a new asteroid the previous one is no longer rendered? I did some debugging and printed out the size of Array-List 'Small' and when a new asteroid is created it doesn't go down, ...
-1
votes
1answer
396 views

Slick2D and TileD [closed]

I've been learning Java for a while, and with my aims of being a game developer later in life, I've came across Slick2D+lwjgl and following tutorials and making some little things. However; I don't ...
-1
votes
1answer
132 views

Slick2D ingoring aplha channel?

When I use the draw method inside a image, it completely ingores the alpha channel and fills it in with white. Is there a way I can draw it where the alpha is see through like it's suppost to be? I ...
-1
votes
1answer
594 views

Resource not found?

When I write in my terminal, java -jar myJar.jar, it gives me an error "Resource Not found res/playNow.png" When I run it in eclipse, it does not give me any errors about this image. My folder in my ...
-1
votes
1answer
351 views

How to make an Image still when at position at Slick 2D?

I wanted to have a build functions. When I press for example 2, the image will appear with my character. The question is, how do I stop it from following my character //build //I created many ...
-1
votes
1answer
277 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 ...
-1
votes
1answer
576 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 ...
-1
votes
1answer
458 views

Slick2D and Clipping

How would I go about using clipping in Slick2D? I want to have an infinitely large world, however I'm not very good with clipping and it's my only problem. I don't have anything drawn outside of the ...
-2
votes
3answers
1k 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 ...
-2
votes
1answer
188 views

Issues with networking in my Java game, Client crashes when I try and read from the server input

A buddy and I have been programming a code game over the last 2 weeks, it is intended to be a multiplayer game with the ability to have 2 players play against each other. I am running into an issue ...
-2
votes
1answer
136 views

How to properly limit movement based on collision [closed]

I have a confusing problem on my hands. I've managed to get tile-based collision working, and I'm using the following code in my update loop to restrict my character's movement. for (Block b ...
-2
votes
1answer
168 views

Entity moving Up and Down but not Left and Right [closed]

I am trying to create an entity class for my game but I'm having difficulty with the movement, I can get the sprite moving along the Y-Axis but not along the X-Axis. Here's my code:- package Game; ...
-2
votes
2answers
168 views

How can I display an image for a predetermined amount of time?

I want to display an image, then return to the previous after one second when a certain key is pressed. I'm using Slick2d and Java. How can I accomplish this?
-2
votes
2answers
94 views

How to use outside int to be used in my class? [closed]

I wanted my character's life to be the same as the other game state. My other game state is different the from my original state. I wanted to link my int to my new game state to make it the same. How ...
-2
votes
2answers
140 views

How do I add Destroy with radius on Java Slick2d? [closed]

For Example, There is a tree(image) and i want to destroy it. I want my character only destroy it (For example the character must be facing the tree to destroy it and there must be a range were you ...
-2
votes
2answers
909 views

How do I make time?

I wanted to output a text for a certain amount of time. One way is to use threads. Are there any other ways? I can't use threads for slick2d. This is my code when I use threads for slick: package ...
-3
votes
1answer
43 views

How can I perfectly center an image in a window using Slick2d?

Dividing the window's width by two to position it in the middle of the x-axis did not work. What else can I do?
-3
votes
1answer
1k views

Slick2D TileD Map Editor Properties [closed]

So I used the following post to help me render my isometric map in Slick2D: Slick2D Isometric TiledMap Rendering Problem Big thanks and credit to arminb for the code supplied and for the fix to be ...
-3
votes
1answer
2k views

Java2D Collision Detection

I've been wrapping my head around Java2D collision detection. I am working with Slick library and trying to figure a simple clean code to check if a collision has occurred. The idea is fairly simple, ...
-5
votes
2answers
180 views

How to stop reducing life? [closed]

CODE Input input = gc.getInput(); int xpos = Mouse.getX(); int ypos = Mouse.getY(); emu = "Enemy Life : " + enemyLife; Life = "Your Life Is" + life; ...
-5
votes
1answer
73 views

Help, i cant reference my vars! [closed]

I have a sub-class(let's call it sub) and it contains all the function of an object in my game. In my main class(Let's call it main), i connect my sub to main. (Example sub Code: s = new sub(); ...
-5
votes
1answer
169 views

Writing and reading from an XML file with Slick2D [closed]

I was wondering how you would go about writing and the reading from an XML file using the Java library Slick2D. I have googled for the last couple of days and have found nothing succinct and simple ...
-6
votes
1answer
949 views

How to remove the FPS text on slick2d?

How do I remove the frame rate text on the upper left corner?
-6
votes
1answer
139 views

Is it the class that slows down the game? [closed]

My framerate lastime exceeds 1000 now the highest is 15. I have thousands lines of code in one class(I was still fresh last time and did not think of putting it in another class) Is it the class that ...