Jump to content


Photo

Easy Enemy AI


  • Please log in to reply
10 replies to this topic

#1 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 30 August 2012 - 04:27 PM

Hello,
This is an extension for people who want to have a very quick AI for their 2D enemies. Advance functions are available in the new version.

In version 1.4 things are getting a bit advanced. we have a new movement system called cDirection which uses ray tracing for the enemies. in the normal movement system, enemies only have 4 directions and move very classic like. but in this movement system, they can pick any direction and its compatible with image_angle function. the main script is hundreds of lines and you can use it with only 5 lines of code :-]
Also for advanced users, it has some outputs to control the enemies as much as you like for your game.

Version 1.4 + 2 example files added to the first post. Example 2.gmk is about cDirection.

Functions
enemy_initialize();
enemy_hiccupEnabled(bool);
enemy_setHiccupDelay(int);
enemy_checkHiccup();
enemy_setSpeed(int);
enemy_getSpeed();
enemy_keepAlive();
enemy_getDirection();
enemy_cDirection(bool);
enemy_setVision(int);

Example File:
Posted Image

If you find any bug, please report it here and I'll fix it. also suggestions are totally welcome.

Note: This extension is under support and will be developed more.

Download Version 1.4

==Archive==
Version 1.3
Version 1.2
Version 1.1
Version 1.0

Edited by shahrooz232, 31 August 2012 - 10:57 AM.

  • 1

#2 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 30 August 2012 - 07:12 PM

Features in the next version:
- Enemy Speed
- Better Example File
- Better Icons
  • 0

#3 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 30 August 2012 - 08:41 PM

Version 1.1 Added :) + Screenshot
In version 1.2 I'll add the functions into code, so they'll be usable by scripting And blocks.


Don't forget to try and comment :)
  • 0

#4 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 30 August 2012 - 09:19 PM

Version 1.2 Added :thumbsup:
  • 0

#5 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 31 August 2012 - 08:36 AM

Version 1.3 Added :medieval:

Edited by shahrooz232, 31 August 2012 - 10:38 AM.

  • 0

#6 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 31 August 2012 - 10:45 AM

In version 1.4 things are getting a bit advanced. we have a new movement system called cDirection which uses ray tracing for the enemies. in the normal movement system, enemies only have 4 directions and move very classic like. but in this movement system, they can pick any direction and its compatible with image_angle function. the main script is hundreds of lines and you can use it with only 5 lines of code :-]
Also for advanced users, it has some outputs to control the enemies as much as you like for your game.

Version 1.4 + 2 example files added to the first post. Example 2.gmk is about cDirection.

Edited by shahrooz232, 31 August 2012 - 10:58 AM.

  • 0

#7 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 31 August 2012 - 12:11 PM

69 views, no feedback yet. this extension can be very handy !
I'll keep waiting for feedbacks.
  • 0

#8 OldSkoolGamer

OldSkoolGamer

    GMC Member

  • GMC Member
  • 90 posts
  • Version:GM:Studio

Posted 04 September 2012 - 01:51 AM

Just got some time to try this one out. Not bad at all, don't get discouraged by the lack of posts/replies, just hammer on through. Anyways, I may try using this in a small platformer I was getting ready to start on, seems like it would definitely simplify some things.
  • 1

#9 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 04 September 2012 - 05:58 AM

Thanks :)
  • 0

#10 Nediradesigns

Nediradesigns

    GMC Member

  • GMC Member
  • 83 posts
  • Version:GM:Studio

Posted 10 May 2013 - 02:29 PM

just wanted to say thanks for this and using it right now as either a placer for the AI in my game or maybe will be using as a permanent feature. Unsure yet till I get to the testing stage


  • 0

#11 HardcoreBadger

HardcoreBadger

    GMC Member

  • GMC Member
  • 89 posts
  • Version:GM8

Posted 14 May 2013 - 06:46 PM

only for platformers ?


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users