Little Fighter Empire - Forums

Full Version: Project idea: new AI for original LF2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is just an idea, I'm posting this here, hoping this will actually turn into a project when the right people read this.

One of the things I planned on doing for LF2 extended if it would be released, was changing the AI of all characters. I still love to play LF2 now and then, but against a standard AI, VS is not much of a challenge and it gets boring real fast. The only thing you can really play with is doing amazing combos, but the AI is simply too predictable and easy to beat. It won't evade your combos, it doesn't attack you with quick dashes, it is too easy to win punching battles, it doesn't anticipate the moves you are going to make. With a new AI for all characters that resembles high-level online fights, this problem could be fixed.

What is needed:
- One of two people who can do advanced AI scripting, making AI for basic moves;
- Someone who is good at LF2, knows the characters and their tricks&combos very well, who can do basic AI scripting using the original LF2's template AI;
- 1 or 2 testers, eventually with base knowledge of AI scripting but not necassarily.

OR: one magic man who wants to do everything himself haha

If you start off with the creation of a new AI template and use scripts written by people in this community (with permission), it should not be too hard to realize this.
i'd like to be a tester. i'm not the best lf2 player, but i'm decent. and i have some basic knowledge about AI.
(07-15-2017, 08:01 PM)the mad maskman Wrote: [ -> ]i'd like to be a tester. i'm not the best lf2 player, but i'm decent. and i have some basic knowledge about AI.

If this will turn into an actual project, finding testers is one of the later things that has to be done...
If this thing actually works out, you can sign me up as a tester :P
I am surprised there is no new AI for original LF2 after all these year.Love to be your tester
Hi... Seems like the idea is not starting yet.

I think I want to start with something for this. I know I'm not a really good in programming. My first C program is this AI. I learn a lot from this.

What I want to share for now is about chase attacks evading. Someone might had done this even better, but I have done mine. I see it works pretty good. At least not bad to evade two Dennis' chase ball or two John's biscuit.

Basic AIs lacks in evading balls.

    AI-Code:
int ego()
{
	//Get Detailed Balls
	for (int i = 0; i < 400; ++i){
		if (loadTarget(i) > 0)
		{
			if (target.x_velocity!=0 && (abs(self.z - target.z) < 70) && target.team != self.team)
			{
				int zw;
				zw = (bg_zwidth1 + bg_zwidth2)/2;
				//print("zw = " + zw + "\n");
				//print("selfz = " + self.z +"\n");
				//print("objectz = " + target.z + "\n");
				if ((self.x<target.x && target.x_velocity<0)||(self.x>target.x &&target.x_velocity>0))
				{
					if(self.z==target.z||self.z+2 >target.z||self.z-2<target.z)
					{
					//print("I gotta dodge \n");
						if(self.z>zw)
						{
							up(1,1);
						}
						if(self.z<zw)
						{
							down(1,1);
						}
						if((self.z>zw-10||self.z<zw+10)&&abs(target.x-self.x)<300&&self.state!=12)
						{
							int direction;
							direction = rand(1);
							if (direction == 0)
							{
								up(1,1);
								J(1,0);
								up(0,0);
							}
							if (direction == 1)
							{
								down(1,1);
								J(1,0);
								down(0,0);
							}
						}
					}
				}
			}
		}
	}
	return 0;
}


This code might help to create the AIs with evading abilities.

Let's see of there will be another scripts, and than we can merge them into one, as new basic scripts for the characters..

I hope someone may improve this.

(I will try to make Davis's AI and see maybe someone will be interested to test it)