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.

[XP] Stop map tiling in empty space

I am editing game map so that the player is always in the centre of the screen.

What I want is that if the player reaches the edge of the map, they just see a black void.

Well, it turns out maps tile in empty space like that. Does anyone have any idea how to stop this tiling/wrapping?

Imagine I've just walked to point (-5, 10) -- instead of being on a copy of the map, I want to be on complete black.


At the moment, let's say I've set the player to always be in the middle of the screen, and I walk to the far left of the map. Instead of there being nothing next to me, I see the far right of the map, looping. I want for there just to be -nothing there at all. Just black space.
 
Actually, if you looked, it was the opposite side of the map you were seeing. Maps are drawn as planes, which means that it repeats while onscreen. The most common solution is a custom tilemap that draws the tiles as giant sprites instead.
 
While it doesn't contribute to solving your problem at all, I feel like making you aware of me testing this before... I wasn't really happy with the result, but neither with the default layout that would make the actor go all the way to the border of the screen/window when reaching a map's end. The best solution for this I found until today is to just make maps bigger by 20 tiles horizontally and 16 vertically, and map that area out as well... you therefore automatically get away from the default "place your area teleporters at the very edge of the maps", meaning you have to place them 10 tiles distant to the sides and 8 tiles distant to top or bottom for it to work.
It'll create a more natural feeling for the environment, as you never feel like "walking off the edge of the world". Of course, depending on your game, you might want to figure out a way to point out that the teleport zones are actually there, as the player won't be able to notice anymore then.
 

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