@Override
	public void actionPerformed(ActionEvent e)
	{
		Object source = e.getSource();
		if (source == m_timer)
		{
			//on each tick, update all objects
			m_currentTime = System.currentTimeMillis();
			double timeDelta = m_currentTime - m_prevTime;
			Update(timeDelta);
			ProcessInput();
			m_prevTime = m_currentTime;

			//but only draw the game at 30 FPS because the human eye sees things at about 28 hertz - any faster than 30 FPS would slow the game down with no benefit
			m_drawingCountdown -= timeDelta;
			if (m_drawingCountdown <= 0.0)
			{
				m_drawingCountdown = DRAWING_TIME;
				if (m_buffer == null)
					m_buffer = this.createImage(m_bufferWidth, m_bufferHeight);
	
				if (m_buffer != null)
				{
					//render on a backbuffer, then draw the backbuffer to the background of the form
					Graphics2D graphics = (Graphics2D)m_buffer.getGraphics();
					Render(graphics);
					this.getGraphics().drawImage(m_buffer, 0, 0, this.getContentPane().getWidth(), this.getContentPane().getHeight(), null);
					
					//clear the backbuffer afterwards
					graphics.setColor(BG_COLOR);
					graphics.fillRect(0, 0, m_bufferWidth, m_bufferHeight);
				}
			}
		}
	}