Building 2D RPG Exploration

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome back and thanks for joining me for another dev vlog for dolphin this will be the second video in this series and unfortunately it's starting quite a while after the first one right after I released the first episode I had to travel for work and then very far away to Seattle for a wedding so I just have my hands tied with all that but I'm home now I've caught up on sleep caught up on chores and I'm ready to get back to work on dolphin looking back at the first dev vlog I realized I didn't really make all that much progress just built out scaffolding for movement and created a prototype tile map in this one I want to make a lot more progress by expanding on the players exploration and allowing him to interact a bit more with the environment so I'm going to kick things off today by hooking up some colliders [Music] while I'm working on that I think this is a great time to discuss something that I failed to bring up in my first dev vlog and that is my inspiration for Dauphin and why this project feels special to me back when I was just a little Devin duckling I had the privilege of growing up on this small but really beautiful lake in Virginia I did spend a fair share much out in front of the TV playing Mario and Zelda but most of it was spent swimming snorkeling fishing exploring all that good stuff all over every inch of this lake I did so with a handful of really close friends with the closest being my next-door neighbors sigh we spent hours diving to the bottom of the lake looking for old dumped treasure and countless late nights trying to scoop up bullfrogs from our canoes so I was and still is the closest thing I'll ever have to a brother we actually ended up being roommates all the way through college and because of our time spent growing up at the lake we both shared an interest in the field of marine biology I gave it a try with all the intro chemistry and biology classes but obviously I didn't quite stick with that path one semester of intro to computer science and I knew that's what I had to do so I on the other hand did stick with it and he now works as a marine biologist in a sea lab on the Gulf Coast you've probably started to figure it out at this point even though we're in science didn't end up being my trade I'm still super interested and passionate about it just because of my childhood and working on dolphin is kind of my way of bringing that to life you may have also figured out by now that the character you play as in Dolphin is of course psy he's very excited about this project as well and he'll be providing me with a lot of the details of his life and work as a marine biologist that I'll be using as inspiration for the gameplay now as far as the story goes I have made a little bit of progress getting that flesh to help but I'm just not quite ready to share that yet I think it's gonna change a lot as I talk with psy over the coming months but anyway I hope you guys enjoy that a little bit of insight into why I'm so excited about this project and I really wanted to get started on it let's change gears and get back to development all right so I've been working for about 30 minutes on this Wednesday night after work and I've already got collisions up and running so I'll go ahead and show you what that looks like pretty much just as you'd expect if you move the player into the tree he stops forward progress as he collides with it same with the bush you just can't walk through it now this was really easy to set up and didn't act require any code but there was one hurdle that I had to get past and I'll go ahead and describe that to you alright so here we have the player and the tree when I was initially designing the player's prefab and controller I had the body type of my players rigidbody2d set to kinematic and I was doing this with what I thought was pretty good reason I didn't want to add forces to the player to get him to move but rather I'm using the input actions that I talked about in the last episode to map input from my WASD keys to changes in the player's position the bad news here that I learned tonight is that kinematic rigid bodies cannot detect collisions with static rigid bodies or game objects that don't have rigid bodies at all and just a Collider like this tree you can see instead that if I change this to dynamic and try it again we have collisions all right the last thing I want to do tonight is fixed this behavior where when the player is walking what I would consider to be behind the tree he still goes over top of it I think I have a clever solution to solve this pretty easily the behavior that I ultimately want here is for the player to pass in front of the tree when he is below it on the y-axis of the map and pass behind the tree when he is above it on the y-axis my solution for this is a simple little component that automatically sets the sorting order of the sprite renderer on a game object based on the bottom position of that sprite so what this results in is sprites that are further down on the y-axis rendering above sprites that are above them on the y-axis and here's the results of that code looks pretty great in my opinion no noticeable hit on performance so I'm pretty happy with that all right it's going on 7 o'clock now and I'm pretty happy with the progress I was able to make after work today I'm gonna grab some dinner and probably relax for a little bit so hopefully we'll catch up sometime tomorrow it is now Tuesday February 25th just after work around 5:30 and unfortunately it's been like six days since the last update and part of that is due to the fact that I travelled to visit family this past weekend great to see everyone but at the same time I am kind of happy to be done with travel for the near term anyway the good news is in between now and the last update I did make a little bit of progress so we'll go ahead and run through that first thing you'll notice is that the behavior of the camera is looking quite a bit nicer than it was before now this is just because I integrated cinema Sheen which is a great kind of all-in-one tool for managing a lot of your camera logic I don't know nearly enough about Sennett machine as I should yet but I've got it integrated and I'll be learning it as I go along with this project I also did some work to calculate the correct orthographic size of the camera based on the size of my assets so everything is just looking a little bit crisper now and the camera follows the player around which is pretty fun the next task I've started on triggers when we first load the scene so go ahead and hit play and you'll see that well briefly fade out from black when the scene starts up now this is in preparation for working on scene transitions so what I mean by that is for example when the player it reaches the right side of the screen here he'll hit a trigger point that transitions him over to a new scene this is basically the kind of navigation between stages you would expect for a top-down 2d game like this I'm expecting this to be quite a bit of work so we're just gonna jump in heads first tonight and see how much progress we can make [Music] if you've been watching my most recent videos you've probably noticed how much I enjoy sharing b-roll of this thing this is a 10 gallon freshwater aquarium and after hearing about my childhood on the lake it shouldn't be too much of a surprise that I have one of these in my office and its own way this aquarium makes me feel just a little bit closer to the lake back home the little ecosystem that I've tried to cultivate within is also a gentle reminder for me to be mindful of my footprint on the earth and its inhabitants I've tried to make this tank as low maintenance and self-sustaining as possible I have an enormous amount of wife plants one pearl gourami and about 20 shrimp of varying breeds one of my goals with this tank is to cultivate a big healthy colony of these little shrimp and when I was talking to my fiance about that she came up with a pretty neat idea you may already know that I have a co 5 page and for those of you who have supported my work and bought me a coffee you guys Rock I really appreciate it moving forward though I want to get a little more creative than just coffee starting today if you choose to support the work that I do on this channel and donate to my Kofi page you will be sponsoring a shrimp for this aquarium the shrimp will be symbolically named after you and I'll give you a shout out when I add the little guy to the tank I really think that having this aquarium in my office helps me stay excited and motivated about dauphin so by sponsoring a shrimp you are directly supporting the cause alrighty it's going on seven o'clock and I have the very basics of a scene transition system setup you can see that I'm on the right side of my initial scene here and if I cross this border we fade to black and fade in in the middle of a completely new scene similarly on this new scene if I go back to the left side and hit the wall I'll load back into the original scene but I have not solved yet is having the player load into the next scene with some sense of continuity and what I mean by that is since the player is exiting on the right side of this screen seems like he should load in on the left side of this screen I have a couple ideas of how to do that but really I'm gonna be facing a challenge of making sure that player is loaded before I go try to manually set his position to a spawn point anyway like I mentioned it's 7 o'clock I'm getting hungry this seems like a good problem to solve in the morning so I think I'm gonna take it easy for the rest of the night relax and catch up with y'all tomorrow good morning folks it is 6 a.m. on Wednesday morning got a good early start this morning coffee is in the works and my plan for this morning is to continue work on my scene transition system well I'll stay in bed last night I kind of had one of those moments where all of a sudden it clicked and I think I thought of a way to implement player spawn points in the news scene so I'm gonna grind away at that and see what I can accomplish all right guys it's going on 8 o'clock and I have been pumping out code for like an hour and a half straight this was way more complex than I imagined it would be but at the end I have a working solution that it's pretty flexible and I'm pretty happy with it so I'll go ahead and run through what I accomplished first I'll just start off with a demo here you can see we're in the same prototype scene we've been working in and if I hit the right side of this scene I correctly load into the left side of this new scene similarly I can head back in the left direction and load up on the right side of the original screen it seems like such simple functionality to achieve but boy was it a lot of work the brain behind this whole scene transition operation is a single source of truth that I'm calling scene map and that holds all the possible transitions between scenes this looks really ugly right now and I'm absolutely gonna clean it up to make it more readable and manageable but for right now all you need to know that each entry basically corresponds to a source scene and a trigger name and a target scene and a spawn point name from here I have the notion of a scene controller which takes in information about triggers that the player hits those and looks at the scene map for the destination and loads up the destination and spawns the player appropriately that turned out to be an absolutely massive task I'm really glad I have it in a workable condition so that I can move on to the next thing anyway gotta go to work for now hopefully I didn't fry my brain too much this morning we'll catch up soon everyone welcome back it is Saturday afternoon and I'm about to kick off the last but potentially most important segment of this week's devlog everything you've seen me build for dolphins so far has essentially been a toolkit I have a way to lay out levels based on tile maps and now with my transition system I have a way to traverse across those levels it seems to me that the next logical step is to use those tools that I've built and see how easy it is to create new stages what you're looking at here is some art that I've been working on over the past few days of course this is just a palm tree and to go along with that palm tree I've been piecing together a work-in-progress beach tile set I still have a lot of work to do learning pixel art but I think these pieces of art here should be enough for me to try to build out a completely new area to explore so that's what I'm going to work on today let's jump into it [Music] all right guys it's been about an hour and I have successfully created three scenes that the player can't explore now it took a little bit of time to get into the groove of laying out the scenes and setting up the boundaries correctly but once I figured all that out and went pretty smoothly and everything worked so let's check it out here we are on our prototype grassland scene that we were working on before but you'll see you have made quite a few changes to usher the player towards the south once we hit this exit point here we will load up onto the beach which I have to say is looking really cool I'm so happy with how this tile set turned out considering that I kind of threw this together pretty quickly I think it's an omen of good things to come once I get a little bit better at this pixel art stuff anyway you can see I've created a path here to take us to our third scene which is quite a bit longer I wanted to make sure that the camera would follow the player correctly on these longer scenes honestly I couldn't be any happier without this turned out I think it looks and feels like other 2d games in this genre and I was really happy that I was able to build this out pretty quickly based on the results of that demo I think it's very safe to say that I have completed basic isometric exploration which was the goal of this dev vlog really happy with that there's certainly more I can build onto it and more that I will build onto it but for right now I think I'm ready to move on to the next big task in the roadmap which is basic combat and that will of course be the focus of the next dev vlog thank you so much for watching and for all the supports I had so much fun working on Dauphine these past couple weeks and it's got me super energized for the next episode so until then have a good one
Info
Channel: DevDuck
Views: 171,627
Rating: undefined out of 5
Keywords: indie game dev, devduck, unity 2d game dev, unity 2d, how to make an rpg, unity 2d rpg, game dev, dauphin, devlog, indie game devlog
Id: Vpqj9jGluQs
Channel Id: undefined
Length: 12min 40sec (760 seconds)
Published: Sun Mar 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.