Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[ Help ] Box pushing platformer game?

Discussion in '2D' started by admone, Aug 26, 2017.

  1. admone

    admone

    Joined:
    Aug 22, 2017
    Posts:
    4
    Yello! I've stumble upon this game (video:
    ) and was thinking is it possible for us to create the similar gameplay?

    basicaly: a platformer game; you must push boxes to fill out gaps/hole in order for your player to cross the road
    if its possible, what kind of function do i use? could collider do the job?
     
  2. Deleted User

    Deleted User

    Guest

    You could absolutely make a game like this, I'm not sure colliders are necessary for this, you could just store everything's position in and object type in a class and just calculate your position relative to other object's positions and react accordingly.
     
    JoeStrout likes this.
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,840
    I fully agree with @Nkoeppel here. If it's a grid based game, save yourself a lot of headache and do not use physics for this. You know where everything is in the grid; you know how you want things to react when you move into a given grid cell; just write some code to make them react that way.

    (Incidentally, these types of games are called Sokoban games. I spent too many hours as a youth doing the sokoban levels inside Nethack...)
     
  4. admone

    admone

    Joined:
    Aug 22, 2017
    Posts:
    4
    i'm relatively new in this coding thing, could you explain more?