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

learn more… | top users | synonyms (1)

4
votes
1answer
1k views

Create the right pom.xml for LWJGL and Slick Project (Maven)

can somebody tell me whats wrong with my pom.xml file? At this point i get this error if i start my *.jar file: C:\Users\Michael\git\freezing-robot\target>java -jar ...
1
vote
3answers
457 views

For the handling of buildings on a tile-based strategy game, what aproach should I use?

On a tile-based game of the strategy genre, which allows the player to place buildings over the terrain tiles, there are multiple approaches that can be taken for handling such situation. The ones ...
0
votes
1answer
1k views

How to implement HUD

I'm wondering how one could implement an HUD in LWJGL. I've seen tutorials on this, but they don't seem to work. I know the basic structure goes like this: init3d(); // 3d code init2d(); // HUD To ...
1
vote
1answer
268 views

Slick2D drawString with coordinates from bottom-left corner

For OpenGL text drawing I use Slick2D library. Default Slick2D 0:0 coordinates are at upper-left corner. But in my project I use bottom-left corner for 0:0. Is it real to configure Slick2D with ...
2
votes
2answers
400 views

Snake game - collision detection causing new position of apple to be rendered multiple times

I have a collision method implemented through the use of slick2d. When ever the snake collides with the apple, it causes the apple to be rendered in multiple places before the snake moves further ...
1
vote
1answer
1k views

How do I get the width of a string as it would be displayed on screen?

What is the best and easiest way to get the width of a String using Slick2D? I'm working on the achievement interface menu in my game that displays some images. On each image I need to draw a string ...
2
votes
1answer
74 views

Changing DisplayMode seems not to update Input&Graphic Dimension

I'm writing a small game using Slick and Nifty-GUI. At the program startup I set the DisplayMode using the following lines: AppGameContainer app = new ... app.setDisplayMode( 800, 600, false ); ...
2
votes
3answers
2k views

C# 2D Game Library?

I'm looking for a C# 2D game library based on something like OpenTK which wraps OpenGL for C# Basically something like Slick2D (2D game library for Java) which is based on LWJGL which is an OpenGL ...
1
vote
3answers
2k views

How do I load tmx files with Slick2d?

I just started using Slick2D and learned how simple it is to load in a tilemap and display it. I tried atleast a dozen different tmx files from numerous examples to see if it was the actual file that ...
3
votes
4answers
3k views

Java Slick2d - How to translate mouse coordinates to world coordinates

I am translating in my main class render. How do I get the mouse position where my mouse actually is after I scroll the screen public void render(GameContainer gc, Graphics g) throws SlickException ...
3
votes
1answer
1k views

How do I implement smooth movement in a Box2D platform game?

I have implemented a character in JBox2D which moves with the help of a wheel rotating at the bottom of it. The movement is the best result I've had 'till now but it's a little glitchy when the ...
2
votes
2answers
613 views

Slick & NiftyGUI. Nifty initialize exception

I found my self into trouble when trying to run a Slick game with a Nifty Game State. This is the code: @Override protected void initGameAndGUI(GameContainer container, StateBasedGame game) ...
2
votes
1answer
2k views

Using Nifty GUI with Slick2D

As seen here NiftyGUI has it's own GameState classes, I want to know if for adding UI to one state of my game I need to make that state NiftyOverlayGameState or still a BasicGameState but to add a ...
2
votes
2answers
954 views

What is the most efficient way to add and remove Slick2D sprites?

I'm making a game in Java with Slick2D and I want to create planes which shoots: int maxBullets = 40; static int bullet = 0; Missile missile[] = new Missile[maxBullets]; I want to create/move my ...
4
votes
1answer
2k views

Distributing cross-platform .jar containing natives for LWJGL?

I'm making a game in Java using Slick2d, which depends on LWJGL. I can get everything to work in my development environment, but when I export it to a .jar, it needs the natives placed in the same ...
1
vote
1answer
719 views

Using Slick2D/LWJGL to brighten an Image

Using the Slick2D Library for Java, I want to know if there is a way to brighten an instance of org.newdawn.slick.Image. I'm willing to use other image-manipulation libraries if need be.
1
vote
2answers
1k views

How do I set a single pixel of an image in Slick2D?

I would like to set an individual pixel in Slick (i.e Image.setPixel(x, y, r, b, g)) but I can't figure out how. There is an Image.setPixel function but it doesn't take x and y coordinates. Any ...
1
vote
2answers
616 views

