public Model() {
		sprites = new ArrayList<Sprite>();
		lights = new ArrayList<Light>();
		rtree = new Rtree(2);
		spectres = new ArrayList<Spectre>();
		
		AnimationSprite splash = new AnimationSprite(-3200, -2400, 1600, 1200, 1, 20, "/data/misc/titlesub.png");
		splash.addFrame("/data/misc/titlesubspace.png");
		sprites.add(splash);
		
		character = new Character(new TextureSprite(0, 0, 30, 30, 10, "/data/char/goodWalk5.png"), "standing");
		
		AnimationSprite walking = new AnimationSprite(0, 0, 30, 30, 10, 2, "/data/char/goodWalk1.png");
		walking.addFrame("/data/char/goodWalk2.png");
		walking.addFrame("/data/char/goodWalk3.png");
		walking.addFrame("/data/char/goodWalk4.png");
		walking.addFrame("/data/char/goodWalk5.png");
		walking.addFrame("/data/char/goodWalk6.png");
		walking.addFrame("/data/char/goodWalk7.png");
		walking.addFrame("/data/char/goodWalk8.png");
		walking.addFrame("/data/char/goodWalk9.png");
		walking.addFrame("/data/char/goodWalk9.png");
		walking.addFrame("/data/char/goodWalk8.png");
		walking.addFrame("/data/char/goodWalk7.png");
		walking.addFrame("/data/char/goodWalk6.png");
		walking.addFrame("/data/char/goodWalk5.png");
		walking.addFrame("/data/char/goodWalk4.png");
		walking.addFrame("/data/char/goodWalk3.png");
		walking.addFrame("/data/char/goodWalk2.png");
		walking.addFrame("/data/char/goodWalk1.png");
		
		character.addSprite(walking, "walking");
		
		sprites.add(character);
		
//		AnimationSprite torch = new AnimationSprite(60, 900, 32, 32, 20, 3, "/data/scenery/torch0.png");
//		torch.addFrame("data/scenery/torch1.png");
//		torch.addFrame("data/scenery/torch2.png");
//		torch.addFrame("data/scenery/torch3.png");
//		torch.addFrame("data/sceSnery/torch2.png");
//		torch.addFrame("data/scenery/torch1.png");
//		
//		sprites.add(torch);
//		
//		TextureSprite bloSod0 = new TextureSprite(90, 880, 32, 32, 1, "/data/scenery/blood2.png");
//		
//		sprites.add(blood0);
		
//		TextureSprite torch = new TextureSprite(60, 900, 32, 32, 10, "/data/scenery/torch0.png");
		chunks = new Chunk[0][0];
		
//		Chunk testChunk = new Chunk(0, 0);
		
//		testChunk.loadChunk("/data/levels/testChunk.png");
//		testChunk.setState(false);
		
//		sprites.add(testChunk);
		
		chunks = new ChunkLoader().loadChunks("/data/chunks/", "chunkData.txt", sprites);
		
		sprites.add(new TextureSprite(14000, 4000, 1600, 1200, 1, "/data/misc/dylan.png"));
		sprites.add(new TextureSprite(6000, 4000, 1600, 1200, 1, "/data/misc/michael.png"));
		sprites.add(new TextureSprite(10000, 4000, 1600, 1200, 1, "/data/misc/lane.png"));
		
		sprites.add(new TextureSprite(-10000, -10000, 800, 800, 1, "/data/misc/scroll1.png"));
		sprites.add(new TextureSprite(-20000, -20000, 800, 800, 1, "/data/misc/scroll2.png"));
//		System.out.println(chunks[0].length * Chunk.CHUNKDIMENSION * Chunk.WALLDIMENSION - 80);
//		character.characterPosition = new Vector3D(50, chunks[0].length * Chunk.CHUNKDIMENSION * Chunk.WALLDIMENSION - 80, 10);
//		character.characterPosition = new Vector3D(32 * 15 + 25 * 15, 14 * 15, 10);
//		Spectre spectre = new Spectre(new TextureSprite(50, chunks[0].length * Chunk.CHUNKDIMENSION * Chunk.WALLDIMENSION - 80, 30, 30, 10, "/data/char/spectre.png"), "default");
//		spectres.add(spectre);
//		sprites.add(spectre);
		
//		System.out.println(chunks[0].length * Chunk.CHUNKDIMENSION * Chunk.WALLDIMENSION - 80);
		character.characterPosition = new Vector3D(50, chunks[0].length * Chunk.CHUNKDIMENSION * Chunk.WALLDIMENSION - 60, 10);
//		character.characterPosition = new Vector3D(32 * 15 + 25 * 15, 14 * 15, 10);
//		character.characterPosition = new Vector3D(1675, 590, 10);

		Light light = new Light();

		light.matSpecular = BufferUtils.createFloatBuffer(4);
		light.matSpecular.put(1.0f).put(1.0f).put(1.0f).put(1.0f).flip();

		light.lightPosition = BufferUtils.createFloatBuffer(4);
		light.lightPosition.put(110.0f).put(110.0f).put(100.0f).put(0.0f).flip();

		light.whiteLight = BufferUtils.createFloatBuffer(4);
		light.whiteLight.put(1.0f).put(1.0f).put(1.0f).put(1.0f).flip();

		light.lModelAmbient = BufferUtils.createFloatBuffer(4);
		light.lModelAmbient.put(0.5f).put(0.5f).put(0.5f).put(1.0f).flip();

		lights.add(light);
		
		/*
		 * Load audio files and play initial music
		 * 
		 * The following is a non-comprehensive list of ways to load audio files and the corresponding method that plays them
		 * 
		 * AudioLoader.getAudio("OGG", ResourceLoader.getResourceAsStream("file.ogg")); => playAsSoundEffect(1.0f, 1.0f, false);
		 * AudioLoader.getStreamingAudio("OGG", ResourceLoader.getResource("file.ogg")); => oggStream.playAsMusic(1.0f, 1.0f, true);
		 * 
		 * AudioLoader.getAudio("WAV", ResourceLoader.getResourceAsStream("file.wav")); => wavEffect.playAsSoundEffect(1.0f, 1.0f, false);
		 * 
		 */
		try {
			background = AudioLoader.getAudio("OGG", ResourceLoader.getResourceAsStream("/data/audio/effects/bang-1.ogg"));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		background.playAsSoundEffect(1.0f, 1.0f, false);
	}