I'm whipping up a 2D engine for the first time. I've copied my render loop below. What seeking help for here is a better understanding of BufferStrategy and Buffering to an offscreen Image, when they should be employed, and if I'm doing it wrong.

One approach I've read about is reading images into an array of pixels then using a blit method to insert them on a per pixel basis to an offscreen image, then painting the image. I believe I've began preparing for this method below.

Would it be a better idea just to read the image into a BufferedImage and then use the drawImage() method to draw it onto the Graphics of the BufferStrategy? Moreover, when I draw text and lines would I be drawing them onto the offscreenGraphics? or the Graphics of the BufferStrategy?

I'm no expert and I'm sure raking or someone will clarify, but I thought when you used a BufferStrategy, it created your offscreen area for you, and you draw with the 'Graphics g = bs.getDrawGraphics();', and bs.show() will switch the buffer, or blit it to screen. And I think you should just read images into a bufferedimage then draw them with the same 'g' from earlier

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org