Alberto ʕ – ᴥ – ʔ

How the TNG minimap was made

Hi, the alpha of "The Nightmare Guardian" is free on itch.io, feel free to play it and give your opinion!

Well, we can think that a minimap is some kind of weird magic, how can we do it? well, the first idea I had was just to render a map with the level layout but... the game generates them procedurally....

So a new approach is needed. And it is my approach, it's not the best, it's not the optimal. It's the way I found to do the job. And it works :D

Scene Capture 2D

Yes, I know, these things are expensive to use, at the end it's another camera rendering the game, but I didn't found a faster solution, it was a 2 weeks project. Testing the performance it was not a problem, TNG is pretty solid in fps (when lumen is off, pog), but it can be a problem in bigger games. Probably if you are making a bigger game you dont need to read this, so not a big deal. Anyway, it's still 6x less expensive than it's sister, the cube, not bad tbh.

It's pretty easy to set up. A 2d scene capture, looking down at some distance (arms are your friend),

Image

That's my setup. I'm using a paper sprite near the scene capture to render an icon where my character is.

Image

Remember to enable pawn rotation on your spring arm!

Image

Ok, we have the pawn set up, now we need to make a Texture Target. TT is where the SceneCapture will render the image.

Configuration:

Image

Then we need to create a ui material and use the texture as color

Image

Easy!

Ok, now we just have to add it to the widget and.... it's... a square... ok, it could be what we want but not for us, we want a perfect circle.

Pretty easy too, we just need this texture:

Image Image

And it's done. Almost, because in our project it's DARK (works perfect when it's sunny in the game, or with one-sided celings) we don't have any visible light, and we want to see the design, so it's time to be creative.

Image

And that's it, another paperprite with the room layout, with an unlit material!

It may not be the best way to do it, it may not be the optimal approach but it's my approach. Looking for a tutorial and doing what others do is not a way to learn anything, it may be a reference, but nothing more.

Happy Halloween!

Image