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

Isometric Help

Discussion in 'Getting Started' started by B_Johansson, Jul 26, 2017.

  1. B_Johansson

    B_Johansson

    Joined:
    Jul 21, 2017
    Posts:
    13
    I recentely purchased the uMMORPG 2D asset and playing around with. Now I'm going to have isometric graphic in the game. So it will look something like this:



    For my sprites I have set that "Pixels per Unit" is 32, so that 1 tile goes from X:0 to X:2 (since my tiles are 64 in width). Thats all fine, but dragging tiles in the editor always creates decimal values. So unless I manually adjust all X coords (and Y) for the tiles 1 by 1 they are going to be slightly missplaced. Is there anyway to make the X axis to a integer value. Or some other good way of handling placement of isometric tiles?

    I display the issue in the following screenshot:

    So a way to snap them in position would be helpfull.
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    Whan dragging, hold CTRL (CMD on Mac) to snap to a grid defined in your Snap Settings. Read more about it here.

    Understand that I'm not trying to scold you or anything, but it's important to know that almost any question you can think of has probably been asked and likely answered before, or is potentially spelled out (yet tucked away) in Unity's own documentation. For example, if I Google "Unity move object snap to grid", the manual page I linked to above is the second result. Knowing how to search for stuff will go a long way in helping you learn the ropes.

    Unrelated to your question, but more a concern about the project itself: The asset that you bought... Is this the way the recommend using it? I feel like you're going to end up with a LOT of separate GameObjects this way, and manually placing them like this is going to be a massive chore.
     
    B_Johansson likes this.
  3. B_Johansson

    B_Johansson

    Joined:
    Jul 21, 2017
    Posts:
    13
    Thanks for the information, I will do that when encountering problems in the future.

    Well for the grass (the green tiles in the example screenshot) could of course be 1 larger tile covering all the floor, but for other structures such as houses etc: they might require to put out tiles 1 by 1.

    But I'm actually starting to consider the uMMORPG 3D version now but I guess the snap feature works the same for that. But regardless my plan now is to get Blender and try out pixel 3d graphics. And leave my safezone which is photoshop behind. As I understand I can get the same result in 3D but more possibilities.
     
  4. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    I don't mean to be critical of the 2D aspect of it. Rather, manually placing tiles by hand like that. Not just for the tedium of having to build things in that manner, but also for the side effect that any sizable scene is going to have hundreds -- if not thousands -- of GameObjects for the tiles alone.

    I honestly don't know if this is a problem or not. Just wanted to offer up some idea to look into in case you hadn't considered it. Look into Occlusion Culling to make sure you're not drawing elements that aren't visible to any camera.

    As far as 3D goes, if that's what you want to do, give it a shot. A lot of people hate on Blender, but I've grown to like it. And not having experience with more "professional" modeling suites, I didn't have trouble learning Blender's quirky interface.

    Just realize that there's a whole world of stuff to learn on that front, too.
     
    B_Johansson likes this.
  5. B_Johansson

    B_Johansson

    Joined:
    Jul 21, 2017
    Posts:
    13
    Occlusion Culling sounds like a very good idea to use (https://docs.unity3d.com/Manual/OcclusionCulling.html), I'll bookmark it so I remember it when the time comes for it.

    When I first began understanding that networking only supported 1 scene I was very confused how to maintain an entire world. Considering how large it would get, but then I noticed that you can use gameobjects as folders to store regions of the scene. But that only helps when navigating all the files.

    I appreciate all you write! I'm a newbie in Unity but very much looking forward to working with it.
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,851
    I think what @Schneider21 is getting at is an issue of performance (i.e. how fast/smoothly the game runs). If you really want to make a large isometric world like that, and have it perform well, you wouldn't use this approach of a separate sprite or object for every tile; instead you'd use a very different approach where a single mesh (3D object) represents most or all the contents of the screen, and that mesh is dynamically updated (by changing UV values) as you move around.

    There are third-party assets on the store for doing this sort of thing, though when I tried them out last year, I didn't much care for them and ended up rolling my own... but this is all fairly advanced stuff, that as a Unity (and programming?) newbie, you probably shouldn't tackle quite yet.

    For now, I'd say don't worry about it too much; play around and have fun! You will be learning huge amounts of stuff over the coming months, and probably creating lots and lots of nifty projects that will make your future self cringe. That's OK. :) Enjoy the process.
     
    B_Johansson and Schneider21 like this.
  7. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    Joe's right, of course. I have to remind myself to shy away from mentioning performance-related stuff because a) I don't know nearly enough about it, and b) worrying about it too early is a common problem that prevents people from Getting Stuff Done™.

    If you finish a project, chances are you'll have rewritten several parts or the entire thing (possibly even multiple times) by the time you're done. No sense worrying about an issue until you identify it as an actual problem, though.
     
    B_Johansson likes this.
  8. B_Johansson

    B_Johansson

    Joined:
    Jul 21, 2017
    Posts:
    13
    Alright thanks, I will deal with it when I notice things are getting slow =) Or when I feel I'm up for the task.
     
    JoeStrout and Schneider21 like this.