The Slick2D graphic engine and utility collection is meant to make the development of games using LWJGL easier.
1
vote
1answer
143 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
749 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
138 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
726 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?
0
votes
1answer
971 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
519 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
278 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
290 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
852 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
839 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
265 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
782 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
151 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
932 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
583 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 ...
0
votes
0answers
538 views
Slick 2d scrolling off screen
I have something scrolling in and out of the screen. Now when it goes off screen, I want it to scroll into the screen at another location. What I do is I grab the last pixels at the screens edge using ...
2
votes
1answer
573 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
2k 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
656 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
445 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
529 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 ...
3
votes
1answer
603 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
308 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
667 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
188 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
245 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
393 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
65 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
1k 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
992 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
2answers
2k 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
798 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
428 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 ...
1
vote
2answers
620 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
893 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
495 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
681 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
388 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
1k 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
518 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
1k 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
526 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
307 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
504 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.
0
votes
0answers
312 views
ParticleSystem in Slick2d (with MarteEngine)
First of all, sorry if this sounds very newbie-ish. I'm stuck at making a ParticleSystem I made using Pedigree to work in my game. It's basically an explosion that I want to display whenever an enemy ...
10
votes
3answers
5k 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 ...
6
votes
2answers
1k 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
1k 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
697 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 ...