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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Endless snowboard game basics

Discussion in '2D' started by Trebkiller, Oct 12, 2020.

  1. Trebkiller

    Trebkiller

    Joined:
    Jul 8, 2020
    Posts:
    2
    Hi,

    I would like to try and make a game similar to Altos Adventure. I am having trouble starting.

    How to set up the terrain so that my character doesnt get stuck?

    I simply drew a test sprite for the ground in photoshop. What collider2d should I use?
    I use polygon collider and reduce friction in the material. But the character gets stuck, hits small invisible bumbs and it feels awful. The worst part is connecting 2 ground sprites together! The point where they connect is always messy.

    I have a question for the future as well. How would I add the endless part of the game?
    Would having many "pieces" set up and just spawning them as the player rides down work?

    Thanks to anyone who takes the time and tries to help!
     
  2. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,345
    Check out endless scrolling videos online, that will help you with that. I imagine you will just change it from Horizontal to Vertical.



    As for the bumps and movement, I am not sure since I dont know exactly how you are doing it now.
     
  3. Trebkiller

    Trebkiller

    Joined:
    Jul 8, 2020
    Posts:
    2
    Thanks for the video! As for my project:
    I have found that a sprite shape (editing the spine of a sprite) combined with an edge collider works real nice.
    Now I am facing a new issue. I am trying to make the character stick to the ground all the time unless the player jumps. How should I even start implementing this mechanic?
     
  4. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,345
    So since this is 2D and i imagine the player is moving from Top of Screen to Bottom it might just be easier to fake it. What I mean by that is to create a jump animation and when the player jumps, you temporarily turn off the player's collider. If you are using physics for the player to go downhill, this becomes harder as i think you will need a 2.5D game so you can use the Z plane.