Search Unity

Colored circles in a 2D top-down game

Discussion in '2D' started by SteveMR, Mar 4, 2015.

  1. SteveMR

    SteveMR

    Joined:
    Mar 4, 2015
    Posts:
    2
    Hi,

    What's the best way (in terms of look, and performance) of making flat colored circles viewed from the top in a simple 2D game?

    Thanks
     
  2. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    384
    Draw circle in paint program, import to unity, drag to scene. Now you have sprite gameobject, that is how Unity works and it is the most efficient way.
    If the circles are not moving and have the same texture, you can check "static" in top left corner of selected prefab object to enable texture batching. That way you will get the best performance.
    (Maybe except drawing your own circles via OpenGL, but hey, then you wouldn`t use game engine right? :D)
     
  3. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Actually a texture is not the most efficient way. You can have a shader which outputs a circle without any texture at all.
     
  4. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    384
    Isn`t shader applied onto texture? I may be wrong.
     
  5. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Shader is applied to the backbuffer. That is only a texture if you're drawing to a rendertexture. A shader doesn't require a texture, it's optional based on what you want the shader to do.