Hi there

I'm a beginner in Game development using Java.
At first, I would like to create a simple scroller game in FSEM mode. I own both books "Killer Game Programming in Java" and "Developing Games in Java" and I have also read many articles and forum threads regarding Window/Fullscreen mode in Java2D, Buffer strategy, etc etc.
However I still have many questions.
1) I would like to create a game which switch into FSEM mode if available. A game feature would be the ability to switch between window and FS mode (if available). However many window game examples use a JPanel inside a JFrame using active rendering. In my case (window+FS), I think I don't need any Panel, esp when using BufferStrategy. Only a JFrame would be required. Am I right?
2) When using bufferstrategy, I use a Graphics2D object (in my main JFrame) for the buffer, and I get the graphics context directly from BufferStrategy (also created in the JFrame).
Ex: this = main JFrame
1
| screenBuffer = (Graphics2D)bufferStrategy.getDrawGraphics(); |
Is it the good (or even the best) way?
3) I set the number of buffers to 3 for my strategy whether in window mode or in fullscreen mode :
1 2 3
| createBufferStrategy(3); bufferStrategy = getBufferStrategy(); ... |
In window mode, it would use active rendering and in FSEM it would use page flipping (if available), right? (createBufferStragegy would always choose for the best rendering mode) However, I've noticed I should re-init the BufferStrategy creation after switching from Window mode to FSEM and vice versa :
1 2 3
| (switching to window/FSEM mode) createBufferStrategy(3); bufferStrategy = getBufferStrategy(); |
4) Using setIgnoreRepaint(true). Some examples use the method setIgnoreRepaint() in FSEM mode. Is it really useful (esp when disabling decoration)? What about this method in window mode? I think I shouldn't use this.
5) My last question focuses on images when using BufferStrategy.
I've seen many examples using any of the following classes : Image, ImageIcon, BufferedImage and VolatileImage.
Should I opt for BufferedImage for my sprites, etc (read through ImageIO) in my project (with BufferStrategy)?
Many thanks in advance.
Have a nice day
