Search Unity

Unity 2d tutorial sessions

Discussion in '2D' started by konsic, Sep 27, 2016.

  1. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
  2. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    There may be new features that the video doesn't cover, but the grand majority of the concepts will remain the same.
     
  3. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    What are new 2D features ?
     
  4. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    I don't know exactly what is new since 4.5 that would be relevant to you. There are release notes for every version if you want to read through them. The point I'm trying to make is that it doesn't matter, and the tutorial is still valuable to follow.
     
    konsic likes this.
  5. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Could you tell how could one script 2D puzzle and what puzzles can be scripted in 2D game?
    I learned physics based ones from the tutorial.

    I had in mind some puzzle from adventure based games.
     
  6. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    It's entirely up to you. You can make any kind of game with Unity, you just have to keep practicing and following tutorials to learn how to use everything at your disposal. There are plenty of puzzle game tutorials on YouTube.
     
  7. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    I've se up player character but when he hits box collider from above, he stays magnetized a bit. How to tweak player so that he bounces softly from collider?
     
  8. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    Use a material, and set it to have no friction and use it in the default material in preference.
     
    konsic likes this.
  9. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Is it allowed to use Unity's Standard asset prefabs for your game concept ?
     
  10. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    I don't see why not for a concept, I'm not sure but I think you can use them in a published game
     
  11. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    When I start the game with static camera, everything looks normal.
    But, if camera starts to follow Player contoller, background and game sprites look weird with bad anti-aliasing.

    Do need to change something in sprite 2D settings to look normal when camera starts moving?


    EDIT: When I import 2D background texture 1280*700, it is distorted in game when camera moves.
     
    Last edited: Dec 23, 2016
  12. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    What size is the pixel per unit on your sprites sheets, if it's a tile based game I usually set the pixel per unit to the pixel size of a single tile so 1 unit is 64 pixels, makes it easier.

    make sure Generate Mips Maps is off, as wel set the filter mode to point this should clear the display a little better, 1280*700 is not a power of two, 640 will work better.
     
  13. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    No, I didn't use tiles. I just imported hand drawn .pngs in Unity. They are set to 100 pixel per unit.
    In Unity 5.5 generate Mips Maps is off by default. I tried with 1280*600 but the same happens.

    If I use some .jpg image, distortion is not that noticable. But, then I loose needed alpha background.

    How to fix that distortion with pngs?
    Aniso level is greyed out when I import them.
     
  14. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    Unity works better with power of 2's that why I said 640 not 600, are you importing these as sprites or as textures? Check the texture type, so is this image you have are you using it as a single image or are you slicing it up?

    A screenshot of the problem and one of your settings might help here.
     
  15. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    My .pngs are automatically sets as sprites (2D and UI) when imported.


    Its single drawn item centered on the image with alpha background.


    When player moves and camera is not following the player, everything looks fine. But, when camera follows the player, then distortion is tearing the background and sprites.
     

    Attached Files:

    • u1.JPG
      u1.JPG
      File size:
      37.6 KB
      Views:
      680
  16. piggybank1974

    piggybank1974

    Joined:
    Dec 15, 2015
    Posts:
    621
    Are as your using 5.5, it's a little different to my 5.4.1 version, but advanced is available, this might be a default thing in 5.5

    I wonder if it's the Wrap/Filter mode settings, make sure it's set to Point. not Bilinear.

    Sometimes it's not right to parent the camera to the player this could also be the problem, screenshot of the scene might help.
     
  17. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,459
    I ran your test scene and all I saw was typical aliasing artefacts of having high frequency (high contrast in this case) being rendered. Depending on the scaling of the game-view this gets better/worse. Assuming this is the type of 'distorion' you're referring to, this isn't a sprite issue.

    Unity supports Antialiasing.
     
    konsic likes this.
  18. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Thanks.
    When I import .png sprite, when I can't turn aniso level of the sprite to higher number?
    It's greyed out.