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

Does it make sense to make an entire game with Canvas?

Discussion in '2D' started by omgdave, May 24, 2015.

  1. omgdave

    omgdave

    Joined:
    Nov 30, 2014
    Posts:
    8
    I've been looking into Canvas and the 2D stuff and I'm at a weird crossroads. Basically, I see my options as:

    1. Canvas/Image
    2. SpriteRenderer
    3. 2DToolkit

    I am making a puzzle game on mobile which is entirely 2D with no 3D elements at all.

    Canvas seems dedicated to UI/Menus, but the tools in this seem like the easiest approach. The Image component has a lot more functionality than the SpriteRenderer. But I don't want to misuse a class which is meant for UI.

    SpriteRenderer was my first choice, but it seems like there is no functionality for Tiled/Sliced sprites in the SpriteRenderer. Should I write my own? I also saw this functionality coming soon in another post.

    As an example, if I were making Tetris, would it make sense to build the entire thing in Canvas? or use SpriteRenderer for the pieces and use Canvas for the Score/UI?

    What about a game like SuperCrateBox? The action takes place on one screen, but there is a lot going on. For the ground, you would want to tile a sprite, and you can't tile a SpriteRenderer sprite without writing your own stuff. Does it make sense to write my own Tiling/Slicing classes for SpriteRenderer?

    Thank you for replying!
     
  2. omgdave

    omgdave

    Joined:
    Nov 30, 2014
    Posts:
    8
  3. TheCodez

    TheCodez

    Joined:
    Sep 19, 2014
    Posts:
    14
    I would use the SpriteRenderer, I saw some thread somewhere saying that the UI is quite slow. Besides sprites can do just as much as UI images, what can they not do?
     
  4. omgdave

    omgdave

    Joined:
    Nov 30, 2014
    Posts:
    8
    I have to write or buy my own code for tiling/slicing sprites. I don't know of anything else.

    Like, if you have a tiling sprite for the ground, you would have to duplicate the sprite and position it by hand (done in the Angry Birds Demo) or write your own wrapper class for tiling. Unless I'm missing something...
     
  5. omgdave

    omgdave

    Joined:
    Nov 30, 2014
    Posts:
    8
    I just saw a video from Unite where they say go for it. whatever works