How do you make the minimap show only discovered terrain?

For questions about using Classic.

Post » Fri Dec 12, 2008 6:38 am

I am making a platform game with a minimap. The levels in my platform game will have many secrets and traps. I tried making the minimap display the level terrain but it ends up spoiling all the secret areas that I don't want the player to see.

I want something like the minimap in Super Metroid, where you can only see the areas on the map that you've actually been to. As you advance through the level, you begin to reveal more and more of the map.

How exactly do I go about doing this though?


Edit: Here is the .cap file I'm working on, if you want to look at it:
http://machriderx.googlepages.com/minimapexample.cap

Also, on a related note, how do I make it so that the minimap is not zoomed so far out? I want the minimap to be zoomed in a bit closer to the action rather than zoomed all the way out.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Fri Dec 12, 2008 6:53 am

You could probably create a screen sized brick that always follows you around. If said brick collides with terrain pieces, it can set a value, such as 'discovered', to 1. That way, you can do something like:

[code:3w3ngdds]+If terrain('discovered') is equal to 1
-Plot terrain on map[/code:3w3ngdds]

Can't say will actually work, but it's probably worth a shot.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Fri Dec 12, 2008 7:02 am

Nevermind, I figured it out. It was rather simple. All I had to do was "If "Tile" is on screen" then "draw terrain "Tile" on minimap" and it worked.

The only thing is though, I used quick backdrops for a large portion of the tiles (I got tired of cutting and pasting tiles over and over again), and this ends up showing the entire batch of tiles all at once rather than one at a time, revealing huge chunks of the level that I don't want the player to see yet.

I guess I could replace the quick backdrops all with single tiles, but that really is a pain.


Edit: Anyway, here's an updated cap (with only quick backdrops shown on the minimap, notice how much of the level gets shown).

http://machriderx.googlepages.com/quick ... roblem.cap

Time to start replacing those quick backdrops with single tiles, I guess. That is, unless someone knows a way around this.

Oh and btw, I also would still like to know how to zoom in more on the minimap if anyone knows.
B
2
S
2
G
4
Posts: 153
Reputation: 1,756

Post » Fri Dec 12, 2008 8:24 am

(Don't have access to Cons at the moment)
I don't know what you've posted, but have you thought about making a Canvas object with effect "mask"? That'd be good for pixel perfect map revealing.
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Fri Dec 12, 2008 1:33 pm

Dunno if that helps i was working on a game and have made something like that

-day\night effect
-attack
-minimap
-small interface



M - show map
Crtl - attack ( if you have a sword)
Spacebar + direction keys -> browsing trought yhe menu

http://www.speedyshare.com/595271361.html
almost there
B
6
S
2
G
5
Posts: 47
Reputation: 2,024

Post » Fri Dec 12, 2008 6:05 pm

[quote="pikus":2mlxppd0]Dunno if that helps i was working on a game and have made something like that

-day\night effect
-attack
-minimap
-small interface



M - show map
Crtl - attack ( if you have a sword)
Spacebar + direction keys -> browsing trought yhe menu

http://www.speedyshare.com/595271361.html[/quote:2mlxppd0]

Hmm.. interesting. You used the canvas object to obscure the regions of the map that haven't been discovered yet. I never thought of that.

Maybe I might be able to do something with the canvas object. The only thing is that I don't want the actual level to be blacked out since it is a platform game (with jumping and platforms) and blacking out parts of the level could be fatal.

I'm going to try messing around with it and seeing what I can do.

Also, I still want to know, is there a way to make the minimap zoom in closer?
B
2
S
2
G
4
Posts: 153
Reputation: 1,756


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests