Hello i am trying to make a 2d dungeon crawler like darkest dungeon but not a copy and not turn based iv looked at games like maple story and penny arcade. i want the character to move forward, back , jump and crouch that’s easy but i want the level to be random so you aren’t fighting monsters at the same point all the time random doors that lead to a not randomly made town or village and then have doors that lead to other corridors and rooms that are random only blueprint please as i cant code to save my like. thank you for your time
Tell me just how much of the level you want to generate at random and I can tell you how best to do it. Do you want the entire map generated at random? Just the doors? Specific objects?
Also, from your question, it kinda looks to me like you’re not that experienced with coding. While the blueprint system of UE4 can look like it eliminates the need for coding (which it does a lot of the time), the need for knowledge of coding is still there. In stark contrast to Kismet, which required little to no such knowledge, the blueprint system is a (very) pretty interface that you use to create C++ code without writing C++. You can’t make games without coding, and try as they have, even the team of engineers behind UE4 can’t change that fact. You would at least need to know the basics of object-oriented programming and have a general knowledge of the way UE4 works. If that is the case, I’d recommend you to start learning these topics before “jumping right in”.
ok so you walk down a hallway after i little bit you see a door on the wall you go up to the door and the door ports you to another hallway or room if its a room you can leave to the previous hall way then continue kill some stuff then you see another door this one leads you into another hallway which can lead to more doors and so on but always being able to come back to the previous hallway and after so much you will find a town inside the dungeon you can find a portal there that you can use to come back in case you get lost ( even though i plan to make a map) its hard to explain lol but i hope that helps and i know some code like if statements that’s about it if this is this then do this pretty much
Well then, my recommendation stands. Learn some coding before making entire games.
Anyway, to do what you want, you’ll probably want to use factories. An ActorFactory (as it was called in UE3, not really sure what they call them now) is an actor which has the job of spawning another actor(s) at runtime. You create lots of these all around the level, then tell some of them to spawn their actors (doors, for example). You can then use a random generator to determine whether the door opens into a room or a hallway. What you’d need most of all is a data structure to hold all this information within, and creating that won’t be an easy task, as it will depend on how exactly you setup your level and generation mechanisms. I’ll make some simple blueprints and post them here in a short time.
thank you so very much and ill learn some bacic code too or ill at least try
For some reason, I can’t post my screenshots here… (site doesn’t allow more than 2 pics per post, it seems.)
So, here it is. First, the actor factory (ActorFactory_Door):
It has a function called activate, which you can see in the photo. Also, there is a variable called TeleportDestination. This marks the spot to which the player will be teleported.
Next, the door itself:
You’d need to add a trigger to the door. When the player touches that, they will be teleported.
Last but not least, in the level blueprint:
Then you’d just need to place lots of door factories around your level and watch some of them get spawned at startup. Keep in mind however, this code is as basic as it gets. You’ll need to add some logic to it later on to integrate it with your game. You can, however, do the same thing with nearly every random object you want.
Thank you so much I will try to learn from this the best I can thank you for your time and work
Hey, it’s no problem! I consider every person who is looking to learn Unreal as a brother in arms in the war against… another technology, so to speak, so it’s my pleasure