Announcement

Collapse
No announcement yet.

Map Generator- Please Critique!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    Originally posted by Ian Shadden View Post
    Thinking about it, just on a map level, foregoing units and the like, you could just duplicate the map east and west, then create a camera system that wraps once it hits the border of the map.

    I don't know if there's some fancy way to handle it... maybe the world browser can load the same map just offset (assuming you use "random streams" for all your random generation). If it does, you'd have automatic re-centering of the world once you cross the border. You'd still have to tell it to move the levels around once you cross that border (not even sure it can do this).

    Making the map repeat really isn't that big of an issue, in fact you could just re-use the data you already have and add to the instanced static mesh components you have. The real trouble comes when you add in units and need to duplicate movement and the like...
    Yeah I could pretty easily respawn the map as I move east, kind of as if I am on a tank track. Maybe 1 row at a time as I move.

    Maybe if I use 2 sets of Vector Arrays:

    1. One Vector Array stores all the tiles for gameplay purposes. It would be the original map Vector Array.
    2. Another Vector Array stores all the tiles for render and GUI purposes.

    The problem would be properly updating arrays using some middle layer. My head is spinning just trying to think about how that would work. It could be done though, so I will keep it in mind.


    Ideally, there would be a giant portal wall that the player just passes through, and which also passes visuals. My map already generates in a way that makes each end ready to mesh together, so it should just be a matter of getting the portal to work. I will do some research and see if I can come up with something.


    Originally posted by Fen View Post
    Thanks a lot Zeustiak, Ian Shadden, MonsOlympus and all others who contributed this thread. It helps me a lot doing my own labyrinth generator. ( If i succeed doing it (at least) fair, i'll show you.)
    Look forward to it.
    Map Generator 1.0
    Map Generator 2.0
    Map Generator 3.0

    Comment


      #62
      Btw, I was reading up on A* and found a pretty awesome resource for both pathfinding and tile based map generation:

      General
      http://www-cs-students.stanford.edu/...eprog.html#hex

      A* - Be sure to hit all 13 pages of this document
      http://theory.stanford.edu/~amitp/Ga...omparison.html
      Map Generator 1.0
      Map Generator 2.0
      Map Generator 3.0

      Comment


        #63
        Originally posted by Zeustiak View Post
        The east edge should wrap to the west edge as if it were a globe.
        My take:
        Instead of moving camera with controls - move whole map itself. When row/column touches edge of screen - make a duplicate and move it to other side outside of the screen, then move original and duplicate simultaneously. I made a quick video to describe idea better.
        It super cheap, you don't need thousands of hexagons(That means you don't need static mesh instances, just static mesh, which make life simpler), easy to modify game logic for this approach.
        However, first problem which I can think of - how to handle simultaneously vertical and horizontal panning, but I think you can figure it out by yourself, if you like this approach
        Last edited by zeOrb; 05-25-2014, 08:13 AM.
        SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
        Level design and prototyping for newbies

        Comment


          #64
          That could be one way to do it.

          The biggest problem I would have though is all the arrays that would have to be updated continually, and then referencing them properly. Would still have to reference them off screen as well, which could be a huge pain for the AI. A thousand units just had their grid coordinates changed... Even if you have the rectangular map maintained separately, it would be a big process to handle conversions with all the shifting vectors.

          Additionally, zooming out would be an issue with all the static meshes. I would most likely keep the map cylindrical so there could still be thousands of hexes rendering and updating as you move around.


          Currently I am looking at shadowing the map to the east and the west. In a way this is similar to what you have except it does it with the whole map, once for each side. The key point for me is that the Vector arrays are easily translatable between the shadows and the core map. Change Index 43 on the shadow and you can update Index 43 on the Main map, the other shadow, and the other dozen arrays that store information for each tile. If vectors are shifting around then that becomes a complicated job of tracking everything. Unless you have a straightforward solution for the vectors and the zooming I don't think I would want to go in that direction.

          Here is my current wrap:


          Currently working on the streaming volumes for the shadows.
          Map Generator 1.0
          Map Generator 2.0
          Map Generator 3.0

          Comment


            #65
            Ok, so World Wrap is basically implemented using the 3 map solution. There is a barely perceivable flicker as I teleport back to the middle map which is more obvious when zoomed out and you can see a whole map width. Given that the map is the smallest size with no bells and whistles, this solution may not work out in the end, but it works as a proof of concept and testing ground until I figure something better out. Could use a variation of zeOrb's idea if I can be confident that all the math and array updating won't bog things down(or melt my brain).

            Sometime soon, hopefully tomorrow, I will create a new Map Generator post with an updated look at my current generation process and what I will work on next. I will leave the OP of this post untouched so people can look at it for reference.
            Map Generator 1.0
            Map Generator 2.0
            Map Generator 3.0

            Comment


              #66
              The flicker may just be motion blur, depending on your visual goals you can just disable it on the Post Processing volume or do something more fancy like turn it off, move the camera, then turn it back on.

              I'd really like to test what Ze0rb suggested in Blueprint, it'd be a good measure of how terrible clearing and re-creating multiple Instanced Static Mesh components really is. I think I'll try to throw something together this weekend that does that.

              And I am loving this thread! So much good stuff here.
              Ian Shadden
              Technical Writer | Documentation

              Comment


                #67
                Originally posted by Ian Shadden View Post
                The flicker may just be motion blur, depending on your visual goals you can just disable it on the Post Processing volume or do something more fancy like turn it off, move the camera, then turn it back on.

                I'd really like to test what Ze0rb suggested in Blueprint, it'd be a good measure of how terrible clearing and re-creating multiple Instanced Static Mesh components really is. I think I'll try to throw something together this weekend that does that.

                And I am loving this thread! So much good stuff here.
                Sweet, hopefully it is something I can just turn off or at least momentarily. I was wondering if the flicker might be due to a slight miscalculation or rounding error on my hex spacing, so hopefully it is an easy kill.

                Btw, OMFG on the "Break Post Process Settings" node... lol

                I would love to see your results on his method. If you can, throw some random math in there to see how it handles running lots of operations as you scroll the map.
                Last edited by Zeustiak; 05-30-2014, 04:40 AM.
                Map Generator 1.0
                Map Generator 2.0
                Map Generator 3.0

                Comment


                  #68
                  I have created a new thread to show the latest version of the generator in detail. If you like we can continue our conversations over there.

                  https://forums.unrealengine.com/show...3569#post63569
                  Map Generator 1.0
                  Map Generator 2.0
                  Map Generator 3.0

                  Comment


                    #69
                    Originally posted by Zeustiak View Post

                    Here is my current wrap:


                    Currently working on the streaming volumes for the shadows.
                    This is actually really good! I think you got the variation better and the lighting is certainly more improved Infact I can see acouple of levels of water is it?

                    Comment


                      #70
                      Originally posted by MonsOlympus View Post
                      This is actually really good! I think you got the variation better and the lighting is certainly more improved Infact I can see acouple of levels of water is it?
                      Thanks.

                      By variation you mean the continent shape? This is generally how the biome generation looks when it is completely random. I was testing the dual continents generation for awhile there to see how I could tailor it. At some point I will do that again with this new system but completely random will always be a map option too.

                      As for the lighting, nothing changed there other than perhaps the position where I took the screenshot from. Just the stock UE4 sun. I am not really going to worry about how pretty it looks until much further down the line, though I have been thinking of going in a more stylized, non-realistic art direction to allow for bigger maps and better overall play quality.
                      Map Generator 1.0
                      Map Generator 2.0
                      Map Generator 3.0

                      Comment


                        #71
                        file

                        can you send me that file.

                        Comment


                          #72
                          Because I see you have experience with ISMC and collision, can you help- during random rotation and movement, many instances of ISMC/HISMC component are overlapping. How to prevent that? I am trying to make asteroid fields. Thanks
                          Luxocraft - [FREE] 3D Ray Tracing Block Construction Builder Game on Steam

                          Comment


                            #73
                            Are you working with a hex grid like mine, or something else? If you are randomly rotating hexes you just have to make sure you only randomize between the 6 difference hex positions, but if you have a different problem I will need more details.
                            Map Generator 1.0
                            Map Generator 2.0
                            Map Generator 3.0

                            Comment


                              #74
                              I do not use any system (hex grid, etc.). I can't set Simulate Physics on ISMC/HISMC, because it is denied from the source. Can you tell me in this case what I should do to prevent overlapping between instances of one ISMC?
                              Luxocraft - [FREE] 3D Ray Tracing Block Construction Builder Game on Steam

                              Comment


                                #75
                                Sorry, I don't use physics and nothing of mine collides with anything other than trace hits so I am probably not the best person to help with that issue.

                                You might want to ensure instances can even work with physics at all, because they may not be able to without some workarounds.
                                Map Generator 1.0
                                Map Generator 2.0
                                Map Generator 3.0

                                Comment

                                Working...
                                X