private void initEntities() {

		// setup level data
		switch (level) {
		case 1:
			bg = ResourceFactory.get().getSprite("sprites/152.gif");
			bgmref = "sounds/The Terminator (1984) Theme.wav";
			break;
		case 2:
			bg = ResourceFactory.get().getSprite("sprites/152.gif");
			bgmref = "sounds/The Terminator (1984) Theme.wav";
			break;
		case 3:
			bg = ResourceFactory.get().getSprite("sprites/152.gif");
			bgmref = "sounds/The Terminator (1984) Theme.wav";
			break;
		case 4:
			bg = ResourceFactory.get().getSprite("sprites/152.gif");
			bgmref = "sounds/The Terminator (1984) Theme.wav";
			break;
		case 5:
			bg = ResourceFactory.get().getSprite("sprites/bg2.gif");
			bgmref = "sounds/Filter & The Crystal Method - (Can't You) Trip Like I Do [Official Video] - DASH.WAV";
			break;
		default:
			bg = ResourceFactory.get().getSprite("sprites/bg2.gif");
			bgmref = "sounds/Filter & The Crystal Method - (Can't You) Trip Like I Do [Official Video] - DASH.WAV";
			break;
		}
		// fill the screen
		for (int i = 1; i <= (int)(height/bg.getHeight()+2); i++)
			for (int j = 0; j < (int)(width/bg.getWidth()+1); j++)
				backgroundEntities.add(new GlobalEntity(this, bg, bg.getWidth()*j, height - bg.getHeight()*i));
		// bricks, walls...
		GlobalEntity b = new GlobalEntity(this, "sprites/brick.gif", 340, 50);
		b.setVerticalMovement(30);
		entities.add(b);
		// arrange enemies
		alienCount = 0;
		for (int x=0;x<10;x++){
			entities.add(new AlienEntity(this,100+(x*50),30));
			alienCount++;
			for (int y=0;y<level;y++){			
				Entity alieny = new AlienEntity(this,100+(x*50),(50*y)+30);
				entities.add(alieny);
				alienCount++;
			}
		}

		// create the player ship and place it roughly in the center of the screen
		ship = new ShipEntity(this,"sprites/ship.gif",0,0);
		ship.x = width/2-ship.getSprite().getWidth()/2;
		ship.y = height-ship.getSprite().getHeight()-5;
		entities.add(ship);
	}