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.

Outside & Inside Maps Combined?

I need advice here.

Basically what I want to do, instead of making separate maps for each little house in a town, I'd just make maps for the important/large locations.  For all the less significant ones, I'd just combine it into the map, and fade out the roof when the player enters the door.  So you're still able to see the town map, but you'll be able to see into the house as well.

Theoretically, I know how to do this.  It's very simple, but it's also horrendously inefficient.  I'd combine the outside and inside tilesets into one, make doors with transparent openings, and simply use events for all the roof tiles.  Then, as a player enters a building, simply fade out all the roof tiles.

I don't see any problem with it, seems simple, pretty foolproof, and would look alright.

Only thing is, with that way, on bigger houses I'd have dozens of events with Set Move Routes set up to slowly change the opacity of all the tiles to 0.  That sounds ridiculously inefficient, could affect performance, and I'm concerned that (since I'd have to set all that up in series) all the tiles wouldn't fade at the same time.

Is there a way to affect multiple tiles at the same time?  Can you make an array of events or something?
 
One way I can think about doing it, you could actually just have one event per roof, just with a humongous graphic for the character graphic.
Then it would be one event per building...  Positioning it might be a little tough, but that should be doable.
 
Moogleking":19bj9ccx said:
One way I can think about doing it, you could actually just have one event per roof, just with a humongous graphic for the character graphic.
Then it would be one event per building...  Positioning it might be a little tough, but that should be doable.

There's a thought.  It would take careful planning and a lot of fiddling with a graphics program, but it should work.

Now I gotta look up how to properly set up a charset.
 
Your only other option really is maybe a tileset swapper script or something along those lines?

I've never used or looked into such a thing, and I don't know if that would be worth the effort.

Good luck with whatever you try.
 
Have both indoors and outdoors on one tileset. Make the outdoor roofs as pictures and position them to the correct places over the building. On contact with events at the door entrances, make the pictures fade to semi-transparent so that you can see the inside. Bingo
 
TheInquisitor":2p332scn said:
Have both indoors and outdoors on one tileset. Make the outdoor roofs as pictures and position them to the correct places over the building. On contact with events at the door entrances, make the pictures fade to semi-transparent so that you can see the inside. Bingo

Is there a way to set the graphic of an event to a picture?

Or do I have to use an autorun event on the map to place all the pictures at the beginning in their correct locations?
 
Hmm, I made the picture, and used a Show Picture event to place it.  But it puts the picture relative to the screen, so it moves around with the player when it walks.

Is there a way to stick a picture relative to the map and leave it there?  Or do I have to have an event detecting the player walking, and move the picture as the character moves, so that it stays in the same place?
 
Brewmeister":1u8lmnek said:
You could create a FOG with all of the roof tops. The fog will not move with the character. (Or, it will move with the map). Then just use the "Change Fog Opacity" event command.

Can you have multiple fogs?  Wit this, wouldn't all the roofs fade away if you went inside one biulding?
 
Moogleking":13je9kdj said:
How did you end up doing it?

Basically the way you told me.  Made a massive charset, so the event graphic was the entire roof (and part of the front wall).

That took forever to get right.  But after that it was simple enough to make a door event that faded out the roof as the player enters, and fades it back in as they leave.
 
Oops, ran into another problem here.

In order to make everything show up properly I need to set the events holding the roof pictures to "Always on Top."  If two things overlap that are both set to that, how does it decide which shows up?

The roofs on two of my buildings overlap, and unfortunately, the wrong one is showing.

http://img137.imageshack.us/img137/9020/roofproblemko6.gif[/img]

See the problem?  How can I fix that?
 
I'm gonna guess that they get displayed in the same order they were created.
Try deleting the blue roof event, then recreate it so it has a larger number than the flat roof.

Be Well

And yes, you're right about the fog. It would only work if your buildings were spaced out,
since fading out the fog would remove all of the roofs.
 
Brewmeister":jkq5vs6e said:
I'm gonna guess that they get displayed in the same order they were created.
Try deleting the blue roof event, then recreate it so it has a larger number than the flat roof.

Be Well

And yes, you're right about the fog. It would only work if your buildings were spaced out,
since fading out the fog would remove all of the roofs.

Awesome, it works.  I screwed up the number part.

That was actually the first thing I tried, but all I did was delete the event then re-create it, so it got it's number back.  I had to delete it, create a new event, then re-create the roof event, so it got a new number.

Now it looks awesome, thanks, Brew.
 
There might be a way to avoid having to keep the event numbers in order... Try finding this section of Game_Character:
Code:
def screen_z(height = 0)
    if @always_on_top
      return 999
    end
    z = (@real_y - $game_map.display_y) / 4
    if @real_y % 128 > 0
      z += (131 - @real_y % 128) / 4
    end
    if @tile_id > 0
      return z + $game_map.priorities[@tile_id] * 32
    else
      return z + ((height > 32) ? 31 : 0)
    end
  end
Just change it to this:
Code:
def screen_z(height = 0)
    z = (@real_y - $game_map.display_y) / 4
    if @real_y % 128 > 0
      z += (131 - @real_y % 128) / 4
    end
    if @always_on_top
      z += 999
    end
    if @tile_id > 0
      return z + $game_map.priorities[@tile_id] * 32
    else
      return z + ((height > 32) ? 31 : 0)
    end
  end

The Z-value of an event determines how close to the screen it is, with higher values being closer. What this does is that instead of all "always on top" events (and the player, too) having a z-value of 999, they're treated like normal events with a boost of 999 to their z-value.
 

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