Collision Problems in Pacman Clone

I am working on a Pacman clone. I am using Java for the project. I have been having problems with collisions, and allowing the player to pass through objects. Note that the tile size (and player) is ...
1
vote
1answer
3k views

Rotation of images in Slick2D

I have have a rotation problem in the Slick2d library, the image is just not rotating (ie I set a rotation but no result is shown). Here is the rotation code: if (input.IsKeyDown(Input.KEY_LEFT)) { ...
2
votes
1answer
730 views

Slick2D Tile Based 'Fog of War' Blurring Problem

I'm working on my first Java Game and I have run into a little problem I'm hoping to get some help with. I'm using Slick2D displaying a tile based map, and I'd like to know how I can created a ...
0
votes
1answer
2k views

Resource not found: testdata/alphamap.png

I started a tutorial for java's slick 2d library, called SlickBlocks which is essentally a tetris clone. The problem is I have followed and typed in the code examples to the dot, yet when I run it I ...
2
votes
1answer
859 views

Slick2D, Nifty GUI listeners problem

I'm trying to get Nifty GUI to work with Slick2D. So far everything is going great, except that I can't seem to figure out how to properly interact with the GUI. I'm trying the example in the nifty ...
-1
votes
1answer
442 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
1answer
872 views

How do I get the alpha level at a specific pixel with Slick 2D?

I know that there is the Texture.getTextureData() method, and that it returns a byte[], but I have no idea how I could use this data to find the color data at a specific pixel.
10
votes
3answers
9k views

How can I make OpenGL textures scale without becoming blurry?

I'm using OpenGL through LWJGL. I have a 16x16 textured quad rendering at 16x16. When I change it's scale amount, the quad grows, then becomes blurrier as it gets larger. How can I make it scale ...
7
votes
2answers
3k views

How do I handle collision detection so fast objects are not allowed to pass through walls?

I'm creating a 2d sidescrolling shooter, and I'm having a little trouble with collision detection for the bullets. Everything including the bullets are objects with their own polygons / update ...
7
votes
3answers
2k views

Rendering only what is on the screen

I am fairly new to this world, so bear with me. I have a grid of blocks in a top-down, 2d game written using Slick. The best way to think of it is the Pokemon world. Right now, I am rendering all ...
0
votes
2answers
813 views

deciding user movement path - slick 2D

i'm going to describe what need to be done... "there are circular areas marked in a map, large areas a person can easily move in to them and out of them" what i'm trying to do is deciding weather the ...
0
votes
1answer
516 views

how to get the current location in the map surface - slick 2D

@Override public void mouseMoved(int oldx, int oldy, int newx, int newy) { super.mouseMoved(oldx, oldy, newx, newy); } we can get the mouse location in this method via newx, newy . i want to know ...
0
votes
1answer
362 views

How do I get the current location when using slick 2D library?

I'm developing a map kind of simple game using slick 2D library, and I want to get the current location of the user. When the user runs into a special location (ex: hole) to indicate that is ...
4
votes
3answers
2k views

2D basic map system

i'm currently coding a 2D game in Java, and I would like to have some clues on how-to build this system : the screen is moving on a grander map, for instance, the screen represent 800*600 units on a ...
3
votes
2answers
2k views

How do you structure a 2D level format with collisions etc. in Java (Slick 2D)?

I am developing a game in Java. 2D Fighter, Kind of like the 2d flash game Raze(http://armorgames.com/play/5395/raze). I currently am using the Slick 2D game library and am researching how to ...
5
votes
4answers
334 views

What version of Java should I target for applets?

I recently deployed an applet that seems to require Java 6 Update 24. I assume the reason for this requirement is the matching JDK version I used to create the applet (I am new to Java). The fact ...
1
vote
2answers
1k views

Slick 2D first trial error

I followed some advices to learn Slick2D and when I started doing the "SimpleGame" I got my first error. Does anyone have any idea of what is it and how to fix? Sun Dec 26 23:09:12 GMT-03:00 2010 ...
3
votes
1answer
759 views

Is there any way to get the HWND from a window in LWJGL?

I've started some experimentation in Java and LWJGL (via Slick), and it seems very solid. However, I have some legacy code that requires a HWND integer as a parameter. I'm not sure how I'd be able to ...