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

Building World Editor like Warcraft 3..

Discussion in 'Scripting' started by forbidden, Mar 6, 2013.

  1. forbidden

    forbidden

    Joined:
    Mar 6, 2013
    Posts:
    36
    Hi All,

    I am working on building a word editor like warcraft3 in unity.
    Of course, the ultimate goal is a full blown RTS game...
    But for now, I am just trying to get the systems working.

    What I have done is build a grid generation system that generated blocks in a grid on a 3d plane..
    These blocks are to be my tile blocks.

    I also managed to get the blocks to update their material based on where I click.

    I attached some screen shots, of what I have so far.

    Now, the next part is a bit more tricky.. not that the other parts where easy..
    As I a complete newb to unity... as I have only been working with it off and on for about 3 weeks.

    Now, that I have the basic paint operations..
    My next step is to reproduce the tile logic you see in the warcraft3 editor.
    IE.. when i paint a dirt path down.. I need it to automatically know what blocks to print on the outside of the path and be able to make the smooth transition you see in warcraft3s tile map.

    Any one know any resources or can explain some of the logic behind making the tiles not blocks.
    I don't want isometric tile layout, I do want real 3d and if you look at the warcraft3 editor it is real 3d.
    It is not a faked isometric engine.

    Thanks!
     

    Attached Files:

  2. 3ICE

    3ICE

    Joined:
    Mar 18, 2013
    Posts:
    1
    To get you started...
    Warcraft 3 uses the following texturing system:
    $Village_Crops.jpg $Village_Fall_Grass_Thick.jpg
     
  3. Annihlator

    Annihlator

    Joined:
    Oct 15, 2012
    Posts:
    378
    If it's mainly about being able to 'blend' on the fly, i think it might be best to use 'vertex blending' by using vertex color you can then blend between up to 4 different materials, myself i'm still bisy with getting this to work properly, but maybe you might have more luck with it :)
    Another option could be a script which checks a tile-s neighbours and determines it's selected model/texture depending on those criteria. The latter is (especially when updating all the time) probably quite more resource-intensive however.
     
  4. dave_mm0

    dave_mm0

    Joined:
    Feb 8, 2013
    Posts:
    26
    An good compromise between algorithm-intensive and asset intensive map edition is to divide your tiles into 4 sub-tiles. These will have their models and textures set according to what tiles are next to it. The main drawback of this is that you will need quite a few assets that meet seamlessly at edges.

    You can also take a hybrid approach where you have a set of premade tiles that only blend their edges together (vertex and textures).

    Note that a tile-based map editor is not well suited for any large-scale map, but should be fine for any standard RTS game.

    Then, to avoid your tiles looking like they repeat time and time again, you can add random noise and bump-mapping to your blended tiles.
     
  5. Annihlator

    Annihlator

    Joined:
    Oct 15, 2012
    Posts:
    378
    Just be sure to use world-position oriented noise though :) else your tiles might still be repeating and worst of all edges could become more clearly visible.