Search Unity

Academic question: AI waypoints

Discussion in 'General Discussion' started by sotokangr, Apr 19, 2014.

  1. sotokangr

    sotokangr

    Joined:
    Jun 3, 2010
    Posts:
    25
    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...
     
  2. JovanD

    JovanD

    Joined:
    Jan 5, 2014
    Posts:
    205
    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.
     
  3. SmellyDogs

    SmellyDogs

    Joined:
    Jul 16, 2013
    Posts:
    387
    Uhhhh...what's the question?
     
  4. sotokangr

    sotokangr

    Joined:
    Jun 3, 2010
    Posts:
    25
    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!!
     
  5. JovanD

    JovanD

    Joined:
    Jan 5, 2014
    Posts:
    205
    Now im confused as hell, are you building a game or cheating on some kind of test? 0.o
     
  6. sotokangr

    sotokangr

    Joined:
    Jun 3, 2010
    Posts:
    25
    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 :)
     
  7. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    They can be.. whether or not they should be all depends on the design of your game.
     
  8. RalphTrickey

    RalphTrickey

    Joined:
    Apr 7, 2013
    Posts:
    76
    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.
     
  9. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    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.
     
  10. eskimojoe

    eskimojoe

    Joined:
    Jun 4, 2012
    Posts:
    1,440
    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?
     
  11. msl_manni

    msl_manni

    Joined:
    Jul 5, 2011
    Posts:
    272
    Poweups cant be waypoint. They are destination where a path of waypoints lead to.
     
  12. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,658
    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.