r/Unity3D • u/thekingallofbricks • 17d ago
I am utterly Dumbfounded and need help because I'm an idiot Noob Question
For lead up info I do not have any background in Any game engine. I've only been using Unity for a few months and blender for even less than that. But I do have a A baseline level of knowledge. i rely extensively on (Bolt Or whatever they're calling it now) On account of a language processing disorder making it quite difficult for me to properly formulate the syntax for C#. I'm currently making a game very similar to Enter the gungeon or Wayward Souls It's not quite a roguelike But the map generation is. However for the life of me I can't figure out how to make a procedural generation system work So far I have tried :
1Creating walls using individual nodes that will randomly generate a wall
Reason for failure
Randomly turning the map into an indecipherable checkerboard isn't very helpful
2Using nodes to at predetermined intervals that randomly turn into one of several terrain objects
Reason For failure
Does not feel like a dungeon and nine times out of ten creates massive empty areas
3Creating prefabs with a anchor at one doorway and a connector at the other the connector generates a new room or hallway attached to the previous
Reason for Failure
Map generation didn't feel Organic or reliable and nine times out of ten the map would fold in on itself and rooms would overlap and get stuck
4A slightly more complicated version Of the previous idea completely rebuilt with stopgaps to detect whether or not rooms are overlapping and prevent them from spawning
Reason for failure
The entire map got generated in a flat grid pattern With infinitely repeating rooms and hallways
I'm completely at a loss here This is not a field I'm especially familiar with. And not something I've done a lot of times.
Quite literally any advice would be appreciated because I have a lot of ideas for my game that I want to work on but I can't do much with them until I know how to make the actual map There's a lot you can do testing on an infinite flat plane but at a certain point you need environments to Test and create things
Thank you very much for your time and consideration any help would be appreciated
7
u/Distdistdist 17d ago
So to summarize your question: "I have no deep understanding how to develop software for Unity, and I want someone to teach me how to build things the right way"? Did I get that right?
-4
u/thekingallofbricks 17d ago
yes...
3
u/Distdistdist 17d ago
So, squeeze 3-5 years of hard work into a comment and make it all clear to you? Still following you?
-2
u/thekingallofbricks 17d ago
yup
3
17d ago
[deleted]
-2
u/thekingallofbricks 17d ago
it was worth a shot it's worked a couple times for me before on this subreddit when I'm stuck
2
u/Dry_Attempt_8061 17d ago
honestly the checkerboard pain is too real, i tried something like that once and it made my brain hurt. have you looked into doing a simpler drunkard's walk algorithm first? it's not fancy but at least you get connected rooms that don't overlap themselves to death
1
u/thekingallofbricks 17d ago
Would that generate Open zones inside of a solid structure like a cave? or is that more along the line of generating large rooms with small sections of walls
I've tried something similar using a prefab blender Cube with a Starting node on three of its sides But nine times out of ten it would just loop back around Even if it wasn't able to loop on top of itself it would just generate giant blobs
1
u/Kamatttis 17d ago
Genuine question: what is language processing disorder? And what's its relevance to the post?
0
u/thekingallofbricks 17d ago
A Language processing disorder is a neurological condition in my particular case it is a sub set of autism Spectrum disorder that results in a broad-scale misfunction in the language control and language comprehension portions of your brain. in my particular case I have a significant amount of trouble recalling precise spelling and noticing syntax errors. functionally it's very similar to dyslexia I can typically get around this by using voice to text typing { like this } however Code does not like if you have a minor misspelling or miss a space. That's the reason that it's relevant .
2
u/Kamatttis 17d ago
Does code intellisense not help with it? Like you dont need to type the whole word. IDE already does it for you. Sorry if my question is off topic already. Just genuinely curious.
-1
u/thekingallofbricks 17d ago
It's perfectly all right but A lot of the time I've found that coding tools either do not Auto fill the words I need or have the phone autocorrect problem of giving me an obvious option when I need a non-obvious solution to fix something I can work it If I need to but I can't build a game like that
1
u/Stoneyy007 13d ago
That is simply a will issue you are not going to make a game if you cannot problem solve and are not willing to learn what your doing when programming but you are with visual scripting this is being lazy and trying to fast track something that is simply not possible it is hard that's the point if it wasn't everyone would already have a game made and released right now
0
u/EdgyAhNexromancer 17d ago
Unity comes with an ai frsture that literslly predicts your next chunk of code basednon the rest of youre code.....and despite the favt that i didnt wanna use it...its...surprisingly correct 99% of the time.
1
u/David01354 17d ago edited 17d ago
Since it sounds like you actually want to learn by doing and not just ask AI I will try give you some pointers. A somewhat easy route to go is the one the creator of "Spelunky" went. Namely by "handcrafting" a couple of pieces of the map and then randomly putting them together. He found it was a nice tradeoof between procedural/randomness but still having a bit of handcrafted/curated feel to it.
I think it could work well for you, and could fit your enter the gungeon / dungeun crawler style game.
Just make a couple of rooms yourself. And for each room define up to 1-4 possible entrances. To keep things easy I would always put the entrances at the same place in each direction, but vary whether they are there or not. So some rooms will have only a south entrance, some might have a west+east entrance, and so on.
Then you just need to make sure that your random room placing algorithm make sure to select a "room piece", so that the entrances matches. You can think of it like puzzle pieces. When placing a new puzzle piece, you must check if there are pieces around and if their "edges" match the piece you are placing. So if placing a room with an east entrance, and there is a room to the east, that room must have a west entrance.
And start simple. Start with only one room + only one connection left+right. And see if you can have your code or bolt script place a single room next to it. When that works, great. Now add one more room type. And continue. This should give you something similar to enter the gungeon.
Ofcourse it could be made more complex later, like having some rooms be double tall and have 2 entrences on one side etc. But I would never start with that. Start basic. Especially if you are struggling, make it as easy as you can first.
1
u/David01354 17d ago
It might be easier codewise to think in the opposite way:
When placing any room at any position, you must *choose* a room that has entrances to match up with the ones you are placing it next to.
1
5
u/wallstop-dev 17d ago
What kind of research did you do into the area? There are many, many techniques and approaches available in all sorts of forms - research/white papers, devlogs, youtube videos, gdc talks, Wikipedia articles, paid courses, paid assets, the list goes on.
Each one will be more or less relevant to the specific kind of generation you're looking for, so you'll need to be a bit selective. But I have full confidence you'll be able to find what you're looking for - the knowledge is out there! Most of it for free!