1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Pikmin style following

Discussion in 'Programming' started by Didjargo, Jan 6, 2017.

  1. Didjargo

    Didjargo Member

    Joined:
    Jun 21, 2016
    Posts:
    47
    So, a question for all of your beautiful people. There's a mechanic that I think would be neato to add to my game. I aim to have four characters travel in a tight party as directed by the player, accept that I do not want them to follow one character in a chain like yee ol' JRPG's. But rather I would like to see them travel naturally as a group. The only suitable example I can think of is in the Pikmin games when you use the right analog stick to move your group of Pikmin around. Only instead of dozens of little characters, I only need it to work with four. the whole point of this mechanic would be to visually show that no one character is the "hero" of the story. I hope that I am presenting my idea well enough here. Any help to point me in the right direction would be much appreciated.
     
  2. Phil Strahl

    Phil Strahl Member

    Joined:
    Jul 3, 2016
    Posts:
    387
    Personally, I'd have an invisible square or rhombus where each character follows one corner, so players move this invisible shape around and the characters try to stay in their formation.
    party-01.png

    If they can't (e.g. because their corner-point lies within an unreachable area, blocked by collision, they just stop and at each frame (or each other frame, or once a second) they check, whether their destination is reachable again. Once it is (meaning, the player moves the group again), they will linearly translate towards their corner point or, preferably, path-find towards it.
    party-02.png
    E.g. Chrono here stops, because his corner point is unreachable.

    I don't know about the intricacies of implementation but at least it should get you started. Hope that helps :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice