Search Unity

2D Alpha Build Leaked!

Discussion in '2D' started by Kuan, Apr 24, 2015.

  1. Kuan

    Kuan

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    87
    Hello 2D forum,

    We have a special alpha build of the Unity choke-full of 2D features available from this location.
    https://bitbucket.org/Unity-Technologies/2ddemos

    This build is special because it contains in-development early alpha features that you can actually play with. Our hopes is that you would try it out and provide some feedbacks to us using the repo’s issues section: https://bitbucket.org/Unity-Technologies/2ddemos/issues

    We decided that since those features are early alpha, we kindly ask issues about them to be posted at the repo instead of here. This will help keep this forum helpful and targeted for users of existing production build.

    Thank you!
    Team 2D.
     
    karl_jones, chelnok, sluice and 7 others like this.
  2. Kuan

    Kuan

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    87
    New Features
    • 2D Primitives
    • 9-Slice
    • Android ETC1 Compression
    • Masking
    • Smart Sprite
    • Tile Map Editor
    Improvements
    • Sprite Packer
    2D Primitives
    • Create 2D primitives as Game Objects
    • Circle
    • Diamond
    • Hexagon
    • Square
    • Triangle
    9-Slice
    • Intelligently scale sprites based on the modified axes
    • Tile sprites as a whole or partially
    Android ETC1 Compression
    • Split color and alpha into separate textures during sprite packing for Android builds
    • Improved rendering performance
    • Smaller game build size
    Masking
    • Ability to mark a sprite renderer as a mask or maskable.
    • Masking is applied according to sorting layer instead of game object hierarchy.
    Smart Sprite
    • Create a shape and the shape will be tiled with the right sprite textures
    • Assign sprites to edge angles and all edges will be smartly tiled with the required sprite
    Tile Map Editor
    • Layout tiles on a grid in the XY axis
    • Palette window for painting sprites onto tile map
    • Select multiple sprites
    • Rotate sprites
    • Custom brushes by extending from GridBrush for better functionality
    • Road painting brush
    Sprite Packer
    • Improved sprite packing tag
     
  3. NathanHold

    NathanHold

    Joined:
    Jul 17, 2013
    Posts:
    58
    I can't believe no-one has replied yet. This is very cool and just as I was going to re-factor my own tile map! I can't wait until others have a play of these features, maybe I shouldn't have gotten pro refunded. These are all features that will hopefully bring the 2D capabilities almost up to that of Game Maker.
     
  4. mikematusiak

    mikematusiak

    Joined:
    Feb 10, 2014
    Posts:
    2
    I am going to try it as soon as this weekend :)
     
  5. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    174
  6. fercb17

    fercb17

    Joined:
    Dec 26, 2013
    Posts:
    13
    This is really cool, thanks for releasing these new tools. Can't wait for them to be out of alpha so I can start using them in my projects! Hopefully they work really well for mobile :)
     
  7. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Great work, are you going to apply a similar approach to other areas of Unity e.g. Terrain, Prefabs etc???
     
  8. LiberLogic969

    LiberLogic969

    Joined:
    Jun 29, 2014
    Posts:
    138
    Wow, this looks awesome. Can't wait to see the finished release!
     
  9. Aedous

    Aedous

    Joined:
    Jun 20, 2009
    Posts:
    244
    This is so awesome, the timing for everything is just :O, really interested in the masking feature and the smart sprite feature, not really sure how the others will fit in an isometric game but I'm sure some 2D developers out there will be so happy right now!

    Guess the only thing missing off that list is the 2D bone animation system, but I'm sure that's in the road map :). Keep up the good work guys can't wait!

    P.S Any chance we can get a sneak peek at future plans for 2D? :D. Maybe even a adding extra pivot points onto a sprite for spawning effects at the right position :).
     
  10. trudeaudm

    trudeaudm

    Joined:
    Apr 17, 2013
    Posts:
    116
    2d Fixed joints, and importing vector graphics...
     
  11. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    This is an experiment. If it is successful, and we get lot of good feedback and value, then perhaps other teams will follow.
     
  12. LiberLogic969

    LiberLogic969

    Joined:
    Jun 29, 2014
    Posts:
    138
    I would really enjoy seeing the Shuriken particle system given some 2D quality of life love :) Maybe its just me, but for some reason I always have trouble working with it in my projects... to the point where I've written my own simplistic particle scripts...
     
    theANMATOR2b likes this.
  13. mikematusiak

    mikematusiak

    Joined:
    Feb 10, 2014
    Posts:
    2
    Last edited: Apr 27, 2015
  14. Deleted User

    Deleted User

    Guest

    Since I don't own a pro license, would like to ask to who does and is trying this build a few things or even if a dev from UT can reply.

    First how is structured the TileMap, is it a component containing all the info from an atlas sprite? It would be possible to construct a TileMap at runtime populating it from external data (for example) instead of using the editor?

    If all of this is possible how the tile map know where each sprite goes, it reference the sliced sprites by name, index or?

    Asking this because I would like to prepare my map construction system out of it instead of generating normal meshes and messing with uvs, it would speed up things.

    Last thing, how the TileMap deal with vertex count? I mean if it exceed the amount per tile map of vertices, does it divide it internally on it self or gotta create another game object?
     
    rakkarage likes this.
  15. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    If you want to get more feedback, I'd recommend not requiring people to leave it on BitBucket. It requires creating an account. Why don't you just create a separate forum and make it only visible to pro users? It'd be so much simpler.
     
    Jessy, Ostwind and mikematusiak like this.
  16. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    @Aedous and trudeadm
    :)

    @LiberLogic969
    Do let us know what you would like to see from a 2D Shuriken system!

    @mikematusiak
    We do not have any guides on how to create a customised brush yet, but we will get one up soon. In the meantime, the Tilemap demo contains a few examples of customised brushes which you can experiment with.

    The general idea would be to extend from the GridBrush class and override the following two methods:
    • Paint
      This paints an element into the selected tile. Depending on your requirements, you can add logic here which looks at the surrounding tiles and determine which tile would be right to add to the spot.
    • Erase
      This erases an element in the selected tile. Similarly, you can customise it to erase tiles or other game objects based on the selected tile location, or do something totally different.
    @Neurological
    The Tile Map is a component that stores the tile map data. The tile map references sprites based on its instance id. You will be able to create and manipulate the tile map during runtime by using existing sprites or importing sprites through asset bundles.

    The Tile Map Renderer component handles and optimises the rendering of the Tile Map, and will internally split the rendering if it goes over the vertex limit.

    @Exploding Rabbit
    That is a good idea, we will look into having a forum where we can discuss any concerns about the 2D features.
     
  17. LiberLogic969

    LiberLogic969

    Joined:
    Jun 29, 2014
    Posts:
    138
    Hmm, Allow the user to lock particles to the x and y axis. 2D emitter shapes like Line and Point.

    Personally I would love a replacement for Materials in 2D particle effects. Maybe like a ParticleMaterial2D is added to a 2D particle effect which would let you choose the Sprite, Color, BlendingMode (Additive || Alpha), and SortingLayer in the inspector without having to make a separate material for each type of particle.

    Just a few thoughts :)
     
  18. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369

    So Tile Map allow to suppress overhead of dynamic batching ?
    I have to render 120x80 tiles for my minimap but because of overhead of dynamic batching that takes 30 ms.

    Tile map will have dynamic size ( can we resize it in runtime ) ? Or a size limit ?
    it will work for isometric map ?
     
    Last edited: Apr 28, 2015
  19. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    One simple thing - Sprite support! Allow us to use Sprites as our particles!
     
  20. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    This is really great news!

    Not sure exactly where to leave feedback as the blog & repo say leave it on forum but at the top of this thread ... well lets try here:

    I build 2d games in Unity as a job, I've been bending Unity to do 2d for years. Here are some of my thoughts & questions from a game dev:

    for Sprite Editor:
    • If you save a spritesheet in photoshop (some small graphical change) any new sprite boundaries you have drawn will be reset. Prefered functionality is that it just updates the image.

    • dragging the sprite handles on the Mac with Wacom is slow and unresponsive. This applies to Unity product wide. Would be nice if this could be finally fixed! Wacom is a pro tool, I can’t be the only one having this issue.

    • Arrow keys are unassigned in Sprite Editor. These could be put to good use for cycling through sprites for easy naming (naming is probably the largest time sink in this editor window right now).

    • Custom grid view & snap to grid would be welcome in Sprite Editor.
    In general concerning 2D:
    • Physics calculations for pixel art games would be very much appreciated. Currently physics is strange when using small sprites. Is there any plan to tackle this?

    • 8px by 8px is 0.08 units in Unity. We are using raycasting instead of physics as a current solution.

    • I’m currently using 2DToolKit’s cameras for everything in my game as it has screen resolution features, sadly it’s not compatible with Unity’s new UI canvas.

    • The standard unity camera has no pixel size, are there any plans for pixel perfect 2d cameras?

    • We use 2DToolKit’s tile mapper, which works well, but all tile maps are created in Tiled and exported using the TMX format. Are there any plans to use TMX?
    Tilemapper:
    • I make heavy use of the fill, custom brush (selection of tiles) and random tile from selection tools that are offered in Tiled and 2dToolKit. Would be nice to see these functions.

    • do you see layers being part of the tilemap like in TMX format or just several tilemaps each as their own layer?

    • We use large Collision2d polygons that are automatically drawn from tiles with collision info in 2dToolKit, this function is very useful.

    • whats the current thinking on how to make animated tiles? Can we replace any tile with a prefab? (this also pertains to destructible terrains, ladders etc. If they can be drawn in tiles as prefabs, like with 2dToolKit this would be very useful)
    Animation:
    • dragging of multiple sprites onto timeline would be welcomed, or an auto detection by name and number (2dToolKit does this) per Animation on Sprite. Currently need to do this by hand and can be laborious on large anims.
    • Animator: Auto no blend when using sprites or special sprite mode. You'll be hard pushed to find someone who actually wants blending here, maybe a 2d mode for animator?
    • turn blending off between samples for movement, scale, rotation. Theres often cases where you'd like a hat or weapon to be assigned to the player, the easiest way is to add this to the animation and turn it on when you need it. However, if you animate its position to match the player, you have blending in the samples. Would be far better to have a 2d animation system with frames and frame rate. Samples almost always causes problems for pixelart sprite animation.
    • Swap spritesheet at runtime! This is a classic request. ;) Something that can be done easily in other games engines for variations on enemies etc. without giving them their own animators per variation.
    Thanks for listening! Would love to see Unity expand the 2d tools and... thanks for masking!
     
    Last edited: Apr 28, 2015
  21. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    (this is possible already, just make a diffuse material, drop your sprite in, then change it to a sprite, then assign that to the emitter and set the size to the sprite size in 100 per 1.0 unit. You can't use sprite sheets, but I'm sure that will arrive one day. You can now assign render layer too, before this had to be done in code. I've been using this process for over a year now)
     
    theANMATOR2b likes this.
  22. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    This is exactly what I want to do with sprites in particle systems....
     
  23. HugoZandel

    HugoZandel

    Joined:
    Mar 11, 2014
    Posts:
    52
    PNG support for textures would be really needed since you can have better quality for less size then an uncompressed texture. ETC1 splitting for Android is a great news but sometimes you want more and uncompressed textures are just too heavy for mobile games. Furthermore, devices with 4 GB of RAM are starting to come out. The memory size of PNGs is not that problematic anymore.
     
  24. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    174
    In the near future, everything will be lz4 compressed on disk, not just textures. This is why we haven't implemented png support. Furthermore, lz4 decompress is many times faster than png. Stay tuned for this feature.
     
    HugoZandel likes this.
  25. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    @LiberLogic969 and @StarManta
    Good suggestions for the 2D particle systems, we will definitely look into having sprites from spritesheets as particles.

    @lenneth78
    The Tile Map Renderer will handle and optimise the rendering of all its tiles together, which would have less overhead than all the sprites separately. The Tile Map will be able to handle isometric view in the future and we will look into being able to resize the Tile Map during runtime as well.

    @hawken
    That is a lot of great comments! We will look into them, but here are some comments:
    • We are looking into a pixel perfect solution, more details would be forthcoming.
    • There will be fill functionality for painting the tile map. If there is some custom behaviour you required for painting the tile map, it would be possible to code and create a brush that would do what you want.
    • Right now in the alpha build, you will need multiple tile maps for each layer. We will investigate on having internal layers in the tile map itself.
    • We are evaluating the importing of TMX formats for the tile map as well.
    Thank you all for your suggestions so far! If you have any more ideas or workflow requests, do let us know.
     
  26. IntDev

    IntDev

    Joined:
    Jan 14, 2013
    Posts:
    152
  27. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    402
    I am so incredibly excited about this!
     
  28. HugoZandel

    HugoZandel

    Joined:
    Mar 11, 2014
    Posts:
    52
    Thanks for the response! Did some tests with .assets and it's pretty impressive!
     
  29. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    295
    Looking good! Personally I'm sure I'll find use for smart sprites and ETC1 color + alpha split. Now add in 16-bit dithering for RGB565 / RGBA4444 and it's golden! :)
     
  30. Free286

    Free286

    Joined:
    Oct 29, 2013
    Posts:
    23
    I replied as a comment to the unity blog post, but will copy to here so we can keep all feedback in one place.


    Features that would really help working with sprites.

    – ability to place text in scene that is pixel perfect. Having to create a root object for canvas is cumbersome if we have many objects that are created and destroyed.

    – Ability to set half resolution on all sprites automatically, our assets are at retina resolution but quality settings ‘half resolution’ does not affect Sprites.

    – We have custom editor scripts to set the order in layer of sprites based on order in hierarchy (so they sort like canvas). Sorting if ‘order in layer’ is same should be same as canvas, currently if order in layer is same the sorting order is random, and different between OSX and iOS which can lead to weird bugs.

    – related to previous point, it would be nice if total order relative to top of hierarchy value was exposed as this value could be used to sort sprites, meshes, ect.. And also to sort input layering.

    – we have bugs sometimes on our sprite atlases where they stop batching randomly, we have editor scripts which set sprite packing tags automatically, which might be related? The only way to fix is to reimport the folder with textures or rebuild the sprite atlas cache.

    Not related to sprites but would be nice.

    – ability to cancel physics2D collision events on non-triggers.
    – when rescaling a body interpolation is turned off temporarily, there should be an option to keep it on.


    – in editor mode the raycast to pick which object is selected is a bit strange sometimes, there should be an option to make objects like background textures not immediately selectable. (2 clicks?) canvas also covers everything, even empty space inside it and is huge so overlaps part of scene and generally gets on the way.
    – not related to sprites, but it would be nice to have the ability to set a default camera’s frustum even if there is no camera in scene, as we only spawn camera at runtime.
    – not related to sprites, but it would be nice if unity didn’t keep regenerating meta files of empty folders which get continuously committed to git. Unity could perhaps not generate folder meta files for empty folders, and make sure the unique Id generator will always generate the same value for the same path..?

    (reply from Paul Tham)

    We acknowledge that sorting needs to improve and it will. Look out for it in the near future.
     
  31. Berlo

    Berlo

    Joined:
    Jan 9, 2015
    Posts:
    1
    This is awesome. I am really looking forward to working with the map editor. Tiled is an amazing tool but being able to keep all my development within Unity is never a bad thing.
     
  32. kuchaku

    kuchaku

    Joined:
    Oct 14, 2014
    Posts:
    37
    I'm really pleased to see the 2D side of Unity isn't being left to the wolves. As a small developer 3D games are simply not within my reach and my primary interest is in 2D games, but Unity is hit and miss compared to other platforms.

    The masking in particular could be potentially extremely useful. I have been struggling with an efficient method of having a sprite not draw its pixels if what is behind it is s transparent (so it would only layer over existing foreground elements). If masking or another efficient solution it would be extremely useful in layering effects and decals:

    http://forum.unity3d.com/threads/ca...f-a-cameras-background-is-transparent.321090/
     
  33. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    298
    The new 2D features look great, so I'm looking forward to giving them a go. Really cool to open up the Alpha to us. I hope this approach is also taken with other areas of Unity.
     
    Last edited: May 5, 2015
  34. LiberLogic969

    LiberLogic969

    Joined:
    Jun 29, 2014
    Posts:
    138
    I would also love to see 2D bounding volumes. Similar to collider2D but instead of repelling things it keeps objects inside its shape. So objects could collide like normal against the insides of the bounding shapes instead of being repelled out.
     
  35. Radiant_Cadenza

    Radiant_Cadenza

    Joined:
    May 11, 2015
    Posts:
    5
  36. kmezz

    kmezz

    Joined:
    May 10, 2015
    Posts:
    2
    Is there any expected (official) release date for this new bundle of features? I don't think specific dates matter, but it would be nice to have a rough estimate (June... July...?).

    Thanks! Everything looks great!
     
  37. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    There is no release date and even internally nobody really knows yet when they are done. Like said in the bitbucket readme, some features might not ever come out. It is not guaranteed.

    Also not all of the features will probably come in a single release, but one-by-one depending on when they hit the release quality.
     
  38. AntFitch

    AntFitch

    Joined:
    Jan 31, 2012
    Posts:
    243
    Hello, I have a question about the road painting brush. Can we use it to create animated water? For example, in a top-down 2D RPG, there could be streams, rivers, oceans, etc. Using animated sprites to create these things would be tortuous.

    Also, will we be able to paint at run-time?

    Beautiful work!
     
  39. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    One single looping animation per tile is coming. Anything more complex & interactive and you need to do it with separate GameObject. You would be able to paint animated rivers or at least script your own custom brush to do that.

    Painting in run-time will work in the sense that you can call the same code for actual Paint() that the editor calls, but you'd have to create the user interface for painting (gizmos, mouse clicks, etc.) yourself.
     
    AntFitch likes this.
  40. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Oh Unity, how I do love you. That smart sprite is sexy.
     
  41. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,139
    Is there any chance to get a working navigation system built into unity's 2D features? Right now you either have to roll your own or forsake most of them in favour of using 3D with 2D elements.
     
  42. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    We are also working on bringing the Unity NavMesh to 2D
     
  43. WebMagi

    WebMagi

    Joined:
    May 24, 2015
    Posts:
    23
    Any plans to add the ability for an object to awake on a specific distance from the character?
     
  44. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    402
    Will there be any fixes for the Trigger2D -> Trigger 2D collider issues that have constantly plagued simple hit detection? (Where OnTriggerEnter2D doesn't fire consistently)

    I have a consistently reproducible scenario where 3 identical, unique, unrelated dynamic objects do not even raise the OnTriggerEnter2D event) about 60% of the time against a separate dynamic Trigger2D box collider, despite all 3 interpenetrating the same box using rigidbody2d's velocity.
     
    Last edited: May 24, 2015
  45. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,139
    You can do this from script pretty easily by comparing the Vector2 distance between the object in question and the player position.
     
  46. Manny Calavera

    Manny Calavera

    Joined:
    Oct 19, 2011
    Posts:
    205
    Yes, please!
     
    Deleted User likes this.
  47. WebMagi

    WebMagi

    Joined:
    May 24, 2015
    Posts:
    23
    Thanks @Murgilod. I believe your recommendation is similar/identical to @inthemilkywat, and my answer/follow-up questions can be seen here: http://forum.unity3d.com/threads/ho...-distance-from-character.327911/#post-2126867

    Sorry for the duplication. I guess what I'm asking specifically here in this thread is if there are plans to add the ability for a Rigidbody 2D component to use distance-based settings to awaken an object?

    I've also added this feature request as a proposal here: https://bitbucket.org/Unity-Technologies/2ddemos/issue/45/set-rigidbody-2d-to-awake-on-distance
     
  48. wrstscrnnm6

    wrstscrnnm6

    Joined:
    Jan 31, 2011
    Posts:
    20
    Has anyone else had trouble getting the palette to see sprites in the project?

    When I load up the example project the palette works like it does int he videos/documentation. When I spin up a blank project and import some sprites, I can't get the palette to see anything.
     
  49. LiberLogic969

    LiberLogic969

    Joined:
    Jun 29, 2014
    Posts:
    138
    Are your individual tile sprites the same size as your TileMap Grid Cell?
     
  50. wrstscrnnm6

    wrstscrnnm6

    Joined:
    Jan 31, 2011
    Posts:
    20
    My individual tile sprites are 32x32 px (sliced up from a sheet if that matters)
    Where should I check the "TileMap Grid Cell"? (I attached a shot of the inspector with my current settings)
     

    Attached Files: