The Daily Click ::. Forums ::. Klik Coding Help ::. (TGF) Castlevina/Metroid style map display
 

Post Reply  Post Oekaki 
 

Posted By Message

tetsuya_shino



Registered
  12/08/2004
Points
  491
13th December, 2012 at 13/12/2012 04:23:09 -

Greetings. I want to have a metrovina style map active object in my game. I'd like the allow the player to see the map without having to go to a menu. The map should mark the current room the player is in, as well as rooms he's already been in. And of course, rooms that haven't been entered shouldn't be shown at all.

What is the best way to pull this off? If all of the map was shown from the start and all you had to do was show the currently location, it's simple. However, keeping areas that haven't been entered yet hidden is the problem.

Thanks in advance for anyone that helps.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
15th December, 2012 at 15/12/2012 06:43:53 -

There are multiple ways of doing this.

If the map is grid based just have separate objects for each "square" of the map, and then just show the ones the player has visited.

Or you could do the opposite and have black objects that cover the map until they're visited.

 
n/a

tetsuya_shino



Registered
  12/08/2004
Points
  491
15th December, 2012 at 15/12/2012 08:09:23 -

Haha.. well you know what they say; often the best answer is the easier one. Thank you. For whatever reason I didn't think about using an active object for each room. Although with TGF's active object limit I need to carefully plan out the map.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
15th December, 2012 at 15/12/2012 18:10:32 -

You could have a separate frame for the map, then you wouldn't have to worry about a limit.

Just make sure you save data about the game before you switch frames. Like the players position and whatever else would make it feel seamless.

 
n/a

Alonso Martin



Registered
  29/12/2010
Points
  294
15th December, 2012 at 15/12/2012 18:15:59 -

You can do it with the surface object, or the textblitter if you're planning to stay in the windows runtime.I suppose the easiest way would be to manually draw all the rooms into one image, and then obscure the rooms that haven't been visited by running a loop to draw cell-size black boxes over each such cell. An array would match each cells' x,y in the image. And each room would need to have its top-left cell set to an x,y in the map so that, if the player comes into that area, it sets the corresponding x,y value to 1.

That's not the way I did, though. I made a "map" editor in which you can move the rooms that are found in a database around so that they fit, and the room shape is actually scanned in each room. The only advantage is that you can change room shapes in development and it updates automatically, as well as being able to see unvisited rooms in the map, and have room-shape changes like secret rooms, etc. This was a very complicated (and therefore dumb) way to go about it, and I would do it differently today. I'd say go for what would take you less time to do.

Edit: Oh, I forgot to mention this. To only display it like super metroid does (in a corner of the screen), you'd just crop the image to that size and only render the image (with the surface) and obscure whatever rooms from x1,y1 to x2,y2. This would be the easiest part. If you use the textblitter, maybe you should use the first one to display that map segment, and the second one to obscure the cells that need to be obscured.

Edited by Alonso Martin

 
www.hfalicia.com
www.alonsomartin.mx

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
15th December, 2012 at 15/12/2012 18:23:17 -

Does TGF support the text blitter object?

 
n/a

Alonso Martin



Registered
  29/12/2010
Points
  294
15th December, 2012 at 15/12/2012 18:48:26 -

Oh, this is being done in TGF?

No, TextBlitter is MMF 1.5 onward.

 
www.hfalicia.com
www.alonsomartin.mx

tetsuya_shino



Registered
  12/08/2004
Points
  491
16th December, 2012 at 16/12/2012 00:29:03 -

Thanks for the additional replies.

I think what I may do is have most of the map shown from the start. At at least anywhere the player can move freely from the start. Locked doors and secret areas will only show up on the map after they have been entered. Doing it like this, the number of active object 'squares' I need to make and code would be much less.

And while it sounds like a cop out, because of the story it's not that strange that the player would be aware of most of the area in advance. So I guess I lucked out this time.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
16th December, 2012 at 16/12/2012 05:21:41 -

Well it sounds like it's going to be a decent game!
Hope it doesn't take too long to finish!

 
n/a

tetsuya_shino



Registered
  12/08/2004
Points
  491
18th December, 2012 at 18/12/2012 03:18:03 -

Thank you. Well, I burnt myself out while trying to make an rpg using TGF. While it's underpowered when compared to MMF or MMF2, because it's not impossible I stuck with it. Now, while I'm not saying I have totally given up on making a RPG, I feel as though if I don't take a break from it and try to make something different, I might start to see clicking as a chore. And we can't have that.

Anyways, I have already started on this new gameplay engine. My main two hang ups are I'm having a hard time thinking up the over all map and maybe a bigger issue, I am not sure to apply this new gameplay to an older/current game idea or a brand new one.

What I can say for sure is that it will have gameplay very close to Butterfinger's Ur Not A Hero, in that there is shooting, evading enemy fire by 'hiding' in the background, and a lack of jumping and platforming. However, I aim to have my game as a metrovania. So you'd have to explore, find ammo and weapons, keys and C4 to open up new areas.

When I am more final with the plot of the game I'll try to get a project page up.



 
n/a
   

Post Reply



 



Advertisement

Worth A Click