Help create a camera for top-down (shooter?) & other questions

Hello unreal devs,

I decided to make a small game with top-down camera. Some kind of remake of Bomberman. So I want to ask couple of question before I start (though I already modelled the character to be used).

Okay first of all I want to ask how to create “one camera for everyone”. For example if two players connect and start playing, the use the same camera that doesn’t change it’s position. And the players only control their robots. Another example is, if two players play on the same pc, the use the same camera on one monitor and control their robots. I thought that I should create a top-down camera like in the blueprint, but i don’t know how to make it static and make it be usable by another player with different input.

Second I want to ask is, how to create those bomberman maps. Is it possible to make it c++ generated maps? I mean there is logic to be used for example, spawn unbreakable block on each 3 cubes and etc. Or I should to them by hand?

And third how do I create those bombs? For example it’s a normal projectile which shoots at some range in all directions?

Hey OzoneBG!

This sounds like a LOT of fun to make!

Right! Getting down to business!

In terms of setting up a top down camera, that’s easy.
Even across networking, just give each player their own camera, as usual, but place them all in the same place.

For local multiplayer, I’m not entirely sure how this would work… I’ve never messed about with splitscreen, so you would need someone else to help there.

For map generation, you have multiple ways of doing it, and the coolest way I can think of is with a simple algorithm.
Have a simple string of 0’s and 1’s
0 = No block
1 = Breakable block

So a size of 8x6

With a string of:

Obviously input as “001111000111111011111111111111110111111000111100
Would give you just the corners free, like most bomberman starters.
(You can have a safety check that if the string isn’t long enough it doesn’t run, or treats the rest as “1”'s)

All of this could be handled in a constructor.
Meaning 1 actor generates the whole level.

You could even expand it to say that “2” is a non breakable block, or “3” is breakable but with a pickup underneath, etc.
In fact if you wanted, I could whip out this generator in a few minutes.

As another cool feature, you could have multiple player starts in the level, and say with the number “4” have those actors set to those positions respectively!

As a side note:
Instead of a string, I would have loved to do it with a sprite texture of black and white squares,
but I can’t seem to find anything on being able to read color data from specific UTexture2D pixels.

I hope this helps!


Hey OzoneBG!

I actually went ahead and made the system! xD
Actually could not help myself!

If you want to learn yourself then ask away, but if you need it, I can send you the actual project and source code! :3

Here you can see an empty grid.
The blocks around the sides are created using the unbreakable blocks.


If your Map Seed doesn’t match the same size as the MapX*MapY, then it reverts to a Size of 1 block.
What’s also cool is that the floor that you see is 1 simple plane, and the texture on it is scaled based on the width and length of the grid.

A more complex grid:


Here you can see the positioning of 0’s for none, 1’s for unbreakable, and 2’s for breakable.
Obviously the map I made above is impossible to beat… (can’t leave the corners)
BUT, it does look pretty! xD

Sometimes I forget my orientation and the map looks weird, which means I just have to swap the X and Y sizes.

But yea!
It took exactly 1 hour and 15 minutes to script and create the assets.
For the sprite I cheated… It’s one I made for my RTS Template :smiley:

Let me know what you think!
Hope this helps!