Platformer Enemy AI

Posted by Infinity_Plus on Sept. 3, 2010, 5:07 p.m.

Note: I apologize, I'm infamous for excessive typing. [=)]

Enemies that wander from one side of a platform to another has its advantages, the greatest one being simplicity in both programming and game play mechanics. My view, however, is that a Platformer with some sophisticated AI makes for a much more breath-taking experience.

With Ultimate Extreme Action PONG leaving me with little to work with in terms of AI (Up and Down…[=(]), I built a small Platform Engine, moderately reminiscent of Prince of Persia or Ninja Gaiden and have begun working on a bit of AI for the enemies, originally out of boredom, but currently due to interest.

The character I designed, while still only a walking Sprite Mask, carries a gun that rotates and aims in the direction of the player's mouse, and the player must fight the enemies using an arsenal of about 4-6 different weapons as they are acquired throughout the game (and possibly a few spell-like abilities or just regular ol' abilities).

This leads to a smidgen of a dilemma. Simple side-to-side AI won't suffice here; the enemy needs to be capable of taking cover, calling for backup, gauging his enemy (you) for combat awareness and ideal firing times, crouch when little cover is available, snipe if possible, throw grenades when the player is under cover, and other such concepts. The enemy needs to be able to think much like the player.

I guess I don't really have much of a question, but more of a brainstorming blog. Presently, I have several concepts on paper, with bits and pieces of code started, but haven't undergone any major coding, since the concepts are all still so early in development.

Presently, I have these enemies in concept:

Faction I

  • Scout - Spots Player, runs to other enemies to warn. Weak, Fast, short-mid range of fire.

  • Gang Member - Mid-range View, Average Life, Average Speed, Short-Mid Range Fire. No Grenades, usually come in groups. Will melee if player gets close.

  • Soldier - Mid-Long Range View, Average-Strong Life, Slow-Average Speed, Assault Weapon equipped, Mid-range Fire. Will close in for melee if player has slow-firing weapon or melee weapon equipped. Throws Grenades.

  • Commando - Mid-Range View, Strong Life, Average-Fast Speed, Assault Rifle/Pistol Available, Throws Grenades. Will go in for a melee if greater than 50% health remains.

  • Heavy - Short-Mid Range View, Strong Life, Immobile-Slow Movement, Heavy/Light Machine Gun Equipped, Wide range of Fire [can destroy environment]. Capable of smashing through walls. No Grenades. Will melee if player gets too close.

    There are three factions of enemies: Demons, Humans, and Angels. The list above is for Humans. I have no real concepts on Demons or Angels as of yet. The fun part of the enemies is some of them may have Action Sequences associated to their abilities. The player may have to repeatedly tap a certain key or sequence of keys to hurt or escape an enemy or enemy's attack.

    I guess, for the sake of the blog, if you've made it this far, is to ask what type of enemies you think would be interesting to see in a Platformer? I'm uploading a video to Youtube to display the progress on the Platform Engine that the AI will be present in, to give the readers/viewers here a better understanding how the player will have to fight said enemies.
  • Comments

    Ferret 14 years, 2 months ago
    sirxemic 14 years, 2 months ago

    DUDE WTF

    Actually, I see the smiley broke it ONLY FOR YOU. How is that even possible O_o

    Ferret 14 years, 2 months ago

    Firefox?

    And seriously, lol whats with my comment?

    sirxemic 14 years, 2 months ago

    It's not firefox. For you previews are parsed differently than for me. I don't know how that is possible. Looking into it right now.

    Also, your comment contained a link immediately followed by a tag. That for a start is a silly thing to do. The parser isn't perfect.

    Ferret 14 years, 2 months ago

    It's only that preview, I I have a feeling that he just happened to have the smiley as the last thing in his preview and that is what screwed it up.

    And I do that all the time with quotes, it's the only way to fit everything properly so I thought it would be the same for the hide tag.

    link
    Quote:
    like this

    sirxemic 14 years, 2 months ago

    EDIT: I found out only mods could see smileys properly parsed in previews. I commented the smiley parsing out, for just in case.

    This must be no surprise but the reason stuff isn't working as it is supposed to is because the FUCKING CODE IS FUCKING CHAOTIC

    Castypher 14 years, 2 months ago

    Quote:
    FUCKING CODE IS FUCKING CHAOTIC
    ^ This