• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Game Mechanics (solved) Problems with wall appearance

M

Megaskizzen

Guest
Hello!

So this game I'm making involves having a whole house in a single game room. I'm using a grid to hold each position's tile, with each position in the grid being taken up by a map that will hold things like texture, tile type, the room it's part of, etc.

It looks something like this:
upload_2016-6-23_12-29-40.png
As you can see, the wall graphics end up being 3 tiles tall and it clutters the rooms. It's hard to see where the side doorways are and the bottom two rows are blocked.

I'd like to have a mechanic where when you walk into a room the left, bottom, and right walls are hidden, leaving only the top wall( not including the corner tiles). I'm unsure of how I'd do this. Any ideas?
 

Yal

🐧 *penguin noises*
GMC Elder
One idea is to only ever create wall objects when there's no floor directly above them. After all, such walls will only ever get in the way.
 
M

Megaskizzen

Guest
One idea is to only ever create wall objects when there's no floor directly above them. After all, such walls will only ever get in the way.
Yes, however this game will require you to see things hanging on the walls. Given that some rooms may be directly in front of others, that formula may not work perfectly.

However, You did give me the good idea to only draw the back wall. Should make everything less cluttered in general.

EDIT: Alright, changed the walls.


(ugh placeholder graphics)

Now if there were a room one tile in front of this one, touching only the doorway, how would I make its back wall disappear to not obscure the bottom row of this room?
 
Last edited by a moderator:
I

itameio

Guest
you can use collision events with the character perhaps?. put a trigger object on the entrance to the room and use variables (or global varibales) to make it hide certain walls, that's all i can think of at the moment.
 

Yal

🐧 *penguin noises*
GMC Elder
Now if there were a room one tile in front of this one, touching only the doorway, how would I make its back wall disappear to not obscure the bottom row of this room?
Couldn't you make all vertical passageways (at least) 3 tiles tall so that the issue never would actually show up? That seems like the easiest solution to me.
 
M

Megaskizzen

Guest
Couldn't you make all vertical passageways (at least) 3 tiles tall so that the issue never would actually show up? That seems like the easiest solution to me.
*facepalms*

well it should be 2 tiles since the height of the wall graphic has now decreased. Can't believe I didn't see this.
Thanks anyway, at least someone realized it!
 
M

Megaskizzen

Guest
upload_2016-6-23_16-36-59.png
Got it!
I only made the top two tiles tall because every room will overlap one tile on their edges, so the overall top + bottom doorway will be two tiles. Thanks again, Yal!
 

Yal

🐧 *penguin noises*
GMC Elder
No problems :3
I think there's a 'solved' prefix, but... no point in using that when it's in the title, I guess. I assume most GMC members can read :p
 
Top