-3
votes
1answer
33 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?
1
vote
1answer
315 views

How do I combine images into a single entity in libgdx?

I've googled this but can't seem to find anything on "concatenating" two images, especially with libgdx. Any ideas?
0
votes
2answers
295 views

How do I add an image inside a rectangle or a circle in JavaFX?

Suppose we have a rectangle called r Rectangle r = new Rectangle(40, 20); and an image called image Image image = new Image("...src for image"); How do I fit the image inside the rectangle? ...
-2
votes
1answer
272 views

Cannot instantiate the type Image java?

public Image images[] = new Image[20]; for(i=0; i<10; i++){ images[i]=new Image(getClass().getResource("/images/"+i+".jpg")); } I am trying to add images to array but it gives the ...
1
vote
4answers
266 views

Changing color of a moving image without lowering the fps

I just added an option to my game that makes it so that all the enemies will have a random color for their clothes instead of the regular blue. I use this code to draw rectangles over the shirt of the ...
0
votes
1answer
558 views

How do I programmatically remove an image's background color?

I have a sprite sheet (image) and want to draw it on screen. image = sprite sheet image x = player x position y = player y position width = player width height = player height public ...
1
vote
2answers
788 views

Why cant I use slick-util with image IO and bufferedImage

My problem is that I get errors when I use texture = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("TEXTURE PATH HERE")); it gives me these errors: Exception in thread "main" ...
4
votes
4answers
495 views

Can a high FPS negatively affect how a program runs?

Yeah I know this is a broad question and will get down rated, I'm just hoping for some answer before it gets closed. Anyway, I'm using Slick 2D/Java to play around with graphics. I'm having some ...
-1
votes
1answer
606 views

How do I increase the size of a buffered image to the left and upwards?

I need to know how to increase the size of my buffered image to the left and up, not just the right and down. bI = new BufferedImage(yMax*size*5, xMax*size*5, BufferedImage.TYPE_INT_RGB);
0
votes
1answer
333 views

How to select an image on the J2ME Canvas

I am working on J2ME. I have got a canvas, with a layout of a Checkers board. At the position of pieces, I have placed images. The point at which I got stuck is, how to select/highlite a piece's image ...
1
vote
2answers
2k 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 ...
2
votes
1answer
670 views

How can I resize a set of sprite images?

Hey StackExchange GameDev community, I'm attempting to resize series of sprites upon instantiation of the class they're located in. I've attempted to use the following code to resize the images, ...
1
vote
1answer
710 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
1answer
2k views

Moving an image by rotating and increasing y axis causes a trailing issue

Forgive me if me anything is unclear, this is a tricky thing for me to explain. In an applet I draw a little ship gif. I have it so I can rotate the object and then increase or decrease the y axis to ...
3
votes
1answer
192 views

Can I use one set of images to represent multiple sprites in Java?

I've got a game that has 3 basic sprites, at the moment I'm loading 8 images into each sprite for animating. Each character class has a sprite object. if I've got 10 characters on screen at once ...