Slick2D is an easy to use set of tools and utilites wrapped around LWJGL OpenGL bindings to make 2D Java game development easier.

learn more… | top users | synonyms

2
votes
1answer
56 views

Java looking in wrong directory for xml

I found this suggestion on stackexchange to print ou where the current directory : File file = new File("."); for(String fileNames : file.list()) System.out.println(fileNames); So basicly ...
0
votes
1answer
44 views

Follow behavior with randomization factor

I'm trying to make enemy follow player as in picture below, the code below is code for following player with steering behavior ( i'm not sure it steering works tho but it does follow player ), how ...
3
votes
0answers
77 views

Dynamic “Light Level” System based on alpha levels

My team and I have been working on a game in Java using the Slick2D engine and there are a few things I have questions on. As of right now, the code that I've written basically takes a cosine function ...
0
votes
0answers
28 views

Getting direction of mouse from the middle - slick2d [duplicate]

I need to find the direction of the mouse from the centerpoint, i need it to return a direction e.g. north, south, northwest, southeast and so on how would one go about doing that in java ps. to ...
2
votes
1answer
55 views

MVC with looping view

For our school project we'd like to develop a game using the MVC pattern. We're all moderate new java programmers and absolutely new in game development. With our current view (containing only menu) ...
0
votes
1answer
55 views

Slick2d Particles loading xml returning null [closed]

I've made a particle class that creates a particle of Slick2d library, but the XML file doesn't want to load , it keeps giving me null error. I gave it the path as I do for everything but it refuses ...
-2
votes
1answer
111 views

Usage of triangulators - Slick2d [closed]

So i need detailed examples how to use one of Slick2ds many triangulators to create a polygon with a hole. Could someone show me code examles of how to use it.
-2
votes
1answer
79 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 ...
-5
votes
1answer
47 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 ...
0
votes
1answer
61 views

Hiding pixels inside a Shape

I have a player wich is a png image and I want a part of him to be able to go behind things, so I need to know how to hide pixels that are inside of a shape
-2
votes
2answers
78 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?
0
votes
1answer
55 views

Java Slick2d particles error [closed]

When i run the game particles crash the game, im not sure what am i doing wrong because the program doesnt tell me. But i know particles are causing this , if i remove the code in update code at ...
3
votes
0answers
81 views

How to debug a runnable jar, when crash doesn't happen in debugger? [migrated]

When I debug the game in eclipse the game works fine. However, when I make runnable jar out of it the game crashes when enemy gets hit, the rest of the game works fine except that part. What do I do, ...
-1
votes
0answers
35 views

Slick2d Network implementation

I have a game which I would like to implement Multiplayer. Basically, PVP, each people have a profile containing Life and other properties. I don't use sprite but I use images and replace it with a ...
-1
votes
0answers
47 views

Rotation method for camera class [closed]

I am in the process of writing a camera class for my game but I'm stuck on how to add a method for rotating the camera. Here's my code so far. package Game; import org.newdawn.slick.Graphics; ...

1 2 3
15 30 50 per page