int main() {
    bool test = false, simulateBathy = false;

    if (test) {
        runTests();
        return 0;
    }

    acousticParams.insert({ "debug", "0" });

    acousticParams.insert({ "cellSize", "5" });
    acousticParams.insert({ "fishmodel", "0" });
    acousticParams.insert({ "suppressionRangeFactor", "1"}),
    acousticParams.insert({ "suppressionMethod", "suppression.quick"}),
    acousticParams.insert({ "userSensors", "100,100,0,0,100,0,0,200" });
    acousticParams.insert({ "numOptimalSensors", "10" });
    acousticParams.insert({ "numProjectedSensors", "2" });
    acousticParams.insert({ "bias", "2" });

    acousticParams.insert({ "ousdx", ".1" });
    acousticParams.insert({ "ousdy", ".1" });
    acousticParams.insert({ "oucor", "0" });
    acousticParams.insert({ "mux", ".5" });
    acousticParams.insert({ "muy", ".5" });
    acousticParams.insert({ "fishmodel", "1" });
    acousticParams.insert({ "minDepth", "15" });
    acousticParams.insert({ "maxDepth", "30" });
    acousticParams.insert({ "meanRelativePosition", "1" });
    acousticParams.insert({ "relativePositionSD", "1" });
    // acousticParams.insert({"inputFile", "himbsyn.bathy.v19.grd"});
    acousticParams.insert({"inputFile", "himbsyn.bathytopo.1km.v19.grd"});
    // acousticParams.insert({ "inputFile", "pal_5m.asc" });
    acousticParams.insert({ "inputFileType", "netcdf" });
    acousticParams.insert({ "seriesName", "z" });
    acousticParams.insert({ "timestamp", "-1" });
    acousticParams.insert({ "logScaleGraphColoring", "1" });
    acousticParams.insert({ "contourDepths", "0,-20,-40,-80" });
    double suppressionRangeFactor =
                       std::stod(acousticParams["suppressionRangeFactor"]),
           ousdx     = std::stod(acousticParams["ousdx"]),
           ousdy     = std::stod(acousticParams["ousdy"]),
           oucor     = std::stod(acousticParams["oucor"]),
           mux       = std::stod(acousticParams["mux"]),
           muy       = std::stod(acousticParams["muy"]),
           fishmodel = std::stod(acousticParams["fishmodel"]),
           networkSparsity = 0, absRecoveryRate = 0, uniqueRecoveryRate = 0,
           goodnessGridComputationTime = 0, totalComputationTime = 0;

    int    startRow = 450,
           startCol = 340,  // 450,340,201,201 (1km)netcdf
           rowDist = 1001,   // 100 0 800 1500 (5m)netcdf
           colDist = 1001,   // 300 200 501 501 (palmyra) asc
           height = 1000,
           width = 1000,
           bias = 2,
           sensorDetectionRange = 4,
           sensorDetectionDiameter = 2 * sensorDetectionRange + 1,
           sensorPeakDetectionProbability = 1,
           SDofSensorDetectionRange = 1,
           i = 0,
           row = 0,
           col = 0,
           cellSize = std::stoi(acousticParams["cellSize"]),
           numOptimalSensors =
                   std::stoi(acousticParams["numOptimalSensors"]),
           numProjectedSensors =
                   std::stoi(acousticParams["numProjectedSensors"]),
           numSensorsToPlace = numOptimalSensors + numProjectedSensors,
           suppressionDiameter = (2 * ceil(sensorDetectionRange * suppressionRangeFactor)) + 1;
    // Set the global border size
    border = sensorDetectionRange;
    omp_set_num_threads(numThreads);
    Eigen::setNbThreads(numThreads);
    clock_t begin, end, vizBegin, vizEnd;




    // TODO(Greg) Data validation
    // Parse User Sensor Placements
    std::cout << "\nReading userSensor List...\n";
    std::vector<std::string> userSensors;
    parseCDString(&userSensors, acousticParams["userSensors"], ',');
    Eigen::MatrixXd userSensorList;
    userSensorList.resize(userSensors.size()/2, 4);
    for (i = 0; i < userSensorList.rows(); i ++) {
        row = std::stoi(userSensors[2 * i]);
        col = std::stoi(userSensors[2 * i + 1]);
        if (row < 0 || col < 0 || row >= rowDist || col >= colDist) {
            printError("A user-defined sensor is out of bounds.", 1,
                       acousticParams["timestamp"]);
        }
        // Translate user points to our internal grid
        userSensorList(i, 0) = row;
        userSensorList(i, 1) = col;
    }


    begin = clock();

    // Compute contour depth meta data (used for graphical output)
    std::vector<std::string> contourLevels;
    parseCDString(&contourLevels, acousticParams["contourDepths"], ',');
    // Note the number of contours we need to graph
    acousticParams.insert({ "numContourDepths",
                            std::to_string(contourLevels.size()) });

    // TODO(Greg) Sort is broken, throws segfaults.  Possibly b/c file doesn't
    //   exist (tried with pal5m.asc).  fix plx.
    // sort(&contourLevels, &contourLevels + numContourDepths);

    // File path variables
    std::string outputDataFilePath = "data/", outputDataFileType = ".dat",
           bathymetryTitle = "Topography", habitatTitle = "Habitat",
           goodnessTitle = "Goodness",
           coverageTitle = "Acoustic Coverage",
           bathymetryFilePath = outputDataFilePath + bathymetryTitle +
                                outputDataFileType,
           habitatFilePath    = outputDataFilePath + habitatTitle +
                                outputDataFileType,
           goodnessFilePath   = outputDataFilePath + goodnessTitle +
                                outputDataFileType,
           coverageFilePath   = outputDataFilePath + coverageTitle +
                                outputDataFileType;

    Grid bGrid(rowDist + 2 * border, colDist + 2 * border, "Behavior");
    Grid gGrid(rowDist + 2 * border, colDist + 2 * border, "Goodness");
    Grid tGrid(rowDist + 2 * border, colDist + 2 * border, "Topography");
    Grid cGrid(rowDist + 2 * border, colDist + 2 * border, "Coverage");

    Eigen::MatrixXd suppressionReference;
    Eigen::MatrixXd distanceGradient;
    Eigen::MatrixXd detectionGradient;
    distanceGradient.resize(sensorDetectionDiameter, sensorDetectionDiameter);
    distanceGradient.setConstant(0);
    detectionGradient.resize(sensorDetectionDiameter, sensorDetectionDiameter);
    detectionGradient.setConstant(0);
    // Create a gradient of distances to avoid redundant computation
    makeDistGradient(&distanceGradient, sensorDetectionRange);
    // Create a gradient of probability of detection (due to sensorRange) to
    // avoid redundant computation
    makeDetectionGradient(&detectionGradient, & distanceGradient,
                   sensorPeakDetectionProbability, SDofSensorDetectionRange);

    // Fetch or simulate topography
    std::cout << "Getting topography...";
    if (simulateBathy) {
        // Simulate topography
        simulatetopographyGrid(&tGrid, rowDist, colDist);
    } else {
        // Fetch actual topography
        getBathy(&tGrid, acousticParams["inputFile"],
                 acousticParams["inputFileType"], size_t(startRow),
                 size_t(startCol), size_t(rowDist), size_t(colDist),
                 acousticParams["seriesName"], acousticParams["timestamp"]);
    }
    std::cout << bGrid.data;
    // Fill in Behavior Grid
    std::cout << "\nGetting Behavior...";
    populateBehaviorGrid(&tGrid, &bGrid, bias, cellSize, ousdx, ousdy, oucor, mux,
                         muy, fishmodel);

    // Initalize the Coverage Grid
    cGrid.data.block(border, border, rowDist, colDist).setConstant(1);

    // Mr. Gaeta, START THE CLOCK!
    vizBegin = clock();
    std::cout << "\nGetting Goodness...\nBias: " << bias << "\n";
    // Calculate good sensor locations
    calculateGoodnessGrid(&tGrid, &bGrid, &gGrid, &suppressionReference,
                        &detectionGradient, &distanceGradient, bias,
                        sensorDetectionRange, border, border,
                        rowDist, colDist);
    vizEnd = clock();
    goodnessGridComputationTime =
            static_cast<double>(end - begin) / CLOCKS_PER_SEC;
    std::cout << "Copying goodness grid...\n";
    Grid UGGrid(&gGrid, "Unsuppressed Goodness");

    // Find optimal placements
    std::cout << "\nPlacing Sensors...\n";
    Eigen::MatrixXd bestSensors;
    bestSensors.resize(numSensorsToPlace, 4);


    //============================
    gGrid.name = "x1";
    Graph x1Graph = Graph(&gGrid);
    x1Graph.writeMat();

    // Grab the top n sensor r,c locations and recovery rates.
    selectTopSensorLocations(&tGrid, &bGrid, &gGrid, &UGGrid,
                   &bestSensors, &userSensorList, &suppressionReference,
                   &detectionGradient, &distanceGradient,
                   numSensorsToPlace,
                   sensorDetectionRange, bias, suppressionRangeFactor,
                   suppressionDiameter, sensorPeakDetectionProbability,
                   SDofSensorDetectionRange, acousticParams["timestamp"]);

    gGrid.name = "x2";
    Graph x2Graph = Graph(&gGrid);
    x2Graph.writeMat();
    std::cout << bestSensors << "\n";

    std::cout << "Computing Statistics...\n";
    getStats(&UGGrid, &gGrid, &bestSensors, sensorDetectionRange, &networkSparsity,
              &absRecoveryRate, &uniqueRecoveryRate, &cGrid);

    gGrid.name = "x3";
    Graph x3Graph = Graph(&gGrid);
    x3Graph.writeMat();
    gGrid.name = "Goodness";
    // Generate graphs
    std::cout<< "\nWriting Graphs...";
    Graph gGraph = Graph(&UGGrid);
    Graph tGraph = Graph(&tGrid);
    Graph bGraph = Graph(&bGrid);
    Graph cGraph = Graph(&cGrid);
    try {
        // Print the matrix & data files for Topography Grid
        tGraph.writeMat();
        tGraph.writeDat();
        // Print the contour file used by all graphs.
        //     (Do this just once as it takes a loooong time).
        tGraph.printContourFile(&contourLevels);
        // Graph the Topography Grid with contour lines.
        bool plotSensors = true;
        tGraph.printContourGraph(width, height, &contourLevels, plotSensors,
                                 &userSensorList, &bestSensors,
                                 numProjectedSensors, false);

        // Print the matrix & data files for Bathymetry Grid
        bGraph.writeMat();
        bGraph.writeDat();
        // Graph Behavior Grid with contour lines.
        bGraph.printContourGraph(width, height, &contourLevels, plotSensors,
                                 &userSensorList, &bestSensors,
                                 numProjectedSensors, false);

        // Print the matrix & data files for Goodness Grid
        gGraph.writeMat();
        gGraph.writeDat();
        // Graph Goodness Grid with contour lines.
        gGraph.printContourGraph(width, height, &contourLevels, plotSensors,
                                 &userSensorList, &bestSensors,
                                 numProjectedSensors, false);

        // Print the matrix & data files for Goodness Grid
        cGraph.writeMat();
        cGraph.writeDat();
        // Graph Goodness Grid with contour lines.
        cGraph.printContourGraph(width, height, &contourLevels, plotSensors,
                                 &userSensorList, &bestSensors,
                                 numProjectedSensors, false);
    } catch (int e) {
        std::cout << "Error:" << e << "\n";
        return 0;
    }
    end = clock();
    goodnessGridComputationTime =
            static_cast<double>(vizEnd - vizBegin) / CLOCKS_PER_SEC;
    std::cout << "\nVisibility calculation took " <<
            goodnessGridComputationTime << " s";
    totalComputationTime = static_cast<double>(end - begin) / CLOCKS_PER_SEC;
    std::cout << "\nEntire Run took " << totalComputationTime << " s";

    return 0;
}
示例#2
0
int main(int argc, char *argv[]) {

	namespace po = boost::program_options;

	char * chTraxDir = getenv("TRAX_DIR");
	if ( chTraxDir == nullptr ) {
		std::cout << "TRAX_DIR not set" << std::endl;
		exit(1);
	}
	g_traxDir = chTraxDir;

	ExecutionParameters exec;
	EventDataLoadingParameters loader;
	GridConfig grid;

	std::string testSuiteFile;

	po::options_description cLoader("Config File: Event Data Loading Options");
	cLoader.add_options()
		("data.edSrc", po::value<std::string>(&loader.eventDataFile), "event database")
		("data.skipEvents", po::value<uint>(&loader.skipEvents)->default_value(0), "events to skip, default: 0")
		("data.maxEvents", po::value<int>(&loader.maxEvents)->default_value(1), "number of events to process, all events: -1")
		("data.minPt", po::value<float>(&loader.minPt)->default_value(1.0), "MC data only: minimum track Pt")
		("data.tracks", po::value<int>(&loader.maxTracks)->default_value(-1), "MC data only: number of valid tracks to load, all tracks: -1")
		("data.onlyTracks", po::value<bool>(&loader.onlyTracks)->default_value(true), "MC data only: load only tracks with hits in each layer")
		("data.eventLoader", po::value<std::string>(&loader.eventLoader)->default_value("standard"),
				"specify event loader: \"standard\" for PEventContainer (default); \"store\" for EventStore; \"repeated\" for performance measurements")
	;

	po::options_description cExec("Config File: Execution Options");
	cExec.add_options()
		("exec.threads", po::value<uint>(&exec.threads)->default_value(256), "number of work-items in one work-group")
		("exec.eventGrouping", po::value<uint>(&exec.eventGrouping)->default_value(1), "number of concurrently processed events")
		("exec.useCPU", po::value<bool>(&exec.useCPU)->default_value(false)->zero_tokens(), "force using CPU instead of GPGPU")
		("exec.iterations", po::value<uint>(&exec.iterations)->default_value(1), "number of iterations for performance evaluation")
		("exec.layerTripletConfig", po::value<std::string>(&exec.layerTripletConfigFile), "configuration file for layer triplets")
		("exec.layerTriplets", po::value<int>(&exec.layerTriplets)->default_value(-1), "number of layer triplets to load, default all: -1")
	;

	po::options_description cGrid("Config File: Grid Options");
	cGrid.add_options()
		("grid.nSectorsZ", po::value<uint>(&grid.nSectorsZ)->default_value(50), "number of grid cells in z dimension")
		("grid.nSectorsPhi", po::value<uint>(&grid.nSectorsPhi)->default_value(8), "number of grid cells in phi dimension")
	;

	po::options_description cCommandLine("Command Line Options");
	cCommandLine.add_options()
		("config", po::value<std::string>(&exec.configFile), "configuration file")
		("help", "produce help message")
		("silent", "supress all messages from TripletFinder")
		("verbose", "elaborate information")
		("prolix", "prolix output -- degrades performance as data is transferred from device")
		("live", "live output -- degrades performance")
		("cpu", "force running on cpu")
		("testSuite", po::value<std::string>(&testSuiteFile), "specify a file defining test cases to be run")
	;

	po::variables_map vm;
	po::store(po::parse_command_line(argc,argv,cCommandLine), vm);
	po::notify(vm);

	if(vm.count("help")){
		std::cout << cCommandLine << cExec << cGrid << cLoader << std::endl;
		return 1;
	}

	if(vm.count("config")){
		ifstream ifs(g_traxDir + "/configs/" + getFilename(exec.configFile));
		if (!ifs)
		{
			cerr << "can not open config file: " << exec.configFile << "\n";
			return 0;
		}
		else
		{
			po::options_description cConfigFile;
			cConfigFile.add(cLoader);
			cConfigFile.add(cExec);
			cConfigFile.add(cGrid);
			store(parse_config_file(ifs, cConfigFile), vm);
			notify(vm);
			ifs.close();
		}
	} else {
		cerr << "No config file specified!" <<std::endl;
		return 1;
	}

	//define verbosity level
	exec.verbosity = Logger::cNORMAL;
	if(vm.count("silent"))
		exec.verbosity = Logger::cSILENT;
	if(vm.count("verbose"))
		exec.verbosity = Logger::cVERBOSE;
	if(vm.count("prolix"))
		exec.verbosity = Logger::cPROLIX;
	if(vm.count("live"))
		exec.verbosity = Logger::cLIVE;
	if(vm.count("live") && vm.count("prolix"))
		exec.verbosity = Logger::cLIVEPROLIX;

	//check for cpu
	if(vm.count("cpu"))
		exec.useCPU = true;

	typedef std::pair<ExecutionParameters, EventDataLoadingParameters> tExecution;
	std::vector<tExecution> executions;

	//****************************************
	if(vm.count("testSuite")){

		ifstream ifs(g_traxDir + "/configs/" + getFilename(testSuiteFile));
		if (!ifs)
		{
			cerr << "can not open testSuite file: " << testSuiteFile << "\n";
			return 0;
		}
		else
		{
			std::vector<uint> threads;
			std::vector<uint> events;
			std::vector<uint> tracks;

			po::options_description cTestSuite;
			cTestSuite.add_options()
				("threads", po::value<std::vector<uint> >(&threads)->multitoken(), "work-group size")
				("tracks", po::value<std::vector<uint> >(&tracks)->multitoken(), "tracks to load")
				("eventGrouping", po::value<std::vector<uint> >(&events)->multitoken(), "events to process concurrently")
			;

			po::variables_map tests;
			po::store(parse_config_file(ifs, cTestSuite), tests);
			po::notify(tests);
			ifs.close();

			//add default values if necessary
			if(events.size() == 0)
				events.push_back(exec.eventGrouping);
			if(threads.size() == 0)
				threads.push_back(exec.threads);
			if(tracks.size() == 0)
				tracks.push_back(loader.maxTracks);

			//add test cases
			for(uint e : events){
				for(uint t : threads){
					for(uint n : tracks){

						ExecutionParameters ep(exec); //clone default
						EventDataLoadingParameters lp(loader);

						ep.threads = t;
						ep.eventGrouping = e; lp.maxEvents = e;
						lp.maxTracks = n;

						executions.push_back(std::make_pair(ep, lp));

					}
				}
			}
		}
	} else {
		executions.push_back(std::make_pair(exec, loader));
	}
	//************************************

	//**********************************

	//set up logger verbosity
	Logger::getInstance().setLogLevel(exec.verbosity);
	clever::context * contx = createContext(exec);

	RuntimeRecords runtimeRecords;
	PhysicsRecords physicsRecords;
	for(uint e = 0; e < executions.size();++e){ //standard case: only 1
		LLOG << "Experiment " << e << "/" << executions.size() << ": " << std::endl;
		LLOG << executions[e].first << " " << executions[e].second << std::endl;
		for(uint i = 0; i < exec.iterations; ++i){
			LLOG << i+1 << "  " << std::flush;
			auto res = buildTriplets(executions[e].first, executions[e].second, grid, contx);

			contx->clearAllBuffers();
			contx->clearPerfCounters();

			runtimeRecords.merge(res.first);
			physicsRecords.merge(res.second);
		}
		LLOG << std::endl;
	}

	delete contx;
	//**********************************

	runtimeRecords.logPrint();

	std::stringstream outputFileRuntime;
	outputFileRuntime << g_traxDir << "/runtime/" << "runtime." <<  getFilename(exec.configFile) << (testSuiteFile != "" ? "." : "") << getFilename(testSuiteFile) << (exec.useCPU ? ".cpu" : ".gpu") << ".csv";

	std::ofstream runtimeRecordsFile(outputFileRuntime.str(), std::ios::trunc);
	runtimeRecordsFile << runtimeRecords.csvDump();
	runtimeRecordsFile.close();

	std::stringstream outputFilePhysics;
	outputFilePhysics << g_traxDir << "/physics/" << "physics." << getFilename(exec.configFile) << ".csv";
	std::stringstream outputDirPhysics;
	outputDirPhysics << g_traxDir << "/physics/" << getFilename(exec.configFile);

	boost::filesystem::create_directories(outputDirPhysics.str());

	std::ofstream physicsRecordsFile(outputFilePhysics.str(), std::ios::trunc);
	physicsRecordsFile << physicsRecords.csvDump(outputDirPhysics.str());
	physicsRecordsFile.close();

	std::cout << Logger::getInstance();

}
示例#3
0
void Level::initialize(ValeGame *gamePtr)
{
	gamePointer = gamePtr;
	graphics = gamePtr->getGraphics();
	input = gamePtr->getInput();

	srand(time(NULL));

	//fonts
    quickCD.initialize(graphics, hudNS::COOLDOWN_SIZE, false, false, hudNS::FONT);
    quickCD.setFontColor(hudNS::FONT_COLOR);
	focusCD.initialize(graphics, hudNS::COOLDOWN_SIZE, false, false, hudNS::FONT);
	focusCD.setFontColor(hudNS::FONT_COLOR);
	fleetfeetCD.initialize(graphics, hudNS::COOLDOWN_SIZE, false, false, hudNS::FONT);
	fleetfeetCD.setFontColor(hudNS::FONT_COLOR);
	scoreText.initialize(graphics, 64, false, false, hudNS::FONT);
	scoreText.setFontColor(SETCOLOR_ARGB(255, 78, 162, 241));

	//textures
	wardenTexture.initialize(graphics, WARDEN_IMAGE);
	projectileTextures.initialize(graphics, PROJECTILE_IMAGE);
	focusBarFillTexture.initialize(graphics, FOCUS_BAR_FILL); 
	focusBarBGTexture.initialize(graphics, FOCUS_BAR_BG); 
	focusBarBGMuseTexture.initialize(graphics, FOCUS_BAR_BG_MUSE); 
	heartHUDTexture.initialize(graphics, HEART_HUD);
	heartTexture.initialize(graphics, HEART_ICON);
	spawnPointTexture.initialize(graphics,SPAWNER_IMAGE);

	//ability textures
	for(int i = 0; i < wardenNS::NUM_BOWS; i++)
	{
		bowTexture[i].initialize(graphics, BOW_ICON[i]);
		quickShotAbilityTexture[i].initialize(graphics, QUICKSHOT_ICON[i]);
		focusShotAbilityTexture[i].initialize(graphics, FOCUSSHOT_ICON[i]);
	}
	fleetFeetAbilityTexture.initialize(graphics, FLEETFEET_ICON);


	// Collision detection
	// Compute grid dimensions from the map size divided by grid dimension size
	float dX = (float)((width * tileSize)/GRID_CELL_DIMENSIONS);
	gridW = (int)ceil(dX);
	float dY = (float)((height * tileSize)/GRID_CELL_DIMENSIONS);
	gridH = (int)ceil(dY);

	// Instantiate the grid
	collision = cGrid(gridW, gridH, GRID_CELL_DIMENSIONS, &score);

	//particle system bs
	ps.initialize(graphics, L"..\\..\\Textures\\Particles\\smoke_hardedge.tga");
	ps.setEmitterShape(EMITTER_SHAPE_NONE);
	ps.setEmitterType(EMITTER_TYPE_DEFAULT);
	D3DXVECTOR2 tempPos(-100.0f, -100.0f);
	ps.setPosition(tempPos);
	
	particleSystems.resize(5);
	for(int i = 0; i < 5; i++)
	{
		particleSystems[i].initialize(graphics, L"..\\..\\Textures\\Particles\\smoke_hardedge.tga");
		particleSystems[i].setEmitterShape(EMITTER_SHAPE_NONE);
		particleSystems[i].setEmitterType(EMITTER_TYPE_DEFAULT);
		D3DXVECTOR2 tempPos(-100.0f, -100.0f);
		particleSystems[i].setPosition(tempPos);
	}
	lastUsedParticleSystem = 4;

	//warden
	warden.initialize(gamePtr, 32, 32, 1, &wardenTexture, &projectileTextures, &projectileTextures);
	D3DXVECTOR2 tmp(hudNS::SPAWN_X, hudNS::SPAWN_Y);
	warden.setPosition(tmp);
	score = 0;

	//Enemies
	risenManager.init(&score);
	risenSpawner.initialize(gamePtr,32,32,1,&spawnPointTexture,&risenManager.risen,&warden,tiles);
	risenSpawner.setPosition(tmp);

	addTimedSpawn(gamePtr,Risen::WAR,30.0,D3DXVECTOR2(2000.0f,1500.0f),400000);

	std::vector<Risen::types> hello1;
	std::vector<int> hello2;
	hello1.push_back(Risen::WARLOCK);
	hello1.push_back(Risen::ARCHER);
	hello1.push_back(Risen::HOUND);
	hello2.push_back(2);
	hello2.push_back(3);
	hello2.push_back(1);
	addStaticSpawn(gamePtr,hello1,hello2,D3DXVECTOR2(750.0f,3200.0f),400000);
	
	hello1.clear();
	hello2.clear();
	hello1.push_back(Risen::HOUND);
	hello2.push_back(1);
	addStaticSpawn(gamePtr,hello1,hello2,D3DXVECTOR2(1500.0f,2750.0f),400000);

	hello1.clear();
	hello2.clear();

	hello1.push_back(Risen::WAR);
	hello1.push_back(Risen::ARCHER);
	hello2.push_back(1);
	hello2.push_back(1);
	addStaticSpawn(gamePtr,hello1,hello2,D3DXVECTOR2(3300.0f,1000.0f),300000);

	hello1.clear();
	hello2.clear();

	hello1.push_back(Risen::WAR);
	hello2.push_back(1);
	addStaticSpawn(gamePtr,hello1,hello2,D3DXVECTOR2(2350.0f,785.0f),320000);

	hello2[0] = 2;
	addStaticSpawn(gamePtr,hello1,hello2,D3DXVECTOR2(2430.0f,175.0f),120000);

	hello1.push_back(Risen::WARLOCK);
	hello2.push_back(1);
	hello2[0] = 1;
	addStaticSpawn(gamePtr,hello1,hello2,D3DXVECTOR2(3650.0f,1900.0f),250000);
	addStaticSpawn(gamePtr,hello1,hello2,D3DXVECTOR2(3700.0f,2000.0f),200000);
	hello1[1] = Risen::WAR;
	addStaticSpawn(gamePtr,hello1,hello2,D3DXVECTOR2(3700.0f,1800.0f),250000);

	//equipment
	addBow(20, 2, SPLIT);
	addBow(19, 21, MUSE);

	//Hud
	scoreRect.left = 50.0f; scoreRect.top = 50.0f; scoreRect.bottom = 150.0f; scoreRect.right = 250.0f;
	//focus bar
	focusBarFill.initialize(graphics, &focusBarFillTexture, 128, 128, 0, 0, 1.0f, graphicsNS::WHITE);
	focusBarBG.initialize(graphics,128, 128, 1, &focusBarBGTexture);
	focusBarBGMuse.initialize(graphics, 128, 128, 1, &focusBarBGMuseTexture);

	for(int i = 0; i < 4; i++)
	{
		heartHUD[i].initialize(graphics, 32, 32, 1, &heartHUDTexture);
		heartHUD[i].setX(hudNS::HEART_X + i*32);
		heartHUD[i].setY(hudNS::HEART_Y);
	}

	//abilities 
	for(int i = 0; i < wardenNS::NUM_BOWS; i++)
	{
		quickShotAbility[i].initialize(graphics, hudNS::ABILITY_ICON_SIZE, hudNS::ABILITY_ICON_SIZE, 1, &quickShotAbilityTexture[i]);

		quickShotAbility[i].setX(hudNS::QUICK_ICON_X);
		quickShotAbility[i].setY(hudNS::ABILITY_ICON_Y);

		focusShotAbility[i].initialize(graphics, hudNS::ABILITY_ICON_SIZE, hudNS::ABILITY_ICON_SIZE, 1, &focusShotAbilityTexture[i]);		

		focusShotAbility[i].setX(hudNS::FOCUS_ICON_X);
		focusShotAbility[i].setY(hudNS::ABILITY_ICON_Y);
	}


	fleetFeetAbility.initialize(graphics, hudNS::ABILITY_ICON_SIZE, hudNS::ABILITY_ICON_SIZE, 1, &fleetFeetAbilityTexture);
	fleetFeetAbility.setX(hudNS::FLEET_ICON_X);
	fleetFeetAbility.setY(hudNS::ABILITY_ICON_Y);
}