How do i make an RTS Minimap?!

0 favourites
  • 10 posts
From the Asset Store
Two types of minimap: "full map" and "player is the center" (square map and radial map)
  • Hi! I have been wondering how am i suppose to make a simple, but still a good Minimap with/without fog for an RTS game?!

    <img src="http://i752.photobucket.com/albums/xx161/rjfaber91/minimap-2.png" border="0" />

    Please reply! ;)

  • Well to get something like the image you showed above..

    you would need several components all working together

    They would be ...

    -The MAP border or Frame...

    -The MAP itself...

    -Positional data and Markers etc

    -other control buttons etc

    The first thing to do is create a smaller version of your game world in a map format.

    The other parts also need to be created, including the Map markers..according to however you want it to look

    Its basically a Gui..that updates in game time...

    You can set any function you like using the Event Sheet.

    I would make a separate Event sheet just for the MAP and all of it functions and "Include" that sheet for any level that needs the Map

    It should be on its own layer like(HUD LAYER)so you don't get lost and set as the top layer or close to top layer..

    To get the Alpha effect you would use a Masking layer that culls the rest of the map from the screen and only shows the part you need to see.

    The Map itself is a sprite object, A birds eye view of your game world Preferably built to Scale,

    I would add a Family called something like HUD MAP or similar ..This Family would most likely be made from The Map objects..The Frame, the map itself, buttons and other objects. This allows you to remove or move the MAP family at once rather than several separate objects.

    How you want to implement the maps functions is up to you..its your map customize how you want it to be

    To help you do this...There are many questions you need to figure out BEFORE you make the actual GUI...

    Functions such as

    Does the map scroll to the players position...?

    Does it zoom or Scale with mouse wheel or other controls?

    Does it allow Way-points or Navigation markers etc?

    You are building a functional Scaled top down view of your level basically

    So aside from graphics you also need to correlate markers with "real world" places....This would usually be done mainly by Graphics

    For locational data for revealed markers you would need to either make your Map to precise SCALE..or have a table(Array) of Locations that are individually called by events when your player reaches that position in the game world or finds out about that location via questing etc..

    For eg:

    Player overlaps object(cavern entrance)

    -> Map_marker(Cavern_Enter) set to map position(x.y)

    -> Map_Marker(Cavern_Enter) is visible..and whatever other functions you want to call

    its all driven by game world Events but affects the HUD(map) object

    You would use commands like

    Mouse is over object(map)& mouse wheel roll up -> zoom/scale map object

    etc

    or just use buttons to control that

    Plan out everything you want the map to have then build each component and link up all the code as you need it...

    Start simple....Any level of complexity is doable..But its up to you how far you want to go...

    That should get you started

  • Fog is a whole other story ..you would need these elements working first...but the basic principle is a second layer that is set to Destination out and unmasked with a Player locational Brush Draw function

    Or another way is to use overlapping sectors of FOG that you make invisible..

    THINK BattleTech HEX grids and you are there

    HEX GRIDS

  • Wow! Thank you for taking time making that tutorial! Thanks!! ;)

  • Ahhhha you are welcome HPA97...if I had more time I'd build you one

    Maybe if you get it working...you could put up your finished map as a Template Example or CAPX so everyone can use it :)

    Would save people alot of time...

    if not I'll get around to it later...

    :)

  • Sure! I will try ;) Ill start with an simple one first, then i make it more complex later :)

  • Hmm, i now tried to make my X=3000 Y=3000 map covered by 375 wide and tall squares. Like the map is covered by 8X8 squares (64 total)   And a minimap with the same total of squares (just smaller) so that everytime an object went into a square, a square in the minimap would highlight. but i gave up on that because it became to complex, and to big and weird. I think i might need to use another technique :/

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here's a basic example: ghostShooterMinimap.capx (r109)

  • ramones thank you! Hopefully i can transfer that into my rts game!

  • ramones, big tnx for help - i`ll try to do it 2 hour, before read you example )

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)