public VGame(String... args) throws InterruptedException {

        this.selected = new ArrayList[10];
        for (int i = 0; i < 10; i++) {
            selected[i] = new ArrayList<VObject>();
        }
        VGraphics.getGraphicManager().removeAllLayers();
        cfg = VFileReader.readCFG(new File(vengine.VEngine.cfg.g("modhome") + "configuration.cfg"));
        for (String param : args) {
            try {
                String[] pr = param.split("=");
                cfg.s(pr[0], pr[1]);
            } catch (Exception e) {

            }
        }

        String v = cfg.g("version");
        List factions = VFileReader.readList(new File(vengine.VEngine.cfg.g("modhome") + v + "/factions.list"));

        String units[] = new File(vengine.VEngine.cfg.g("modhome") + v + "/units").list();
        this.types = new CFG[units.length + 1];
        this.factions = new CFG[factions.size()];
        for (int i = 0; i < units.length; i++) {
            this.types[i] = VFileReader.readCFG(new File(vengine.VEngine.cfg.g("modhome") + v + "/units/" + units[i]));
        }
        CFG player = new CFG();
        player.s("gamename", "VPlayer");
        player.s("processor", "VPlayer");
        this.types[units.length] = player;
        for (int i = 0; i < this.factions.length; i++) {
            this.factions[i] = VFileReader.readCFG(new File(vengine.VEngine.cfg.g("modhome") + v + "/factions/" + factions.get(i) + ".cfg"));
        }
        /*
         Globals gl = new Globals();
         gl.load(new Spawn(this));
         //*/
        new Thread() {

            @Override
            public void run() {
                Scanner s = new Scanner(System.in);
                System.out.println("HScript ready:");
                while (true) {
                    try {
                        System.out.print(">");
                        String prm[] = s.nextLine().split(" ");

                        String cmd = prm[0];
                        String prms[] = new String[prm.length - 1];
                        for (int i = 0; i < prm.length - 1; i++) {
                            prms[i] = prm[i + 1];
                        }
                        command(cmd, prms);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }

        }.start();
        Thread.sleep(2000);
        Random r = new Random();

    }