public Screen() {
		
		long origTime = System.nanoTime();
		
		System.out.println("--------------------------------------------------------------------------------");
		System.out.println("Time start at " + (float) Math.round((System.nanoTime() - origTime) / 1000000) / 1000 + " seconds");
		
		// setting size
		this.setMaximumSize(Frame.panelSize);
		this.setMinimumSize(Frame.panelSize);
		this.setPreferredSize(Frame.panelSize);
		
		// creating tilesets and images
		tileset_ground = new Image[Constants.tilesetLength];
		tileset_air = new Image[Constants.tilesetLength];
		tileset_towers = new Image[Constants.tilesetLength];
		tileset_enemies = new Image[Constants.tilesetLength];
		tileset_projectiles = new Image[Constants.tilesetLength];
		
		for (int i = 0; i < tileset_ground.length; i++) {
			tileset_ground[i] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + "tileset_ground.png")).getImage();
			tileset_ground[i] = createImage(new FilteredImageSource(tileset_ground[i].getSource(), new CropImageFilter(Constants.imageSize * i, 0, Constants.imageSize, Constants.imageSize)));
		}
		for (int i = 0; i < tileset_air.length; i++) {
			tileset_air[i] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + "tileset_air.png")).getImage();
			tileset_air[i] = createImage(new FilteredImageSource(tileset_air[i].getSource(), new CropImageFilter(Constants.imageSize * i, 0, Constants.imageSize, Constants.imageSize)));
		}
		for (int i = 0; i < tileset_towers.length; i++) {
			tileset_towers[i] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + "tileset_towers.png")).getImage();
			tileset_towers[i] = createImage(new FilteredImageSource(tileset_towers[i].getSource(), new CropImageFilter(Constants.imageSize * i, 0, Constants.imageSize, Constants.imageSize)));
		}
		for (int i = 0; i < tileset_enemies.length; i++) {
			tileset_enemies[i] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + "tileset_enemies.png")).getImage();
			tileset_enemies[i] = createImage(new FilteredImageSource(tileset_enemies[i].getSource(), new CropImageFilter(Constants.imageSize * i, 0, Constants.imageSize, Constants.imageSize)));
		}
		for (int i = 0; i < tileset_projectiles.length; i++) {
			tileset_projectiles[i] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + "tileset_projectiles.png")).getImage();
			tileset_projectiles[i] = createImage(new FilteredImageSource(tileset_projectiles[i].getSource(), new CropImageFilter(Constants.projectileImageSize * i, 0, Constants.projectileImageSize, Constants.projectileImageSize)));
		}
		
		tileset_icons = new Image[Constants.tilesetLength];
		tileset_particles = new ArrayList<ArrayList<Image>>();
		
		// index 0 - 19: shop
		tileset_icons[0] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "money.png")).getImage();
		tileset_icons[1] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "lives.png")).getImage();
		tileset_icons[2] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "shop_button.png")).getImage();
		tileset_icons[3] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "shop_button_selected.png")).getImage();
		tileset_icons[4] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "pause_button.png")).getImage();
		tileset_icons[5] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "pause_button_selected.png")).getImage();
		tileset_icons[6] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "play_button.png")).getImage();
		tileset_icons[7] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "play_button_selected.png")).getImage();
		tileset_icons[8] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "fast_forward_button.png")).getImage();
		tileset_icons[9] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "fast_forward_button_selected.png")).getImage();
		tileset_icons[10] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.shopDirectory + "fast_forward_button_pressed.png")).getImage();
		
		// index 20 - 39: menus
		tileset_icons[20] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.menuDirectory + "menu_button.png")).getImage();
		tileset_icons[21] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.menuDirectory + "menu_button_selected.png")).getImage();
		tileset_icons[22] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.menuDirectory + "string_menu.png")).getImage();
		tileset_icons[23] = new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.menuDirectory + "title_menu.png")).getImage();
		
		tileset_particles.add(new ArrayList<Image>());
		int indexTilesetParticles = 0;
		for (int i = 0; i < Constants.explosionFrames; i++) {
			tileset_particles.get(indexTilesetParticles).add(new ImageIcon(this.getClass().getResource(Constants.imageDirectory + Constants.particlesDirectory + "explosion.png")).getImage());
			tileset_particles.get(indexTilesetParticles).set(i, createImage(new FilteredImageSource(tileset_particles.get(indexTilesetParticles).get(i).getSource(), new CropImageFilter(Constants.imageSize * i, 0, Constants.imageSize, Constants.imageSize)))); 
		}
		
		System.out.println("Tilesets created in " + (float) Math.round((System.nanoTime() - origTime) / 1000000) / 1000 + " seconds");
		
		initializeVariables(origTime);
		
		// initializing mouse listeners
		mouse = new Point(0, 0);
		Mouse mouseListeners = new Mouse();
		this.addMouseListener(mouseListeners);
		this.addMouseMotionListener(mouseListeners);
		
		System.out.println("Mouse listeners created in " + (float) Math.round((System.nanoTime() - origTime) / 1000000) / 1000 + " seconds");
		
		//starting game refresh thread
		thread = new Thread(this);
		thread.start();
		
		System.out.println("Thread created in " + (float) Math.round((System.nanoTime() - origTime) / 1000000) / 1000 + " seconds");
		System.out.println("--------------------------------------------------------------------------------");
		
		Thread repaintThread = new Thread(new Runnable() {
			@Override
			public void run() {
				while (true) {
					repaint();
				}
			}
		});
		repaintThread.start();
	}