Canvas setting background Image for games/Other Canvas<Solved>

[quote]deltaTime/1e9 * 1000 is the same as deltaTime/1e6.
[/quote]
Ah true XD

Still a bit confused on


public void render() {
       do{
           do{
               Graphics2D g = (Graphics2D)bufferStrategy.getDrawGraphics();
               
               b3.paint(g);
               
               g.dispose();
           }while(bufferStrategy.contentsRestored());
           
           bufferStrategy.show();
       }while(bufferStrategy.contentsLost());
   }

As Opposed to

public void render() {
	   Graphics2D g = (Graphics2D) bufferStrategy.getDrawGraphics();
     g.clearRect(0, 0, WIDTH, HEIGHT);
     b3.paint(g);
     g.dispose();
    bufferStrategy.show();

	     
	    
	}

I thought that clearRect was needed?

Yeah a fillRect or clearRect is needed, unless you already have a background image.

http://docs.oracle.com/javase/6/docs/api/java/awt/image/BufferStrategy.html

Read up on bufferstrategy :slight_smile:

Alright well thanks for all the help on this thread everyone going to tag this thread as solved, hopefully some other forum members can read this thread and learn something new as I did. Anways for now, back to more researching and coding on my game hopefully going to finish the rest of my graphics classes API and implement all the lvls, npcs, battle engine in soon…finally being able to convert my text based RPG into an actualy 2D game is great =).