Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Reveal Parts of a Map with a Switch

I need a script or event system to reveal part of a map when a switch is turned on. Like a world map has a base city and some woods for you to go to, but then you meet someone who can unblock the mine to west, so that whole section of map becomes available.
 
How would you want to stop the player when he walks to the edge of the hidden part of the map?
Do you want that the player simply cannot enter some sort of black covered area? I think you would want to justify this fact with some natural obstacle or blocking NPC, right?
I that case, have you seen the video i provided? I think that a couple events with so simple processing won't cause any significant lag.
 
no, I don't want anyone, just don't let him pass. I want a grey fog to cover a predefined area

Edit: No offence but what you put isn't what i want, and lag isn't a problem because my antilag is amazing
 
Oh, if it is for the world map, it makes more sense...
I still would use unpassable events to block the actor. I use any unpassable tile of the tileset but with opacity=0, and a second page, triggered by a switch, totally blank. It is not unusual to see this solution in rmxp games.
 
hm... Thats basically what I'm using now, its nice but its a large area and even though my computer can run it without to much lag for others it would be a pain. Thats why I wanted a script, events are my first love but they can lag...
 
Events are processed within the RGSS engine just like scripts. Such simple events that don't have any parallel process code don't lag. Scripts are not something miraculous.
A way to do this with scripts would be to check the position of the actor and to scan a look-up table containing the coordinates of each tile at the edge of the black area. But
1) that is almost exactly what the RGSS engine does with unpassable events on the map if not even more time consuming.
2) you need to edit the look-up table every time you change the size or position of the area(s).

The only thing that i can see in favor of a script solution is the memory space occupied by events, but this space is very very small.
Listen to a somewhat experienced scripter, events with no parallel process code or custom movement don't lag.
The last thing and then i leave this space to others: the event soultion is also very flexible from the mapper's point of view, because you can change everything by simply moving events.
This time i really step aside :)
 
If you say you have an amazing anti-lag script, why are you so concerned over event lag? I haven't tried any of the demos so I might have missed something, but I'm just curious.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top