The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
62 views

When handling key input, I'm getting a negative timeout value in my thread. What's going on?

So I'm programming a game using Swing and AWT and I'm getting a weird error. As I check for input in my MenuState, which is just my Menu screen, it is telling me that the timeout value in my game ...
3
votes
1answer
83 views

2D Map Editor Tiles Palette - Best suited Java Elements to use?

I'm making a 2D RTS Map Editor and here came the moment to make a Palette which is just a popup frame showing tiles to be clicked on and then applied on the map. I'm wondering which Java Elements to ...
0
votes
0answers
31 views

Controlling when a Java game repaints

I've been learning how to program game loops lately and the issue I'm running into at the moment is figuring out how to repaint my window only when I tell it to. I suspect that my issue is not fully ...
1
vote
0answers
81 views

How to create 2D cameras in swing?

What is the best way to create a camera for a 2D platformer using swing, and I want to create a camera that moves instead of moving the background. This is because I'm going to have objects rotated by ...
2
votes
2answers
284 views

Swing GUI for games (performance) [closed]

I'm developing a game in Slick2D and I'm trying to make GUI. I've already tried TWL library, but it seems to me a bit complicated and it doesn't cover what I need. In my own implementation of GUI ...
1
vote
3answers
385 views

Java 2D Game Hitbox Detection & Rounded Corners

I am working on a simple 2D game with Java, swing and no framework. I have a rectangular player that the user can move around. On the map are few obstacles which the player should not be able to go ...
0
votes
0answers
72 views

In Java swing, while handling a 2D top down game, how should I handle scaling for quality transformations (mainly screen rotation)

For my top down game, I plan to have screen rotation where entities don't rotate, but everything else does. I am using a raster array to store my image so I don't have to render things stacked on each ...
2
votes
2answers
280 views

How does rendering with Swing compare to rendering with openGL?

[summary: Is the performance of Swing at least in the same dimension as openGL [through LWJGL]? If yes, what percentage would you give it? What possible other problems can I expect from Swing in the ...
1
vote
1answer
305 views

Swing for game development - regarding threads

For those of you who use Swing to develop their real-time Java games. (Meanign a game that constantly updates game state and redraws the screen using a constant loop). As I see it, there are three ...
0
votes
1answer
951 views

How do I double-buffer renders to a JPanel?

I'm trying to make a little breakout game with Java and Swing. The only issue so far is that drawing on the JPanel causes lots of flickering! The relevant code: JFrame frame = new ...
5
votes
1answer
3k views

Smooth movement in a tile based game

How can we make our character move smoothly across tiles? He moves tile by tile, but that looks unprofessional. In addition, when you hold down the arrow keys he zips across the screen. How can we ...
2
votes
2answers
486 views

fast java2d translucency

I'm trying to draw a bunch of translucent circles on a Swing JComponent. This isn't exactly fast, and I was wondering if there is a way to speed it up. My custom JComponent has the following ...
1
vote
1answer
801 views

I'm not sure why my shape is not moving

So I am trying to teach my self how to my develop games with java by cloning older games. At the moment I am cloning Pong, and I can not figure out why my paddle is not moving. The move method should ...
0
votes
1answer
1k views

How to detect whether my Java application is active?

I want to pause my game (written in Java Swing), when the player switches to another application. But I did not find a way to detect this switch. window.isActive() only works for multiple windows ...
1
vote
2answers
2k views

How to create a main menu using java swing

I have been trying to figure out for quite some time on how to create a basic main menu for a game that just has a couple clickable labels, but I don't know how to write them. I have created a class ...
0
votes
1answer
535 views

Java Game Interface [closed]

I started making a game (mostly the interface, buttons, panels, components.. etc) and I have been using Swing to make the different components. But I have read that Swing is not good for creating game ...
4
votes
3answers
14k views

Java - Best Implementation KeyListener For Games

I am working on a game using only the swing and awt packages. Note I can only use the default Java libs. Meaning I have to use KeyListener. I have imported KeyListener properly, however, it is still ...
1
vote
2answers
218 views

Calling opengl32.DLL from java?

I don't like LWJGL in some cases, so I prefer to use Swing. The thing is that Swing doesn't have OpenGL. I have tried JOGL and it's a mess to install, needs external jars, and I have yet to get it ...
0
votes
1answer
152 views

Are there shaders or at least shader like things in Swing?

Is there? Because I'm wondering if it supports GLSL, HLSL, or it's own shading language? I don't know much about Swing graphics. Does anyone know?
0
votes
1answer
1k views

Tile Maps in Java JFrame Game

I am making a 2D Java game with Java's own drawing library. I was wondering how I would make a tile map display on the screen. I would prefer to use a GUI application to make the maps. I'm looking for ...
-3
votes
4answers
3k views

Making Video Games In pure Java, where to go? [closed]

I have been programing for about a year now, and have a very good grasp on all the basic of programming in generaly and am a pretty decent Java programmer, so now that I have the time I would like to ...
0
votes
1answer
99 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?
0
votes
5answers
804 views

Does Java support OpenGL by itself?

Note: This is long but I explaining everything that you need to know. Don't read half way through it and say "What's the question?". It's simple but long and I need help as soon as possible. So I ...
2
votes
1answer
670 views

Is jButton in Java suitable for a Game GUI?

Recently I have encountered the issue of trying to add a GUI into my game using Swing. The game will randomly & infrequently flash the jButton or Swing component when I add it to my jFrame. I'm ...
-1
votes
1answer
675 views

Animation Trouble with Java Swing Timer - Also, JFrame Will Not Exit_On_Close [closed]

So, I am using a Java Swing Timer because putting the animation code in a run() method of a Thread subclass caused an insane amount of flickering that is really a terrible experience for any video ...
1
vote
2answers
1k views

keyPressed is not working after adding ActionListener to JButton

I have a serious problem while trying to build a menu for my game. I've added two JButton to a main JPanel and added an ActionListener for each of them. The main JPanel also contains the game JPanel ...
0
votes
2answers
1k views

Rendering another screen on top of main game screen in fullscreen mode

my game runs in fullscreen mode and uses active rendering. The graphics are drawn on the fullscreen window in each game loop: public void render() { Window w = ...