Ai loading and usage in multiplayer games (missing ai dll)

Ai loading and usage in multiplayer games (missing ai dll)

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Ai loading and usage in multiplayer games (missing ai dll)

Post by krogothe »

As we all know, spring allows for AIs to be loaded from any computer and be played together in a game, with only the guy who added the bot really needing to have the AI. However, spring will complain and crash to ANY player who doesnt have the dll, even if the AI is not being loaded by them.

A fix is to rename emptyai.dll to whatever the AI you want to play against is (if it hasnt been released yet), but then people get spammed with messages (allies: X enemies: x or whatever code is in it) since it seems the AI gets loaded and used from both computers.

Im not sure about how hard it would be to make an AI only load from the computer that added it (its certainly possible since it still builds even if the non-ai loading players have renamed emptyAI.dlls), but it would be good to have, but PLEASE:

remove the couple of lines of code that give out the warning for missingAI Dll and crash spring for no reason. If they really do need to load something make it load emptyAI or something. It used to work fine a few spring versions ago as well, so i could hold public AI tests without coordinating everyone into renaming Dlls etc.

Thanks!
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

pulleeeeezzeeee
Image
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Try the 'realemptyAI' that spectre posted in the AI forum untill it's fixed, along with demos!!!(boost::spirit parsing error0
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

I have ^_^ but its still annoying to have to run each new guy thru the same thing when its not really needed
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

I think thats all thats needed! /* and */ (or a couple more for the other messages) please!! :cry:

Code: Select all

CGlobalAI::CGlobalAI(int team, const char* dll)
: team(team)
{
	ai=0;
	boost::filesystem::path l(dll,boost::filesystem::native);

	/*if (!boost::filesystem::exists(l)) {
		handleerror(NULL,dll,"Could not find AI lib",MBF_OK|MBF_EXCL);
		return;
	}*/

	lib = SharedLib::instantiate(l.native_file_string());
	
	GetGlobalAiVersion = (GETGLOBALAIVERSION)lib->FindAddress("GetGlobalAiVersion");
	if (GetGlobalAiVersion==0){
		handleerror(NULL,dll,"Incorrect Global AI dll",MBF_OK|MBF_EXCL);
		return;
	}
	
	int i=GetGlobalAiVersion();

	if (i!=GLOBAL_AI_INTERFACE_VERSION){
		handleerror(NULL,dll,"Incorrect Global AI dll version",MBF_OK|MBF_EXCL);
		return;
	}

	GetNewAI = (GETNEWAI)lib->FindAddress("GetNewAI");
	ReleaseAI = (RELEASEAI)lib->FindAddress("ReleaseAI");

	ai=GetNewAI();
	callback=new CGlobalAICallback(this);
	gh=new CGroupHandler(team);
	ai->InitAI(callback,team);
}
Last edited by krogothe on 23 May 2006, 10:56, edited 1 time in total.
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

double post :/
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

But then if we dont have the AI dll in a single player wont there be problems? Or are they caught later on?
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

AF wrote:But then if we dont have the AI dll in a single player wont there be problems? Or are they caught later on?
oh right! and how would you be able to start a single player game with a dll that doesnt even exist in first place??
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Custom scripts
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

call me ignorant, but i think the population proportion that uses custom scripts for non-existant AIs should be around 0.01 compared to players that want to play with existing AIs in multiplayer
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

If something can go wrong it will go wrong and someone will complain. Best to be sure
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

Deeeeevvvvsssss please!
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

I second AF, spring has hacks enough already.

Anyway, we'll fix it before the next release ;)
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3
<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

ewwwww
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

NOiZE wrote:ewwwww
<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3<3
to you too
Post Reply

Return to “Help & Bugs”