2D Top Down Tileset/Tilemap Generation

I’m looking for help with generating 2D tilemaps. I am attempting it with blueprint, but am very open to C++ tutorials as well. I am looking to be able to generate a big tilemap with different biomes of tilesets.

Perhaps similar to:

Also, I would be interested in dungeon generation through a tilemap. Similar to this:
tumblr_inline_n0zdf9PpCF1rci6kk.png

I was planning to use blueprints, but am not sure if the widgets exist for TileMaps yet. Can anyone help me with getting started? I’m very very new to Unreal Engine, but not new at all to C++ or programming.

You can start on the page below, just to know the Tile Maps tools of Paper 2d:
2D Levels with Tile Maps

I understand the Tile Map tools in Unreal. But I’m looking for help with the blueprint functionality that comes with them. I currently made a blueprint script to create an int x int square room and then remove a few random tiles within the room. I believe my logic is correct, but I’m having trouble actually modifying the TileMap in my viewport. The default TileMap actor comes with a RenderComponent TileMapComponent, is this what I should be using as the target for my modifications of the TileMap? I’m not sure why it is not working. I’ve dragged the TileMap into my viewport where I want it to be, but do I need to spawn it in via blueprint and use transform for it to work? Not sure how to rig this up.

bump. I’m specifically looking for how to successfully make and set tiles in a TileMap. The problem I’m having is towards the end of my blueprint, with the nodes that are supposed to make and set the tiles of my TileMap. Also in the beginning when I’m resizing the TileMap… I’m not sure that’s working either. I need help with how to successfully reference and set a TileMap.

See the documentation of Set Tile:

https://docs.unrealengine.com/latest/INT/BlueprintAPI/Sprite/SetTile/index.html

There is a note there that may be related to your problem:

(Note: This will only work on components that own their own tile map (OwnsTileMap returns true), you cannot modify standalone tile map assets.

Another thing, you can not use the index of the For Loop as the X value of the Set Tile function. You need to use the “Modulo” operator that returns the remainder of the division.

X = Index % RoomSize

Modulo:
https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Integer/__integer/index.html

I appreciate the help. I had weird system setup for the x coordinate consisting of adding 1 after each loop iteration and then setting it back to 0 after it was greater than the room dimension int. The modulo is much cleaner.

For the TileMap problem. I believe you’ve pointed it out, but I still don’t understand how to make a component own a TileMap. I’ve tried this, but it outputs false still:

Any help with this? Thanks.

Create a Blueprint class and add a PaperTileMap component. Create the “GenerateRoom” function in this Blueprint and use the function “Create New Tile Map” using the reference of the PaperTileMap component.

tilemap.png