AI Overhaul

    Winterhome

    Way gayer than originally thought.
    Joined
    Jun 29, 2013
    Messages
    1,929
    Reaction score
    636
    One simple suggestion.

    Currently, turrets and ships have a bad habit of looking one direction and firing another. This makes no sense - they're not even lagging, since it can be a very small turret on a very small ship in an empty sector in singleplayer and they'll still do this.


    The AI in Starmade appears to move objects well enough, but firing weaponry is a little odd. The AI will create a projectile free of the object itself, spawn the projectile at the muzzle position, and send it off in the direction that it's aiming. Not the direction the gun is aiming, the direction the AI is aiming.

    Right now? Not a HUGE problem, but there are a few issues that can be solved with a few changes.
    Missiles don't fire correctly as they don't appear to be configured to work with the AI. d1000 missiles will fire from an AI manned turret... In the wrong direction. KB missiles don't appear to fire at all. BB missiles are right out.

    My suggestion?
    Don't make the object the AI. Make the AI control the object. Make the AI pass commands to the controlled object the same way a player would. If it's shooting at a target, make it track the target with its artificial imaginary mouse and click. If it's moving, it's pressing a virtual WASD. Spoof the signal.

    For an extra line of code, you could make dead certain with every loop of its AI routine that it's actually an AI to cut down on incidents of self-controlling turrets.

    Upon all events that'd result in the AI being removed, add a line to clear the client ID from the AI so that the next person/AI to spawn or be created doesn't just recycle it and also accidentally take control of the original object.


    No fancy features or anything.
    Just a way to make the AI point and click so that they work with all weapons and don't have that derpy "Looking in one direction and shooting in another" problem.
     

    Winterhome

    Way gayer than originally thought.
    Joined
    Jun 29, 2013
    Messages
    1,929
    Reaction score
    636
    Suppose nobody\'s in support of slightly less buggy AI then.
     
    Joined
    Jun 24, 2013
    Messages
    93
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    I have no idea how the AI is assigned to control these things, so I can\'t comment on your suggestion. I also believe the AI can use some tweaks, but I\'m of the mind that it\'s more in line with reducing the margin of error for firing accuracy and getting the AI\'s to use the actual weapon ranges as opposed to getting to point-blank range and tapping you while sometimes holding still in space while you blast them in the face.
     

    Sio

    Joined
    Jul 1, 2013
    Messages
    23
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    I think the best idea would be to be able to program the AI by yourself
     

    Winterhome

    Way gayer than originally thought.
    Joined
    Jun 29, 2013
    Messages
    1,929
    Reaction score
    636
    That\'d actually be nice, I think, though maybe a bit too advanced for the average user.

    Custom block, perhaps, with a very limited range of commands and extensive testing to ensure that it can\'t be abused?
    Add in a section of the forums for \"Automation Module Code\" or some such with that idea.



    But yeah - the AI currently tries to spawn a projectile in the general direction of the target using the weapon\'s stats, but it\'s more tied to the gun than to the vehicle.
     
    Joined
    Jun 20, 2013
    Messages
    149
    Reaction score
    13
    I would love if the AI-turrets can track the flying past of the object they are firing at, so they aim infront of it and hit fighters in full flight easier than they do now.