Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Dynamic maps - are they hard to do?

Discussion in 'Editor & General Support' started by hsparra, Jul 12, 2005.

  1. hsparra

    hsparra

    Joined:
    Jul 12, 2005
    Posts:
    750
    First, I am new to game programming. Now that that is out of the way:

    I am just starting to look at Unity, and was wondering, how difficult is it to create dynamic maps in Unity? By dynamic, I mean maps that are generated at run time. The maps would be 2.5D and be generated with pre-existing objects/models. Nothing jumped out of the scripting documentation, but I was just skimming. Oh, and by maps, I guess that would be what others would call levels.
     
  2. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    It depends on the map, but quite simple, really.

    You would do that by writing a script that clones a bunch of premade prefabs into a level. The hard part is of course the actual generation ;-)
     
  3. Krispy

    Krispy

    Joined:
    Jun 6, 2005
    Posts:
    69
    If you're talking about tile maps, there's some great tutorials out there for 2D stuff. I'm not sure exactly what you're looking for.
    Why bother with generating maps when you can pre-make levels as different scenes in Unity? I'm new to this (excellent) program too, so ;)
     
  4. David-Helgason

    David-Helgason

    Moderator

    Joined:
    Mar 29, 2005
    Posts:
    1,104
    Not too hard. You can build you level 'elements' or 'pieces' as prefabs, then write a script which will instantiate them in a grid randomly or according to some system you devise (say, according to fixed random seeds to create an infinitely big world!)

    Post in the forums when you get so far and we'll try to help you.

    d.
     
  5. hsparra

    hsparra

    Joined:
    Jul 12, 2005
    Posts:
    750
    Thank you for the responses. It is good to know that the scripting can easily handle the task.

    As to why I would want to dynamically generate the map, I want to dynamically create the maps since it is a space theme and the maps are normally sparse with PvP. Of course, I am going to have to dig into the networking code since Unity doesn't appear to have pre-made client/server objects or functionality. The dynamic level is more of a resolution space than something you need to always pass through to get to someplace else. In simplified terms, you move about, you bump into "someone", there is some ship style (not figher style) combat, then you move on. Think somewhat of a simple minded Eve. Basically, you, and others (including AI), move around on a fixed map, and combat is resolved on a dynamic map.

    I am looking at Unity to see how it would be for such a game.
     
  6. David-Helgason

    David-Helgason

    Moderator

    Joined:
    Mar 29, 2005
    Posts:
    1,104
    That sounds very doable. Easy to implement, a bunch of work to make fun. But that's how game making usually is with Unity. We remove the technical issues, so only the difficulty inherent in making fun games is left...

    Joe (or is it Nich) usually says: we take the pain so you don't have to.


    Have fun creating,

    d.
     
  7. hsparra

    hsparra

    Joined:
    Jul 12, 2005
    Posts:
    750
    That is exactly what I am looking for :D
     
  8. David-Helgason

    David-Helgason

    Moderator

    Joined:
    Mar 29, 2005
    Posts:
    1,104
    Most people are, man, most people are...

    Some don't know it though, so it's our shared responsibility to let them into the know : )