Binding of Isaac Procedural Dungeon Generation Part 3 - 2019 Unity Beginner Tutorial

preview_player
Показать описание
This tutorial covers the third part of my mini-series on binding of isaac styled dungeon generation!

#Unity #Tutorial #GameDevelopment #DungeonGeneration
Рекомендации по теме
Комментарии
Автор

I did an endless runner a while back, I remember using prefabs as segments in my world, the rooms could be prefabs and scenes can hold levels. A lot of the code would need to be rewritten but ultimately you'd have a cleaner solution. As it stands the rooms have to be a fit size and shape (maybe not shape with colliders you can do all sorts of stuff).

I was looking for alternatives since my gizmos wouldn't draw no matter what I did. Then all of the sudden they started working out of nowhere. My misalignment happened because the room container had shifted some how(probably me by accident), so my start room's doors and walls were always offset by the empty room. Got all that sorted out, it may even be why the red gizmo started showing up again. Before my "fix" (I'm still not 100% sure what did it to be honest) I had to zoom out quite substantially just to be able to see the outlines. It was affecting the sizeable portions of all gizmos like the camera. It's just one of those "unity" things that we've come to deal with. Really, the only reason I'm back coding in Unity is that Riticcini or whatever his name is, the guy with all the bad ideas (like the pricing changes) has been fired. Hopefully, Unity learns from these past mistakes and continues to grow and become better.

I might need to write a camera controller that's decoupled from room code and just have it follow player, you know to be able to create longer or taller rooms.

Other than that, this has been a great tutorial. It's a shame you no longer do these types of videos though. I've scoured the web, and while udemy has at least two there's only a few (even a 3d version) on youtube. As popular as roguelikes are it's a wonder there aren't that many good tuts like this one floating around. So for that I thank you.

For a case study some of you may want to look into Magicraft, it's basically a bunch of ideas from other roguelikes all mushed into one, I think it even takes elements from POE(Path of Exile).

llehsaderob
Автор

These series of tutorials of yours are really helpful, thank you and keep it up!

doxyy
Автор

If anyone has the problem that the camera just doesn't switch, check the other comments and check if every other scene besides the main has the camera controller attached AND the move speed is also set.

eliblake
Автор

For those of you who have this error, see that in your camera script put:
void Update()
{
UpdatePosition();
}
I forgot to put it :D

elDabby
Автор

My issue with camera not moving was solved by simply adding BoxCollider2D on each Room object and setting it to the size of the Room

grxxxnk
Автор

an error that I was encountering which I just fixed was that I had assigned a regular boxcollider to each room, instead of a boxcollider2D. If yours isn't working, check for this, it msy help

qanzii
Автор

Hello, I love this series. However, I have a noob question though. Why can we move through walls? Do we need a collider on walls to stop us from moving through them? How can I make it that we can move only through the door, and not anything else?

meloveandroid
Автор

If anybodys player isn't walking into rooms while the camera is, it might be becuase the rooms box coliders aren't set as triggers. I would know... I spent 20 minutes trying to fix it :/

alexalbihn
Автор

If anyone else is having issues with the camera not showing the scene and everything appears to be blank:

In CameraController.cs,

the line of code that says the following:
"if(currRoom == null) {}" -- Make sure "currRoom == null" is what it says and it doesn't say "currRoom != null"

My Visual Studio autocorrected me and made it "!=" and it took me a few hours to find the bug. Hope this helps someone else as well

jadenciminieri
Автор

My camera wont move:( Not sure why since my player is colliding with the rooms 2D colliders, but when I change rooms my camera doesn't update. Just says I'm still in start room even though I added a debug to make sure the collision was working, and it was. If anyone knows what to do let me know.

thedungan
Автор

Guess who made a typo and wrote Awak() instead of Awake(), making it not work without displaying any error

ti-die
Автор

Anyone can help me to know why the currRoom in cameraController doesnt update when i walk to other room?

miguelcarrizo
Автор

u guys that the camera doesnt update for the next room, check your player pls, put a box collider2D and a rigidbody2D in it .

and if u want a simples playermovement script:

public class Player : MonoBehaviour
{
public float speed = 5.0f;

void Update()
{
var horizontal = Input.GetAxis("Horizontal");
var vertical = Input.GetAxis("Vertical");
transform.Translate(new Vector3(horizontal, vertical, 0) * (speed * Time.deltaTime));
}
}

Gustavo-wgru
Автор

hey Um A random Question using this for a 3D game...wouldn't it be better to just create objects in 1 scene rather than calling multiple scenes in one mean wouldn't it take performance for mobile games?

abdullahamjad
Автор

Please solve my issue. I want to apply this in my game which have custom made level which also have rooms(without dungeons) in one scene. Please reply

naveenrajpurohit
Автор

So my camera and all things do exactly what they are supposed to do, however my player doesn't collide. I can walk through walls regardless of the doorway and it will pan with me. My walls have non-trigger colliders and my player also has an additional non-trigger collider on him just to see if it can run into things. Totally goes through everything, please tell me why my player is now a ghost!

niffnozzletoff
Автор

I'm getting pretty good at copying code then figuring out where I copied it wrong LOL

ff
Автор

Hey i was checking all the script but when i hit play my camera goes in the bottom room pls help

gamermanhd
Автор

Hey, i followed this tutorial and all is working right now but somehow the camera doesnt update for the next room it stays in the start room. I checked the code and it seems that nothind differs from the code in the tutorial. Can someone help me :c

brizzplay
Автор

You should actually move the room instead of the camera because in a huge world you would have problems with floating point precision. The floating point (in)precision would cause misalligend rooms and might even have impact on your overall gameplay like shaking gameobjects. These inprecisions will increase as further the room is away from the center of the gameworld. (Haven't watch the series nor the full-video, therefore my comment might be invalid and you have fixed it in a later video :D)

crone