public void initFrame() {
		GridBagLayout frame_layout = new GridBagLayout();

		drawing = new DrawingPanel(640, 480, WORLD_WIDTH, WORLD_HEIGHT, this);
		addKeyListener(this);

		getContentPane().add(drawing);

		side_panel = new JPanel();
		side_hud_panel = new JPanel();
		score_label = new JLabel("Score: " + score);
		mode_label = new JLabel("Mode: " + mode);
		farmed_label = new JLabel("Food: " + resources[ResourceGrid.FOOD]);
		mined_label = new JLabel("Minerals: "
				+ resources[ResourceGrid.MINERALS]);

		side_panel.add(score_label);
		side_panel.add(mode_label);
		side_panel.add(farmed_label);
		side_panel.add(mined_label);
		side_panel.add(side_hud_panel);

		side_debug_panel = new JPanel();
		side_debug_panel.setLayout(new MigLayout("fill, flowY"));

		side_panel.add(side_debug_panel);
		side_panel.setLayout(new MigLayout("fill, flowY"));
		side_hud_panel.setLayout(new MigLayout("fill, flowY"));
		side_debug_panel.setLayout(new MigLayout("fill, flowY"));

		final JRadioButton attract_tower_b = new JRadioButton("Attract tower");
		final JRadioButton avoid_tower_b = new JRadioButton("Avoid tower");
		final JRadioButton resource_grid_b = new JRadioButton("Resource grid");
		final JRadioButton avoid_resources_b = new JRadioButton(
				"Avoid resource");

		ButtonGroup button_group = new ButtonGroup();
		button_group.add(attract_tower_b);
		button_group.add(avoid_tower_b);
		button_group.add(resource_grid_b);
		button_group.add(avoid_resources_b);

		ActionListener button_listener = new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (e.getSource() == attract_tower_b) {
					voxels_to_draw.clear();
					voxels_to_draw.add(attract_tower);
				}
				if (e.getSource() == avoid_tower_b) {
					voxels_to_draw.clear();
					voxels_to_draw.add(avoid_tower);
				}
				if (e.getSource() == resource_grid_b) {
					voxels_to_draw.clear();
					voxels_to_draw.add(resource_grid);
				}
				if (e.getSource() == avoid_resources_b) {
					voxels_to_draw.clear();
					voxels_to_draw.add(resource_grid.avoid_resources);
				}
			}
		};

		attract_tower_b.addActionListener(button_listener);
		avoid_tower_b.addActionListener(button_listener);
		resource_grid_b.addActionListener(button_listener);
		avoid_resources_b.addActionListener(button_listener);

		final JRadioButton tower_b = new JRadioButton("Spawn Tower");
		final JRadioButton zombie_b = new JRadioButton("Spawn Zombie");
		final JRadioButton villager_b = new JRadioButton("Spawn Villager");

		button_group = new ButtonGroup();
		button_group.add(tower_b);
		button_group.add(zombie_b);
		button_group.add(villager_b);
		button_listener = new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (e.getSource() == tower_b) {
					addMode = ADD_TOWER;
				}
				if (e.getSource() == zombie_b) {
					addMode = ADD_ZOMBIE;
				}
				if (e.getSource() == villager_b) {
					addMode = ADD_VILLAGER;
				}
			}
		};

		tower_b.addActionListener(button_listener);
		zombie_b.addActionListener(button_listener);
		villager_b.addActionListener(button_listener);

		final JCheckBox debug_b = new JCheckBox("Debug mode");
		button_listener = new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (debug_b.isSelected()) {
					mode = DEBUG_MODE;
				} else
					mode = NORMAL_MODE;
			}
		};
		debug_b.addActionListener(button_listener);

		side_debug_panel.add(attract_tower_b);
		side_debug_panel.add(avoid_tower_b);
		side_debug_panel.add(resource_grid_b);
		side_debug_panel.add(avoid_resources_b);
		side_debug_panel.add(debug_b);
		side_debug_panel.add(tower_b);
		side_debug_panel.add(zombie_b);
		side_debug_panel.add(villager_b);

		getContentPane().add(side_panel);

		setLayout(frame_layout);
		pack();
		setVisible(true);
	}