Users browsing this thread: 12 Guest(s)
Non-Named (More debugging)
Sometimes while doing stuff not related to game design, I have concepts and thoughts of ideas that would work in game design.

Anyways, I thought of a simple system for overworld enemies based off the simple sets of flags and variables in their behavior. This would allow me to set each enemy to have various different aspects that make their movement. The first five are really simple number-based variables:
  • Movement speed (in units)
  • Reaction time to move after seeing the player (in seconds)
  • Movement speed after seeing the player (in units)
  • Distance (in units) to notice the player 
  • Enemy level
These five are pretty simple, but I might as well explain them:
  • Movement speed is the amount of units a frame they move when doing their own stuff.
  • The second is simply how many seconds it takes for them to move after the little "alert" sign appears above their head. 0.2 seconds would roughly be a common reaction time. While slower enemies might have a reaction time of 0.5 seconds. (Half a second)
  • The third is how fast will they move in units once they've been set to be alert to the player.
  • The fourth is a bit more complicated to explain. But each enemy has a simple formula that determines the distance away from the player's X and Y position they are. As technically, they always see the player, but they won't react until they're close to their radius of reaction. This gives off the illusion that they don't see the player, and is determined by a variable amount of units.
  • Enemy level is simply their level. If the player's level is above the enemy's they might become scared, or run away, different variables will change how they react to this.
These next variables however, are a tad less obvious, and relate to enemy level:
  • Hides when scared (furthest, closest) (Position, actor)
  • Runs when scared
  • Doesn't react when alerted. (scared, chase)
I'm going to explain these three, as they can be a bit complicated:
  • The first one is something actually pretty complicated. And relates to a list of "hiding position" that are just a list of X and Y positions stored on the map. Once the enemy reacts to the player, and is scared, the enemy will run off their reaction range, and it's behavior will sort up the list of hiding positions to either high-to-low, or low-to-high, and then choose the top result. Making them either run far away, or pretty close. The same thing could be applied to enemy actors to sorta use them as shields.
  • Runs when scared simply means they'll move away from the player when in range then chase them.
  • The second is just that they won't react to wanting to rush the player, or being scared. Meaning you can create enemies that are confident, and will fight an overleveled player, or they'll only fight if the player actually decides to attack them.
The next is movement patterns when not reacted, and I don't think I need to explain this:
  • Moves up/down
  • Moves left/right
  • Moves randomly
  • Patrols route (based off a list of positions to follow)
  • Doesn't move

And this is how they space their movements:
  • On/off for a set amount of seconds (variable)
  • On/off for a random amount of seconds (from 0 to maximum number of seconds variable)
  • Never stops, always moves
As you can tell, this is a pretty advanced list of functions that can make enemy AI seem different with each one. Of course, the actions they do once reacted are predictable so the player can predict and plan their movements once they've learnt how the enemy acts.
I like to make models in my free time. I also make weird games, too.
Reply
Thanked by: iyenal


