public void init(){
		mobTextures[0] = Loader.getTexture(ResourceLoader.getResource("res/char/Sci4.png"), 0);
		mobTextures[1] = Loader.getTexture(ResourceLoader.getResource("res/char/Sci3.png"), 0);
		mobTextures[2] = Loader.getTexture(ResourceLoader.getResource("res/char/Sci2.png"), 0);
		mobTextures[3] = Loader.getTexture(ResourceLoader.getResource("res/char/Sci1.png"), 0);
		
		menu = new MainMenu();
		
		
		try {
			Tile.tileIds.add(new BaseTile(0, null, Loader.getTexture(Main.class.getResource("/Stone.png"), 0), false));
			Tile.tileIds.add(new BaseCollidableTile(1, null, Loader.getTexture(Main.class.getResource("/Block.png"), 0), true));
			Tile.tileIds.add(new BaseCollidableTile(2, null, TextureLoader.getTexture("PNG", Main.class.getResourceAsStream("/glass.png")), false));
			Tile.tileIds.add(new BaseCollidableTile(3, null, Loader.getTexture(Main.class.getResource("/glass.png"), 1), false));
			Tile.tileIds.add(new StoneTile(4, null, Loader.getTexture(Main.class.getResource("/StoneWall.png"), 0), true, true));
			Tile.tileIds.add(new StoneTile(5, null, Loader.getTexture(Main.class.getResource("/StoneLength.png"), 0), true, true));
			Tile.tileIds.add(new StoneTile(6, null, Loader.getTexture(Main.class.getResource("/StoneLength.png"), 1), true, true));
			Tile.tileIds.add(new BaseTile(7, null, Loader.getTexture(Main.class.getResource("/dirt.png"), 0), false));
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		map = new World(64, 40, 40);
		map.loadMapFromFile("/map.txt");
		
		new Item(ItemType.HealthUp, Loader.getTexture(Main.class.getResource("/heartup.png"), 0), 2);
		
		try {
			playerTextures[0] = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/char/Char4.png"));
			playerTextures[1] = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/char/Char3.png"));
			playerTextures[2] = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/char/Char2.png"));
			playerTextures[3] = TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream("res/char/Char1.png"));
			
			
			
			map.addPlayer(new Player(new Vector2(256 + 8, 256 + 8), new Colour(1, 1, 1, 1), playerTextures));
			map.addMob(new Enemy(new Vector2(5 * 64, 15 * 64), new Colour(1, 1, 1, 1), mobTextures));
		} catch (IOException e1){
			e1.printStackTrace();
		}
		
		
		shaderProgram = glCreateProgram();
		fragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
		StringBuilder fragmentShaderSource = new StringBuilder();

		try {
			String line;
			BufferedReader reader = new BufferedReader(new FileReader("res/lightshader.fs"));
			while ((line = reader.readLine()) != null) {
				fragmentShaderSource.append(line).append("\n");
			}
			
			reader.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

		glShaderSource(fragmentShader, fragmentShaderSource);
		glCompileShader(fragmentShader);
		if (glGetShaderi(fragmentShader, GL_COMPILE_STATUS) == GL_FALSE) {
			System.err.println("Fragment shader not compiled!");
		}

		glAttachShader(shaderProgram, fragmentShader);
		glLinkProgram(shaderProgram);
		glValidateProgram(shaderProgram);

		
		glMatrixMode(GL_MODELVIEW);
		glLoadIdentity();
		glOrtho(0, WIDTH, HEIGHT, 0, -1, 1);
		glMatrixMode(GL_PROJECTION);
		
		glEnable(GL_STENCIL_TEST);
		glClearColor(0, 0, 0, 0);
		
	}