I do not think they ban anybody because of bad code. It is hard to ask questions that get approval, though.
Guess the NPE is taken care of, now. Maybe somebody here knows something about the remaining problem.
- We initialize objects now before the thread is started.
- We use a MediaTracker to wait until the images are loaded before we set the Applet to visible and start the main thread.
What does not work is that the logic has already progressed quite a bit when the graphics are rendered for the first time.
Is there a mechanism that would allow us to wait for whatever setVisible does asynchronously to complete?
Waiting (Thread.sleep(...)) after calling setVisible seems to help, so that is why I think that must be the remaining problem.
I tried to react to a COMPONENT_SHOWN ContainerEvent, but I think they are thrown right away when setVisible is called.
Is there any Event that tells us that everything is set up has been rendered successfully once?
Another question: The game is currently an Applet. How different or not is programming graphical apps with the Android SDK?
Is it important to make the transition early or is it pretty similar?