Messages In This Thread
Non-Named (More debugging) - by Filler - 06-21-2016, 11:53 AM
RE: Non-Named (Engine testing phase) - by Filler - 09-22-2016, 11:56 PM
RE: Non-Named (Engine testing phase) - by Filler - 09-23-2016, 09:58 PM
RE: Non-Named (Engine testing phase) - by Filler - 09-26-2016, 06:18 AM
RE: Non-Named (Engine testing phase) - by iyenal - 09-26-2016, 07:22 AM
RE: Non-Named (Engine testing phase) - by Filler - 10-01-2016, 07:01 AM
RE: Non-Named (Engine testing phase) - by Filler - 10-02-2016, 07:40 PM
RE: Non-Named (Engine testing phase) - by Gors - 10-03-2016, 02:49 PM
RE: Non-Named (Engine testing phase) - by Filler - 10-04-2016, 11:44 PM
RE: Non-Named (Engine testing phase) - by iyenal - 10-05-2016, 09:19 AM
RE: Non-Named (Engine testing phase) - by Filler - 10-23-2016, 06:22 PM
RE: Non-Named (Engine testing phase) - by Filler - 11-07-2016, 06:51 PM
RE: Non-Named (Engine testing phase) - by Filler - 11-07-2016, 10:19 PM
RE: Non-Named (Engine testing phase) - by Filler - 11-08-2016, 06:43 PM
RE: Non-Named (Engine testing phase) - by Filler - 11-10-2016, 11:17 PM
RE: Non-Named (Engine testing phase) - by Filler - 11-11-2016, 06:56 PM
RE: Non-Named (Engine testing phase) - by Filler - 11-11-2016, 11:22 PM
RE: Non-Named (Engine testing phase) - by Gors - 11-16-2016, 07:04 AM
RE: Non-Named (Engine testing phase) - by Filler - 11-12-2016, 11:24 PM
RE: Non-Named (Engine testing phase) - by Filler - 11-16-2016, 01:05 AM
RE: Non-Named (Engine testing phase) - by Filler - 11-16-2016, 12:15 PM
RE: Non-Named (Engine testing phase) - by Filler - 11-16-2016, 10:42 PM
RE: Non-Named (Engine testing phase) - by Gors - 11-17-2016, 06:20 AM
RE: Non-Named (Engine testing phase) - by Filler - 11-17-2016, 11:36 PM
RE: Non-Named (Engine testing phase) - by iyenal - 11-18-2016, 11:39 AM
RE: Non-Named (Engine testing phase) - by Filler - 11-19-2016, 04:46 AM
RE: Non-Named (Engine testing phase) - by Filler - 12-08-2016, 02:18 AM
RE: Non-Named (Engine testing phase) - by iyenal - 12-08-2016, 01:02 PM
RE: Non-Named (Engine testing phase) - by Gors - 12-08-2016, 01:25 PM
RE: Non-Named (Engine testing phase) - by Filler - 12-08-2016, 02:18 PM
RE: Non-Named (Engine testing phase) - by Filler - 01-08-2017, 02:00 PM
RE: Non-Named (Engine testing phase) - by iyenal - 01-11-2017, 01:14 PM
RE: Non-Named (Engine testing phase) - by Filler - 01-14-2017, 04:49 PM
RE: Non-Named (Engine testing phase) - by Pingus! - 01-15-2017, 09:28 AM
RE: Non-Named (Engine testing phase) - by Filler - 01-16-2017, 10:03 PM
RE: Non-Named (Engine testing phase) - by Filler - 01-17-2017, 07:08 PM
RE: Non-Named (Engine testing phase) - by Gors - 01-18-2017, 07:47 AM
RE: Non-Named (Engine testing phase) - by Filler - 01-18-2017, 01:30 PM
RE: Non-Named (Engine testing phase) - by Filler - 01-20-2017, 08:51 PM
RE: Non-Named (Engine testing phase) - by Filler - 01-22-2017, 11:45 PM
RE: Non-Named (Engine testing phase) - by Filler - 01-28-2017, 12:42 AM
RE: Non-Named (Engine testing phase) - by Filler - 02-01-2017, 08:32 AM
RE: Non-Named (Engine testing phase) - by Filler - 02-13-2017, 09:07 PM
RE: Non-Named (Engine testing phase) - by iyenal - 02-14-2017, 05:35 AM
RE: Non-Named (Engine testing phase) - by puggsoy - 02-14-2017, 06:35 AM
RE: Non-Named (Engine testing phase) - by Filler - 02-14-2017, 07:05 AM
RE: Non-Named (Engine testing phase) - by Filler - 02-20-2017, 01:09 AM
RE: Non-Named (Engine testing phase) - by Filler - 02-26-2017, 01:45 AM
RE: Non-Named (Engine testing phase) - by Filler - 02-27-2017, 02:51 AM
RE: Non-Named (Engine testing phase) - by iyenal - 03-04-2017, 09:54 AM
RE: Non-Named (Engine testing phase) - by Filler - 03-04-2017, 08:05 PM
RE: Non-Named (Engine testing phase) - by Filler - 03-15-2017, 12:23 AM
RE: Non-Named (Engine testing phase) - by Gors - 03-15-2017, 08:08 AM
RE: Non-Named (Engine testing phase) - by Filler - 03-15-2017, 02:16 PM
RE: Non-Named (Engine testing phase) - by Filler - 03-16-2017, 09:53 PM
RE: Non-Named (Engine testing phase) - by Filler - 03-19-2017, 10:16 AM
RE: Non-Named (Engine testing phase) - by Filler - 03-25-2017, 11:47 AM
RE: Non-Named (Engine testing phase) - by Filler - 03-25-2017, 09:20 PM
RE: Non-Named (Engine testing phase) - by iyenal - 03-26-2017, 10:26 AM
RE: Non-Named (Engine testing phase) - by Filler - 04-01-2017, 07:59 AM
RE: Non-Named (Engine testing phase) - by Filler - 04-05-2017, 09:46 PM
RE: Non-Named (Engine testing phase) - by puggsoy - 05-27-2017, 07:18 PM
RE: Non-Named (Engine testing phase) - by Filler - 04-27-2017, 10:59 PM
RE: Non-Named (Engine testing phase) - by Filler - 05-07-2017, 12:06 PM
RE: Non-Named (Engine testing phase) - by Filler - 05-24-2017, 05:48 AM
RE: Non-Named (Engine testing phase) - by iyenal - 05-24-2017, 09:35 AM
RE: Non-Named (Engine testing phase) - by Filler - 05-25-2017, 09:16 PM
RE: Non-Named (Engine testing phase) - by Filler - 05-28-2017, 12:40 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-11-2017, 10:36 PM
RE: Non-Named (Engine testing phase) - by iyenal - 06-13-2017, 03:44 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-13-2017, 08:23 PM
RE: Non-Named (Engine testing phase) - by Filler - 06-14-2017, 05:55 PM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-15-2017, 10:47 AM
RE: Non-Named (Engine testing phase) - by iyenal - 06-15-2017, 01:56 PM
RE: Non-Named (Engine testing phase) - by Filler - 06-16-2017, 06:45 PM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-17-2017, 05:18 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-17-2017, 11:56 AM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-18-2017, 02:33 AM
RE: Non-Named (Engine testing phase) - by iyenal - 06-18-2017, 03:44 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-18-2017, 03:44 PM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-18-2017, 07:11 PM
RE: Non-Named (Engine testing phase) - by Filler - 06-18-2017, 08:37 PM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-18-2017, 10:17 PM
RE: Non-Named (Engine testing phase) - by Gors - 06-19-2017, 07:55 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-20-2017, 01:48 PM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-20-2017, 04:48 PM
RE: Non-Named (Engine testing phase) - by Filler - 06-20-2017, 07:43 PM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-21-2017, 02:29 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-20-2017, 10:06 PM
RE: Non-Named (Engine testing phase) - by Filler - 06-23-2017, 01:43 AM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-23-2017, 04:27 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-25-2017, 02:38 AM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-25-2017, 07:52 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-25-2017, 06:54 PM
RE: Non-Named (Engine testing phase) - by Filler - 06-26-2017, 07:29 AM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-26-2017, 08:48 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-28-2017, 12:33 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-28-2017, 12:57 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-29-2017, 01:28 AM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-29-2017, 10:00 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-29-2017, 10:11 AM
RE: Non-Named (Engine testing phase) - by puggsoy - 06-29-2017, 10:15 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-29-2017, 10:32 AM
RE: Non-Named (Engine testing phase) - by Filler - 06-30-2017, 11:07 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-03-2017, 09:47 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-03-2017, 09:01 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-05-2017, 03:20 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-06-2017, 11:31 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-09-2017, 06:09 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-13-2017, 10:06 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-14-2017, 11:11 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-16-2017, 07:58 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-17-2017, 12:43 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-17-2017, 03:50 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-18-2017, 03:31 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-20-2017, 02:48 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-20-2017, 09:21 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-23-2017, 05:02 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-23-2017, 07:58 PM
RE: Non-Named (Engine testing phase) - by puggsoy - 07-24-2017, 08:10 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-24-2017, 08:24 AM
RE: Non-Named (Engine testing phase) - by iyenal - 07-24-2017, 08:29 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-24-2017, 08:42 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-24-2017, 09:45 AM
RE: Non-Named (Engine testing phase) - by iyenal - 07-24-2017, 09:48 AM
RE: Non-Named (Engine testing phase) - by Filler - 07-24-2017, 04:31 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-25-2017, 01:02 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-26-2017, 08:06 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-28-2017, 05:57 PM
RE: Non-Named (Engine testing phase) - by Filler - 07-29-2017, 05:48 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-04-2017, 12:35 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-07-2017, 10:03 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-07-2017, 05:06 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-08-2017, 09:11 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-08-2017, 08:02 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-11-2017, 01:08 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-11-2017, 02:11 PM
RE: Non-Named (Writing 'n stuffs) - by Silversea - 08-12-2017, 03:13 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-12-2017, 06:04 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-13-2017, 03:10 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-13-2017, 09:06 PM
RE: Non-Named (Writing 'n stuffs) - by Silversea - 08-13-2017, 09:37 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-13-2017, 09:46 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-14-2017, 02:59 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-15-2017, 09:07 PM
RE: Non-Named (Writing 'n stuffs) - by kadashyto - 08-15-2017, 10:30 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-15-2017, 10:54 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-16-2017, 06:38 PM
RE: Non-Named (Writing 'n stuffs) - by Silversea - 08-16-2017, 06:56 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-16-2017, 08:04 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-19-2017, 09:20 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-20-2017, 06:46 PM
RE: Non-Named (Writing 'n stuffs) - by iyenal - 08-21-2017, 10:17 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-24-2017, 07:47 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-26-2017, 01:10 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-27-2017, 05:32 AM
RE: Non-Named (Writing 'n stuffs) - by Cloud6625 - 08-27-2017, 05:43 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-27-2017, 06:19 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-27-2017, 10:30 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 08-29-2017, 07:24 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 09-01-2017, 10:02 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 09-07-2017, 01:14 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 09-09-2017, 02:53 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 09-17-2017, 05:33 PM
RE: Non-Named (Writing 'n stuffs) - by iyenal - 09-21-2017, 06:25 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 09-21-2017, 10:30 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 09-30-2017, 09:10 PM
RE: Non-Named (Writing 'n stuffs) - by iyenal - 10-01-2017, 03:57 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-01-2017, 12:12 PM
RE: Non-Named (Writing 'n stuffs) - by Silversea - 10-01-2017, 02:57 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-04-2017, 06:39 PM
RE: Non-Named (Writing 'n stuffs) - by puggsoy - 10-05-2017, 07:33 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-06-2017, 04:54 AM
RE: Non-Named (Writing 'n stuffs) - by iyenal - 10-06-2017, 02:15 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-07-2017, 07:44 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-14-2017, 06:54 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-22-2017, 12:47 AM
RE: Non-Named (Writing 'n stuffs) - by iyenal - 10-22-2017, 02:16 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-22-2017, 01:54 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-27-2017, 02:36 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-27-2017, 06:13 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-28-2017, 06:05 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 10-31-2017, 09:52 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 11-04-2017, 09:52 PM
RE: Non-Named (Writing 'n stuffs) - by Filler - 11-05-2017, 12:41 AM
RE: Non-Named (Writing 'n stuffs) - by Filler - 11-05-2017, 07:16 PM
RE: Non-Named (More debugging) - by Filler - 11-11-2017, 08:25 PM
RE: Non-Named (More debugging) - by Filler - 11-26-2017, 02:52 AM
RE: Non-Named (More debugging) - by Filler - 11-29-2017, 11:56 PM
RE: Non-Named (More debugging) - by iyenal - 12-04-2017, 12:24 PM
RE: Non-Named (More debugging) - by Filler - 12-26-2017, 07:57 PM
RE: Non-Named (More debugging) - by Filler - 12-31-2017, 03:44 PM
RE: Non-Named (More debugging) - by Filler - 01-02-2018, 06:56 PM
RE: Non-Named (More debugging) - by iyenal - 01-03-2018, 06:03 AM
RE: Non-Named (More debugging) - by Filler - 01-03-2018, 09:10 AM
RE: Non-Named (More debugging) - by Filler - 01-04-2018, 12:41 PM
RE: Non-Named (More debugging) - by iyenal - 01-04-2018, 12:51 PM
RE: Non-Named (More debugging) - by Filler - 01-06-2018, 01:47 PM
RE: Non-Named (More debugging) - by Filler - 01-09-2018, 11:09 PM
RE: Non-Named (More debugging) - by Filler - 01-10-2018, 02:10 AM
RE: Non-Named (More debugging) - by iyenal - 01-10-2018, 09:07 AM
RE: Non-Named (More debugging) - by Filler - 01-11-2018, 07:45 PM
RE: Non-Named (More debugging) - by Filler - 01-12-2018, 05:17 PM
RE: Non-Named (More debugging) - by iyenal - 01-13-2018, 05:18 AM
RE: Non-Named (More debugging) - by Filler - 01-13-2018, 04:17 PM
RE: Non-Named (More debugging) - by Filler - 01-14-2018, 11:12 PM
RE: Non-Named (More debugging) - by iyenal - 01-15-2018, 06:28 AM
RE: Non-Named (More debugging) - by Filler - 01-16-2018, 08:30 AM
RE: Non-Named (More debugging) - by iyenal - 01-16-2018, 12:52 PM
RE: Non-Named (More debugging) - by Filler - 01-23-2018, 11:36 AM
RE: Non-Named (More debugging) - by iyenal - 01-24-2018, 10:06 AM
RE: Non-Named (More debugging) - by Filler - 02-17-2018, 09:05 PM
RE: Non-Named (More debugging) - by iyenal - 02-18-2018, 05:38 AM
RE: Non-Named (More debugging) - by Filler - 03-17-2018, 11:23 PM
RE: Non-Named (More debugging) - by Filler - 04-01-2018, 10:21 PM
RE: Non-Named (More debugging) - by iyenal - 04-03-2018, 05:50 AM
RE: Non-Named (More debugging) - by Filler - 06-26-2018, 09:37 PM
RE: Non-Named (More debugging) - by Filler - 07-28-2018, 11:34 AM
RE: Non-Named (More debugging) - by DrexusNui - 05-10-2023, 01:52 PM

Forum Jump: