-1
votes
0answers
73 views

Are VM-based languages becoming viable for Graphics since the move to GPU computing? [on hold]

Perhaps the title is not the most clear, so let me elaborate it more: I am talking about VM-based languages, by that I mean languages that run on the JVM (java) and for example C#. Also I am talking ...
0
votes
0answers
23 views

java slick2D - problem using ScalableGame class

I have problem adjusting the size of the screen, using the ScalableGame class from Slick2D library. So, what I want to achieve, whenever I change display size, background should adjust to screen ...
5
votes
1answer
131 views

2D Polygon Triangulation

I am creating a game engine using the JBox2D physics engine. It only allows you to create polygon fixtures up to 8 vertices, To create a body with more than 8 vertices, you need to create multiple ...
-1
votes
1answer
36 views

Render white background with Graphics in Canvas

I am developing a game that I would like the background to be white, and it just sticks to being black. Here is my render method: private BufferedImage image = new BufferedImage(WIDTH, HEIGHT, ...
2
votes
2answers
260 views

How to code a Game Grid in Java?

Suppose I wanted to code a game grid in java. Not an abstract text one but an actual grid with graphics and 'cells'. Would I have to draw line by line or is there a more efficient way? Also how would ...
0
votes
0answers
110 views

OpenGL: Attempt to allocate a texture to big for the current hardware

I'm getting the following error: java.io.IOException: Attempt to allocate a texture to big for the current hardware at ...
1
vote
0answers
39 views

How to find the location of JOGL openGL object , after rotation?

I have a rotating object - a cube , here : @Override public void display(GLAutoDrawable gLDrawable) { moveFirstPerson(); checkCameraCollisionWithObject(); final GL gl = ...
2
votes
0answers
95 views

Images out of “sync”

I've been creating a game in Java as a bit of a fun side project over the last few months and I've come across a really peculiar problem, take a look at this image: The game is made up of various ...
-1
votes
1answer
71 views

Anti-Aliasing in Java

In my game I want to have the different anti-aliasing option like: none, x2, x4, x8 and x16. I know that you can use anti-aliasing with Graphics2D in the way below bu is there any way that I can use ...
1
vote
4answers
110 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 ...
1
vote
1answer
262 views

Jogl2 won't accept jogl 1.0 code - GL_LIGHTING and GL_LIGHT_MODEL_AMBIENT cannot be resolved or is not a field?

I'm trying to run my code on jogl 2.0 , for the first time (until now I worked with jogl 1.0) however Eclipse throws to almost every that I have a "cannot be resolved or is not a field" message . ...
2
votes
1answer
110 views

Low FPS on Java drawing in BufferStrategy

I ran into a very strange problem while using BufferStrategy, I've tried searching for an answer but all I have found are non-relevant threads and discussions. So here is my query. for (int i = 0; i ...
4
votes
1answer
452 views

2D Software Lighting Issues in Java

I'm creating a 2D top-down tiled game in pure Java and by now I'm trying to implement a way to do lighting. First, some details on how I render: there is a screen class which handles all the ...
0
votes
0answers
69 views

JFrame on OS X with buffer strategy disables rounded corners

I'm trying to create a simple JFrame window in OS X and render a simple black square on it like so using Graphics2d: public Start() { running = true; window = new JFrame("Finest Hour"); ...
0
votes
1answer
71 views

Which Swing control should I use to render graphics with?

I'm using the Swing UI toolkit in Java, and I want to use the Graphics class to draw images and grids in a control. Which is the most appropriate control for this?
-2
votes
1answer
178 views

Move projectile in direction the gun is facing [duplicate]

Possible Duplicate: Move sprite in the direction it is facing? I am attempting to have a projectile follow the direction a gun is facing. When using the following code I am unable to make ...
0
votes
3answers
696 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 ...
0
votes
0answers
446 views

Fastest way to render 2D shapes on Android OS phones

I'm building a game for Android using Adobe Flash/AIR. The problem is that my game consists of a lot of 2D vector graphics that change every frame, and so cannot be cached as bitmaps. As a result, ...
0
votes
1answer
245 views

Can't remove JPanel from JFrame while adding new class into it

Basically, I have my Frame class, which instantiates all the properties for the JFrame, and draws a JLabel with an image (my title screen). Then I made a separate JPanel with a start button on it, and ...
1
vote
3answers
1k views

Question about JPanel “transition” for Java Swing

I want to make like a sort of main menu (in GUI). When the user clicks the start button, the screen transition into another "screen" (JPanel). This image will make it easier to understand. ...
4
votes
2answers
250 views

Minesweeper: Mouse listener problem

I have wrote a code for game Minesweeper and there is no problem with the graphics,but there is some problems with MouseListener. Here is my code /* * To change this template, choose Tools | ...
1
vote
2answers
1k views

Provide A Scrolling “Camera” View Over A 2D Game Map

I'm in the process of attempting to create a 2D MMO type game with Kryonet and some basic sprites, mostly for my own learning. I have the back end set up great (By my standards) and I'm moving on to ...
1
vote
1answer
430 views

Custom Progress Bar

I have an image that has just letters on it with a transparent background. I was thinking that as my game is loading that these letters could "fill up" with a certain color. So they would start out ...
1
vote
1answer
2k views

Using NinePatch in libGDX for Loading Bar

I am trying to create images for a loading bar in libGDX. I came across the NinePatch class and I was hoping to use it for this loading bar, since stretching images with a plain Texture or Sprite ...
1
vote
1answer
489 views

Polygon Collision Detection Android

I am starting to try and figure out polygon collision detection in my Android game. I am currently doing pixel level collision detection and it just seems to be too slow (though it works). I was ...
1
vote
4answers
1k views

Which Side Was Hit?

I am working on an Android game and I have two objects A and B (both rectangles) and when they collide I simply want to know which side of B was hit. I have detected the collision fine, but I am ...
5
votes
2answers
2k views

How to handle pixel-perfect collision detection with rotation?

Does anyone have any ideas how to go about achieving rotational pixel-perfect collision detection with Bitmaps in Android? Or in general for that matter? I have pixel arrays currently but I don't know ...
0
votes
1answer
746 views

How can I “capture” the section of my sprite sheet that I want to draw in Java?

I'm working on a puzzle game, I've implemented a sprite class that uses an array of images and cycle through the array to draw each frame as required. This works fine! Here's the original code: ...
3
votes
1answer
179 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 ...
2
votes
2answers
2k views

How do I prevent flickering when drawing to a JPanel?

So I have a JFrame holding a JPanel, to which I'm drawing at about 60 FPS. I've been told that "Swing is double buffered by default", but, nevertheless I'm getting massive flickering. At first, I ...

15 30 50 per page