Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

0 votes
0 answers
61 views

Java UI Rendering Model using Threads. Volatile vs Synchronized Block for the InputState

The issue. The UI Thread processes Key/Pointer events and write them in a class named InputState. The Rendering thread reads from the InputState and updates its state continuously. I see 3 ...
Mordan's user avatar
  • 337
3 votes
2 answers
175 views

10 threads painting on one JPanel

I've got some problems while learning threads in Java. The goal is to make a simulation that shows us how rabbits are running from wolves on some kind of board. Every wolf and every rabbit should be a ...
ŁukaszG's user avatar
  • 624
1 vote
2 answers
2k views

Separate logic and rendering threads?

I have heard some people advising the separation of logic and rendering into different threads when making games. Apparently, while rendering needs to happen at ~60fps, logic may only need to happen ...
Dan's user avatar
  • 1,258
-2 votes
1 answer
87 views

Can someone help me understand line for line what is going on in the render method of this code? [closed]

I also don't entirely understand what volatile and synchronized modifiers do. but basically this is supposed to be well the beginnings of a game that im learning from a youtube series and all it does ...
XSoloDolo's user avatar
1 vote
1 answer
213 views

Java rendering a game map in a SwingWorker does not work properly

I am currently developing a game which requires a grid-like map being drawn on a JPanel (or other container). To achieve this in a reasonable amount of time and to keep my UI responsive i pass the ...
Exevan's user avatar
  • 345
2 votes
1 answer
149 views

Does anyone have an example of drawing an object outside the renderer class?

I'm learning OpenGL ES for android, but i'm a tiny bit confused. In the examples I've seen the drawing of an object, let's say a square is done in the renderer via: public class MainRender ...
cody's user avatar
  • 755
0 votes
1 answer
823 views

Android concurrent renderer design

I'm currently writing a game on Android using a design inspired by Replica Island. That is, a dual thread approach, one logic thread and one render thread. I have this set up with a lightweight ...
alexanderblom's user avatar
11 votes
2 answers
12k views

JTextFields on top of active drawing on JPanel, threading problems

Has anyone ever tried to use Swing to construct a proper multi-buffered rendering environment on top of which Swing user interface elements can be added? In this case I have an animating red ...
Mattijs's user avatar
  • 1,930