I have a top-down dungeon room box, the floor. I have wall graphics, but they don’t surround the room. I want to keep the player within the bounds of the floor, but capable of passing from one floor instance to another that is in collision. The black background is actually supposed to be the foreground, the tops of the walls, and the floor, rather than being on top of the background, is supposed to appear as if it is cut into it. How would this work? I can’t exactly reverse-separate the player to the floor. I mean, I could, but I’m not certain that would have the desired result.
Oh. Room-based camera movement. But that has way too much technical stuff, which you can’t even avoid, when all I want is a simple way to do this without having to work around a lot of extra stupid stuff.
I hate to say this, but doing the extra “stupid” stuff is gonna bake your camera system not only look better, but it’s gonna improve player experience.
Perhaps, but if I want that, I’d rather do that myself. All I want is to keep the player within the bounds of the room objects, without messing with the camera at all, but rather, keeping the camera view exactly the same regardless of which room the player is in, zoomed in a regular amount, just enough to make the character large enough for the focus to be on the player and the individual NPCs, but small enough to see a reasonable distance. All I really want to do is separate the player from the empty space.
Oh just make the walls have collision. and have doors trigger the camera movement.
There is no wall object. That’s the point. The walls are nonexistent, marked off only by negative space.
make a thin object to represent borders. that’s the only other thing I can suggest
Stopping the player depends on how you are moving the player in the first place. For example, if you were using Physics 2.0 behavior on the player, then you will need walls with Physics2.0 behavior as well. You can easily make an object with a blank sprite for the walls if desired.
As for screen-by-screen movement, I do this by making an invisible object the size of the screen. Then when the player is NOT in collision, move the camera and the invisible object to the next location. I was using background images for each screen in this case so I simply used the coordinates of whichever background the player is now colliding with. Another way to do it would be to calculate the new position mathematically. But, background images are convenient for building the map anyway since it gives you an easy visual aid to know where the edges of each screen are.