How do i make an RTS Minimap?!

Get help using Construct 2

Post » Sun Nov 11, 2012 11:07 am

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?!




Please reply! ;)
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Sun Nov 11, 2012 11:56 am

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
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
30
S
11
G
8
Posts: 313
Reputation: 7,360

Post » Sun Nov 11, 2012 12:08 pm

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 GRIDSmystazsea2012-11-11 12:13:16
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
30
S
11
G
8
Posts: 313
Reputation: 7,360

Post » Sun Nov 11, 2012 12:13 pm

Wow! Thank you for taking time making that tutorial! Thanks!! ;)
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Sun Nov 11, 2012 12:15 pm

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...
:)
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
30
S
11
G
8
Posts: 313
Reputation: 7,360

Post » Sun Nov 11, 2012 1:06 pm

Sure! I will try ;) Ill start with an simple one first, then i make it more complex later :)
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Sun Nov 11, 2012 8:42 pm

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 :/
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Sun Nov 11, 2012 9:32 pm

Here's a basic example: ghostShooterMinimap.capx (r109)
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Sun Nov 11, 2012 9:42 pm

@ramones thank you! Hopefully i can transfer that into my rts game!
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Wed Jan 30, 2013 2:35 pm

@ramones, big tnx for help - i`ll try to do it 2 hour, before read you example )
B
21
S
5
G
4
Posts: 25
Reputation: 4,598

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot], zenox98 and 24 guests