No announcement yet.

Custom Mini-map? (not radar based)

  • Filter
  • Time
  • Show
Clear All
new posts

    Custom Mini-map? (not radar based)

    Hey everyone,
    Starting to work on a 2.5D style adventure game and I had a nice feature I would like to add but having trouble finding some direction on this type of setup. I hope my two images show kind of what I would like.

    Say you have a large map with some hallways and secret areas, etc etc, now the mini-map would be centered on your position and once you navigate along the hallways, where you have been would be green (purple section might be shown to you as a secret area later on some how) each one of these blocks wouldn't be a separate map/room but hallways. say each block is 40x40 in size and you can walk around that area and your mini-map wouldn't change, unless you go past that 40 unit size and it would then highlight the next block green. hopefully this make some sense.

    I`m not sure it would be fully possible but i`ve looked into things like this but could only get the typical rader type custom mini-maps. perhaps doing a large texture map of the hallways already laid out somehow having it follow the player with flash. Hopefully someone can aid me with a little more insight if this is possible!

    It's possible I'm sure. How to best do it, I'm not so sure. Scaleform is probably a great place to look at, if you figure out a grid system and then pass ints to it from UDK for what to display. Definately though, your going to need to experiment.

    ScriptedTexture is a possibility, I think to much drawing needs to get done for that.


      I'd go with a fast ScriptedTexture prototype, if you want you can always go Scaleform later. The ScriptedTexture only needs to change when the player has moved into a new part of the map, if the player isn't moving at all the ScriptedTexture doesn't need to be changed.

      How to best do it, I'm not so sure either. But you could test something like this and then improve or redo it later.
      Have an array of ints. This array holds all indices of cells that your player has been to. This needs to be filled somewhere...
      For the Render delegate of the ScriptedTexture you need the index of the cell your player is in and then for each cell in an NxN (in the images above N = 7) neighbourhood around the index of that playercell, that has been visited (indicated by an entry in the array of integers, this can be optimized so the array does not need to be searched) draw a green square. The defaultcolor/clearcolor is black. If you want you can also draw small white lines for the grid.
      The array is changed whenever the player moves to a new cell.


        Thanks for the ideas! I`ll play a bit with ScriptedTexture and see what I could come up with, i`ll also try scaleform a bit later, couldn't find a whole lot of information to really guide me in the right direction with what I was trying to do, thanks guys!


          Just wanted too add this, saw some video from shadow complex, exactly what I would need for the mini-map system, I know its possible so i`ll keep diggin`!


            Here's how I would do it:
            Custom Trigger Volume Class (on touch, update the player's map)
            Custom Node Class (Indicating the origin of the udk map relative to the hud map)
            Custom GameInfo Class (Create a makeGrid(int x,int y) function, that lays the custom trigger volumes throughout the map).

            That should be all you need to do in terms of program flow on the unrealscript side. This problem is fairly trivial if you need more help let me know.

            If the rooms are different sizes, then you just ignore step 3 and make the level-designer put your MapUpdateTriggerVolume directly into the level. Then you tell scaleform to dynamically draw the map relative to the size of the volumes. You could have pre-drawn minimaps for each level broken up into a billion movieclips for each room, and then link them by IDs to each and every associated trigger volume, but that's just stupid.

            edit 2: That game you posted uses uniform tile sizes, so they probably just generated the trigger volumes through script. You will need to ensure your map is designed uniformly as well- so that any grid system you overlay on top of it makes coherent sense. IF you want map features to show up (like doorways), you can either have the trigger volume iterate through touchActors and feed information to scaleform on what to draw (based on class, orientation, etc), or you can draw the grid by hand. You should still generate the trigger volumes if you do this way, you just need to make sure that the origin of both map and hud are uniform.


              Actually-- Another way to do it is to set a node somewhere in your level that represents the mini map origin.

              Then just send the player's location minus map origin to scaleform on tick. Should be easy to both plot the player's location and determine which area of the mini-map he's in. For this you would need to hand-drawn your mini-map, but you'll be implementing this algorithm any way to show the player's position.