Academic question: AI waypoints

Hello everyone,

I would like to get some info from your experience.

The question is this:

Can the positions of powerUps(which are dynamically placed and thus change) in a game be considered as AI waypoints?

Or we should say that between an AI character and a powerUp position, the waypoints are the extra positions the character needs to follow in order to reach the powerup!?

it is a bit unclear to me…

Unity doesn’t really have designated AI system(except for navmesh), so it depends on what script you’re using or how you built your AI behaviour.
Generally, yes dynamic waypoints are possible and any object with transform can be a waypoint.

Uhhhh…what’s the question?

Guys thanks for the quick responce!!

I have an assignment that has a task to create waypoints.

So If I state in my answer for this task that: “The positions of the powerUps are the waypoints the AI character will consider in order to decide which powerUp to pick.” is valid or is it wrong?

Which leads to the question:
Can the positions of powerUps(which are dynamically placed and thus change) in a game be considered as AI waypoints?

I think I made it a bit more clear now!!

Now im confused as hell, are you building a game or cheating on some kind of test? 0.o

Neither of these, I am just asking if the sentence I wrote is enough for showing that I know what a waypoint is.

Which obviously I don’t know so well,that’s why I am asking :slight_smile:

They can be… whether or not they should be all depends on the design of your game.

Depends on the game design. PowerUps could be AI waypoints, or more likely they could simply be optional targets used when generating the waypoints. Other factors used might include things like is there an opponent near the powerup, do you need the powerup, etc.

For a simple game what you’re saying is probably OK, a more robust system would also allow for waypoints which are NOT powerups.

I would decouple the position of power ups from your waypoints.

Keep your waypoints your waypoints, and your power ups your power ups.

If you wish to place a power up in the same location as a waypoint, then do so.

But remember a power up might be collected by a player too.

Really, it doesn’t make sense to combine the two. In fact I’d call it bad design if you did. As you may want to do something else with your waypoint system, and not just use it for power ups. And then you would have to re-write code/change prefabs etc and it would get messy.

No. You should separate out waypoints from power-ups.

Waypoints are usually invisible to the player. Power-ups are visible. If the player picks-up the power-up, the thing will be destroyed or hidden or disabled from the screen.

This may unintended effects - enemies which may depend on the waypoint to navigate themselves to mess-up.

If a person picks-up more than 3 power-ups, would that cause waypoints transforms to wrap-around?

Poweups cant be waypoint. They are destination where a path of waypoints lead to.

You could deliberately choose to treat a powerup as a waypoint when building the waypoint graph. Nothing wrong with that. It’d be the same as placing a waypoint where a powerup is.

However, using powerups as your only waypoints is not likely to work; paths through the waypoint graph are usually straight lines from waypoint to waypoint, so unless you have so many powerups that it’s possible to get anywhere in the level by just moving in a straight line from powerup to powerup, it won’t be enough to navigate properly. So you need ‘non-powerup’ waypoints anyway - at which point it’s usually easier to just use those exclusively rather than special-casing a load of code to deal with powerups as well.