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

learn more… | top users | synonyms (1)

-1
votes
1answer
425 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 ...
0
votes
2answers
153 views

Unable to access jar. Why?

I was making a game in java and exported it as jar file. Then after that, I opeed jar splice. I added the libaries and exported jar. I added the natives then i made a main class. I created a fat jar ...
-1
votes
1answer
300 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 ...
2
votes
1answer
772 views

How do I make my Slick2D game fullscreen?

How do I make my game fullscreen? It's always in windowed mode. I'm using Eclipse on a Mac.
-2
votes
2answers
132 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 ...
1
vote
2answers
2k views

Creating maps and tileset for a 2d java game

I'm not a completly beginner to java, so I decided to write a map loader and a tileset loader myself instead of using a tilemap editor like Tiled. I'm using Slick & LWJGL for my game. The plan ...
1
vote
1answer
81 views

Variable Visibility Class Interaction

I have a very general question about how game classes interact with eachother in a growing RPG game project I'm working on. (Writing it in java/Slick2D, not that is matters because the question is ...
0
votes
1answer
104 views

Menu selection wont stay on selected option

My Menu has a START and a QUIT option. I'm using a controller's D-PAD for selection. The game begins with START highlighted. When I push the down button on the D-PAD, it highlights the QUIT option. ...
0
votes
3answers
877 views

How do you make bullets move at an angle in different angles using delta

I'm having trouble making my bullets move at a steady pace using delta. I have the formula I used outside of slick2d, but it doesn't take delta into account. My bullets fly fast. How do I make them go ...
1
vote
3answers
1k views

How to efficiently manage animations and/or textures (resources) in a game?

I am using Java, particularly the Slick2D library. Seeing as this is my first game, I have no idea how I should manage the Animations and the textures in the game in a way to be both memory efficient ...
2
votes
1answer
1k views

How can I accomplish Pokemon-style movement over tiles in java?

I'm talking about where if you press a directional key once you walk over to the adjacent tile and can't do any other actions during the walk. I can get my character to move one tile width, but my ...
1
vote
1answer
219 views

Invert colors Java rendering

I am making a 2d platformer in java using the slick2d engine. I only use 2 colors: black and white. I want to implement a feature were i invert the colors of certain entities. However i can't find a ...
1
vote
1answer
1k views

Vector movement in space type game (Mouse rotation)

I'm having an issue with my movement in my 'game' prototype. It's basically not working and admittedly my knowledge with vectors is lacking. The issue I'm running into is that the ship won't move in ...
2
votes
3answers
154 views

Positioning entities in adjacent maps

Say I have a 2D tile based game engine (I don't, but I will soon). I was wondering how I would manage drawing adjacent maps. That is, imagine we have a map that is 50 by 50 tiles wide. Then next to ...
4
votes
2answers
1k views

How to get smooth transition within slick?

When a player clicks start, my app immediately switches to the first level. My question is how do I incorporate a smooth transition within Slick?
1
vote
1answer
2k views

How do I play background music in Slick/LWJGL?

I'm trying to play music in the background for my opening menu, but cant seem to find a tutorial specifically on how to play a music file. Does anyone know how this can be accomplished?
0
votes
1answer
835 views

Slick2D: Changing an Image's colour to Color.white

I am working on a game where we would like the enemies to flash white when hit by a bullet. Ideally, we would like to use the same mechanism to render an Image in any colour. Our Images are all png ...
2
votes
2answers
338 views

Are my programming methods for java games sufficient

so I'm making a 2d Java game with the slick2d and MarteEngine libraries. This is the biggest project since I made checkers for my Java class. I am still pretty new to programming concepts and using ...
0
votes
1answer
474 views

Java - Finding distance between player and tile in array

What is the best way performance wise to do this? When I click a tile I want it to get the distance and if I am close enough I can interact with the tile. One way would be to find the tile by doing ...
1
vote
5answers
1k views

Collision detection - player gets stuck in platform when jumping

So I'm having some problems with my collision detection with my platformer. Take the image below as an example. When I'm running right I am unable to go through the platform, but when I hold my ...
0
votes
1answer
1k 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
vote
1answer
323 views

Texture switching with a entity system

I'm using thinking of using an entity system in my game. So far I've been using Artemis with success. However, I have a question about texture switching. I read that switching textures too often is ...
1
vote
2answers
1k views

how should I network my turn based game?

I'm writing a very basic turn based strategy game which allows a player to select units and attack enemy units on their turn. The game is written in Java using the slick2d library and I plan to use ...
-2
votes
1answer
171 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 ...
0
votes
2answers
2k views

Pass information between states in slick 2d?

I am making simple game in java using Slick 2d. My question is how many ways of passing information between states are available in Slick 2d. I am having a Hero class that holds all the hero stats and ...
1
vote
2answers
1k views

Dynamically load images inside jar

I'm using Slick2d for a game, and while it runs fine in Eclipse, i'm trying to figure out how to make it work when exported to a runnable .jar. I have it set up to where I load every image located in ...
3
votes
1answer
1k views

With Slick, how to change the resolution during gameplay?

I am developing a tile-based strategy game using Java and the Slick API. So far so good, but I've come to a standstill on my options menu. I have plans for the user to be able to change the ...
3
votes
3answers
3k views

How to render axometric/isometric tiles that are a 2d array in logic, but inclined 45º visually?

I am making a tile-based strategy game which i plan to have 2.5D visuals in an axometric/isometric fashion. Right now i'm programming it's logic and rendering it as a literal 2-dimensional array ...
1
vote
2answers
1k views

Adding a short delay between bullets

I'm having some trouble simulating bullets in my 2D shooter. I want similar mechanics to Megaman, where the user can hold down the shoot button and a continues stream of bullets are fired but with a ...
2
votes
1answer
527 views

How to load chunks of 2d map segments when player reaches a certain point?

In my 2d platformer (made with Java and Slick2d), random maps are made by combining different segments together and displaying them one after the other. My problem is that I can't load too many ...
2
votes
5answers
743 views

Add delay between player jumps

I'm developing a platformer game and have implemented jumping for the player. The player is able to jump, but holding the up arrow causes the player to continuously jump. What would be the best way to ...
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
407 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
953 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
243 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
367 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
765 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
71 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 ...
4
votes
2answers
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
559 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
1k 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
808 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
1k 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
652 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
539 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
2k 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)) { ...