public void run()
	{
		screen = createVolatileImage(size.width, size.height);	//actually use the graphics card (less lag)
		
		render();
		
		while(isRunning)
		{
			if(!isPaused)
			{
				tick();			//do math and any calculations
				render();		//draw the objects
			}

			try
			{
				Thread.sleep(tickTime);
			}catch(Exception e){ }
		}
	}