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

What is the best way to get crisp, perfect simple geometry? (advice - transitioning from Processing

Discussion in '2D' started by alexobviously, Apr 21, 2020.

  1. alexobviously

    alexobviously

    Joined:
    Feb 23, 2014
    Posts:
    7
    Hi guys, I'm not exactly new to Unity - I've done quite a lot with it, but all in 3D. This is my first attempt at doing something 2D in Unity and it is going smoothly enough but I'm having one problem and I was wondering if anyone had any recommendations on how to fix it or work around it.

    I made this prototype game demo in Processing (java-based programming language for visual art): https://www.reddit.com/r/processing/comments/g3pnwd/prototype_minimal_strategy_game_in_processing/

    This was really fun to make, I just wrote 1000 lines of code in half a day and I have this nice, working prototype with crisp, simple graphics with no weird visual artefacts or scaling problems or anything. I'd love to keep working on this in Processing but it's not really suited to game development so my plan was to recreate it in Unity, and all the game logic etc is fine but graphically it isn't measuring up.

    In Processing, I'm literally just drawing circles and lines to the screen with ellipse(x, y, diameter) and line(x1,y1,x2,y2). It seems this is not an option in Unity, and I understand why, the paradigm is very different and there are a lot of layers of abstraction between something you create in the editor and the screen. So I'm using sprites at the moment. I have two problems with this:
    1) I don't like it conceptually. It feels like a really clunky way to draw shapes on the screen.
    2) It's ugly. They look weird when they move around or when you zoom the camera out.

    So I'm wondering what other options there might be for drawing shapes. I saw someone suggest using linerenderers somewhere, but I don't think that's efficient enough?

    I suppose shaders might be an option? I don't really know how to write them though.

    Any other ideas welcome, or as a last resort, suggestions on how to make sprites look less terrible.

    Thanks in advance :)
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,563
    Unity doesn't offer this kind of thing out of the box unfortunately. There are various AssetStore offerings out there such as ALINE however.
     
    alexobviously likes this.
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,000
    alexobviously and MelvMay like this.
  4. alexobviously

    alexobviously

    Joined:
    Feb 23, 2014
    Posts:
    7
    Thanks a lot guys. I've bought ALINE, looks pretty good, just currently waiting for the asset store to stop being bugged (stuck on 0% download).

    edit: got it working. Exactly what I wanted :)
    Thanks again!
     
    Last edited: Apr 21, 2020