Knights Tour Puzzle

Discussion in 'RPG Maker MV' started by TriceratopsX, Jan 24, 2017.

  1. TriceratopsX

    TriceratopsX Veteran Veteran

    Messages:
    264
    Likes Received:
    404
    Location:
    Enabion
    First Language:
    English
    Primarily Uses:
    RMMV
    Alright, so while trying to come up with cool puzzles for my game I thought it'd be neat to have a Knights Tour puzzle (and some variants) however I am at a loss as to how to make one of these purely by eventing (it doesn't help that I'm tired and need sleep -_-)


    For those that don't know, a Knights Tour looks kinda like this


    [​IMG]


    So you have to move the Knight around the board hitting each space only once, however I'm at a loss trying to recreate this in MV.


    Any help would be amazing.
     
    #1
  2. frzhrt834

    frzhrt834 Infamous Warrior of Storms Veteran

    Messages:
    139
    Likes Received:
    13
    Location:
    Inside my lore
    First Language:
    French
    Primarily Uses:
    RMMV
    How must the player move it? Is it drag and drop on the spaces?
     
    #2
  3. TriceratopsX

    TriceratopsX Veteran Veteran

    Messages:
    264
    Likes Received:
    404
    Location:
    Enabion
    First Language:
    English
    Primarily Uses:
    RMMV
    Well I was trying to come up with a way to have the player move using the keyboard, but to do that I'd need 8 directional inputs (and now thinking about it from a fresh perspective today, I think I might be able to use either http://yanfly.moe/2016/01/23/yep-061-button-common-events/ or http://yanfly.moe/2016/03/06/yep-80-keyboard-config/ in order to facilitate this) so to answer your question, no it is not drag and drop.


    However ignoring the movement for now, I'm trying to think of how to count the spaces as "cleared" and/or how to show this to the player, my initial attempt was to have the space set to "player touch" which would activate a self-switch where the second pages image would be the green orb. However this.... Didn't work with how I had set up the movement as I was using move-routes so the player would move like a Knight, but every square they touched on the way lit up as well, instead of just the one they land on.
     
    #3
  4. DuncanS

    DuncanS Veteran Veteran

    Messages:
    160
    Likes Received:
    96
    Location:
    Toronto, Ontario, Canada
    First Language:
    English
    This sounds like a really cool puzzle idea, though likely a bit tricky to implement. In terms of the movement, maybe something like this?

    Conditional for direction and then jump to one of the two possible locations based on button press (could use button common events for this as well, just do directional checks in each of the common events and jump accordingly).


    knight_tour_01.png


    Use impassable/passable tiles to 'lock' the character in place (there's probably a better way of doing this):


    knight_tour_02.png



    Then you would need out of bounds checks so the player has to stay in the grid, collision triggers on each tile to mark the visited tiles, and pass/fail conditions to finish/reset the puzzle.
     
    #4
    GoodSelf likes this.
  5. GoodSelf

    GoodSelf Zhu Li! Do the thing! Veteran

    Messages:
    504
    Likes Received:
    896
    Location:
    Orlando
    First Language:
    English
    Primarily Uses:
    RMMV
     This is tickling that part of my brain that wants to make me try this and see if I can get it to work but there's so many different possible movements you can make, that would be a lot of eventing.


    i've made sudoku before in Ace, maybe I'll give this a shot if I ever have free time,  which almost sounds like a joke
     
    Last edited by a moderator: Jan 25, 2017
    #5
  6. Diretooth

    Diretooth Lv. 23 Werewolf Veteran

    Messages:
    1,197
    Likes Received:
    435
    Location:
    Earth
    First Language:
    English
    Primarily Uses:
    RMMV
    #6
  7. TriceratopsX

    TriceratopsX Veteran Veteran

    Messages:
    264
    Likes Received:
    404
    Location:
    Enabion
    First Language:
    English
    Primarily Uses:
    RMMV
    #7

Share This Page