AI need some update badly!!!
#12

After about a Hour of looking around. With my limited java knowledge. This is what i found.


I may be wrong, so don't take these as fact just yet..


Specifics

A.I does cheat quite a bit. Sometimes the ability of the flight model is doubled. double g tolerance, double speed, double turning radius. Not Confirmed yet. Just what i saw.

The predictable moves the A.I does once you jump its 6 can be changed i believe. It seems its coded to do that same sequence.

Don't think you can make movements "aircraft" specific. I.E P-47 won't dive away or used BnZ effectively. Not too sure about this. But its not looking good.


Overall the A.I code (for me) is very complicated. So much advanced java code.

Example of some of it.

Code:
public void goodFighterVsFighter(float f)
    {
        Ve.sub(target.Loc, Loc);
        float f1 = (float)Math.sqrt(Ve.x * Ve.x + Ve.y * Ve.y);
        Or.transformInv(Ve);
        float f2 = (float)Ve.length();
        float f4 = 1.0F / f2;
        Vtarg.set(Ve);
        Vtarg.scale(f4);
        float f5 = (Energy - target.Energy) * 0.1019F;
        tmpV3f.sub(target.Vwld, Vwld);
        if(sub_Man_Count == 0)
        {
            float f6 = 0.0F;
            if(CT.Weapons[1] != null && CT.Weapons[1][0].countBullets() > 0)
                f6 = ((GunGeneric)CT.Weapons[1][0]).bulletSpeed();
            else
            if(CT.Weapons[0] != null)
                f6 = ((GunGeneric)CT.Weapons[0][0]).bulletSpeed();
            if(f6 > 0.01F)
                bullTime = 1.0F / f6;
            submanDelay = 0;
        }
        if(f1  -0.20000000298023224D)
            {
                f7 = 3F * ((float)Vtarg.x + 0.2F);
                Vxy.set(tmpV3f);
                Vxy.scale(1.0D);
                Or.transformInv(Vxy);
                Vxy.add(Ve);
                Vxy.normalize();
                f9 = 10F * (float)(Vxy.x - Vtarg.x);
                if(f9  1.0F)
                    f9 = 1.0F;


I'm going to start testing some things and i'll report back to if i get any results.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 8 Guest(s)