Ok I only know the basics here and made applets like a bouncing clock, pong and some other beginner things. I'm moving to making 2D tile based games, isometric maps after that, then when I feel comfortable I will start working with 3D. While working on a 2D map I have run into some problems, the keyboard method isn't working and also I'm having a problem with repaint(); in the run method probably caused by something being wrong. I couldn't find any good tutorials on making tile maps in java so I used what I knew and created an ok looking map. So after that im working on just making a yellow square that can move and collide with the walls with the arrow keys. I commented out the repaint(); in run so it will show the map drawn and I don't know whats up with the yellow square 3 down and all the way to the right but it wasn't there before I added the keyboard and run.

Java Code:
import java.applet.*;
import java.awt.*;


public class helloworld extends Applet implements Runnable 

{
	int[][] map = {                                //simple map each square is 16 x 16 pixels might change it to 32
                {1,1,1,1,1,1,1,1,1,1,1,1,1,2,1},  //the height and width is 240 
                {1,0,0,0,0,0,0,0,0,0,0,0,0,4,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {3,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
                {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
   };	
   
   Thread t;     
	int x = 0; // x,y for the array		
	int y = 0;	
	int xmap = 0; // x,y for drawing the array
	int ymap = 0;
	int ldx = 14; // x,y for the last spot the yellow square movd from
	int ldy = 2;
	int guyx = 14; // x,y of the yellow square
	int guyy = 2;
	

	
	public void init()
	{
		t = new Thread(this);
		t.start();
	}
	

	public void run()
	  {
	    while(true)
	    {
	    
		
      if (map[guyy][guyx] == 1) //checks to see if the yellow square hit a wall
      {
      guyx = ldx;
      guyy = ldy;
      }
      map[guyy][guyx] = 4; // changes the current value of the array to 4 for the yellow square to move
      
 //repaint(); 
//the applet only works if this isnt here i suspect its something in the run method

	      try {
	        t.sleep(1000);	        
	      } catch (InterruptedException e) { ; }
	    }
	  }
	  
	  
		// Move the yellow square and handles the keyboard (doesnt work)
	  public void keyPressed(KeyEvent evt) { 

      int key = evt.getKeyCode();
       
      ldx = guyx;
      ldy = guyy; 
            
      if (key == KeyEvent.VK_LEFT) {
        guyx = guyx - 1; 
        
      }
      else if (key == KeyEvent.VK_RIGHT) {
			guyx++;
         
      }
      else if (key == KeyEvent.VK_UP) {
         guyy = guyy - 1;
         
      }
      else if (key == KeyEvent.VK_DOWN) {
         guyy++;
         
      }
      
      if (map[guyy][guyx] == 1)
      {
      guyx = ldx;
      guyy = ldy;
      }
      map[guyy][guyx] = 4;
      repaint();
   }
   
   

	public void paint (Graphics g)
	{
		g.drawString("Ran",10,290); //just says if it ran or not

		
		while (y<=14) //draws out the map and shows how it would look with 16 x 16 sprites but without any
		{
				if (map[y][x] == 0) // grass
				{
					g.setColor(Color.green);
				}
				if (map[y][x] == 1) // wall
				{
					g.setColor(Color.black);
				}
				if (map[y][x] == 2) // start
				{
					g.setColor(Color.red);
				}
				if (map[y][x] == 3) // end
				{
					g.setColor(Color.blue);
				}
				if (map[y][x] == 4) // guy
				{
					g.setColor(Color.yellow);
				}

				g.fillRect(xmap,ymap,16,16);
				x++;
				xmap = xmap + 16;
				
				if (x >= 15)
				{
					x = 0;
					xmap = 0;
					y++;
					ymap = ymap + 16;
				}
		
		}
			
			
			
	}
}