2.5D is Easier Than You Think (Unity Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there how are you good I'm really good - thanks for asking that's great to know you're sweet anyway my name is Thomas fresh I'm the creator of a game called pin stripe and also finishing up a game called once upon a coma if you guys want to take a look at those games click the link in the description and also remember you could support on patreon and get a free copy of my game pinstripe alright so today's a special day because we're gonna jump inside a unity and I'm gonna show you how you can quickly create a system for a 2.5 d game another way of putting it is creating a 2-d game with a ton of depth that's basically what a 2.5 D game is utilizes some three 3d elements and some 2d elements and honestly guys unity has all the tools available pretty much out of the box we'll need to install some plugins but they're all free everything is really easy to install so come on let's jump inside of unity and take a look but first before we get started guys I want to thank this video sponsor Skillshare thank you so much Skillshare for sponsoring this video skill she has an incredible website for you guys to learn about pretty much anything you want to learn about specifically if you want to learn about game design it's an incredible place whether it's audio design for your games or 2d illustration or animation or unreal coding storytelling marketing business management whatever it is you need to learn about game development it's on Skillshare the coolest part about this ad read is hey get to three months of Skillshare by clicking the link in the description you really can't beat that guys give it a shot see what happens I love Skillshare it's a great way to learn about game development alright let's go ahead and get started all right now I have a very basic scene setup we're in 3d mode we're not actually in a 2d mode we've created a 3d project and you'll see I've got a lot of different 2d elements and 3d elements combined I have a three dimensional camera meaning it's in perspective mode not orthographic mode it's using a background color just a solid background color you'll notice there's fog as well so we're just taking advantage of the fog settings in our lighting tab and just be sure you turn up Auto generate that's that's gonna slow down things while you're working because it's gotta start baking in lighting and I've also just turned off mixed lighting just FYI just if you want things to be faster while you're working we're not gonna be working with baked lighting at all in this case so we have some fog settings it's set to linear mode we have set our end to 200 and as you can see if I set it to like 100 it just brings our fog closer and closer to the camera so we're gonna make it 200 and we have a terrain in front of our camera and then we also have what I really love about some new tools available in unity our sprite shapes we've just created a basic sprite shape here and as you can see it has an edge Collider in there as well I've set it to update the collider so it's basically gonna draw a polygon Collider on top of this white sprite shape so if we hit play you'll notice that we're using cinema sheen which is basically placing or following our character as we jump and run through this very plain basic scene and the cinema sheen is just set to follow this character here which is the character robot boy which is included in the standard assets on the asset store so if you go to the asset store all you got to do is click or type in standard assets and what I like to do is install pretty much every single standard asset especially when I'm starting a game just because I don't know exactly what I'm gonna need from the standard assets usually I'll use a couple things and in this case we're just using the basic character robot boy and we're dragging this into the scene and having the cinema sheen camera follow the robot boy now let's go ahead and start editing and manipulating this terrain to give you an idea of why we're even using the terrain so typically with 2d games what I'll do is I'll layer several pngs so if i'm creating some mountains I'm gonna have like five layers going into the z-axis but the terrain is really cool because we can actually just paint those layers onto the terrain and because we've utilized the fog in our lighting tab we're slowly gonna create a lot of depth so as you can see we can create some really huge mountains in the background and so you can imagine creating this in 2d this would be a layer that would be a layer and that would be a layer but with this terrain tool we can actually move we can hold shift by the way to lower things with this terrain tool you can see we've added a lot of depth here just by clicking around which is really really cool and obviously for those of you who are familiar with the terrain you can simply use these brushes here for those of you who aren't familiar I can show you really quickly how we could create a lot of detail just by selecting this brush here which is gonna add a lot more sort of bumpiness to our terrain so you can see we're adding a lot of depth to our scene here just by utilizing unities 3d tools you just want to be careful you don't get too close to the camera because we're gonna start seeing these ridges sort of come up over this sprite shape so we don't we definitely don't want that so overall this looks pretty good and just FYI as we go through this tutorial guys this isn't gonna look perfect but this is the basic setup of how you can utilize unities 3d tools in a 2-d game so there is our terrain let's hit play and show you how it's gonna look here so pretty cool we need to clean that up there but overall we have a 2d look obviously you can tell it's a little bit 3d but because the texture is so basic there's there's really no texture on the mountains you can see that how it could look like a 2-d game but it also has a ton of depth and we achieved it really quickly we didn't have to draw any of this in Photoshop this is all done using the Unity terrain tool so now let's go ahead and change this sprite shape to sort of fit in with this world so I'm gonna edit our sprite shape clicking this edit spline button and what we can do is start adding Hills and you can see that we can actually just create this really large section to walk on in the foreground I love this bright shape because this is totally different than your typical creation of a 2-d game in my in my experience what you do is you either create a tile based system or you create a huge PNG in Photoshop like this would be one giant PNG and then you put a polygon Collider on top of that but this is awesome because you're actually creating basically a 3d mesh but it's only in the X and y-axis and the benefits of that is it doesn't really take up your RAM and so you can create this huge huge P not a PNG mesh and that mesh is gonna allow us to explore and have this open world feel so as you can see it's basically 3d but it's really a - it's really a 2d mesh in a 3d space so let's finish up this mesh here and draw all the way over here and let's just be sure that we let's raise it up a little bit so it doesn't sort of interfere with the edges of the terrain and be sure we bring our character controller up as well so we don't follow through so let's click on our sprite shape here and actually just let's just hit play mode and I want to show you how it looks so we have this white ground and it definitely doesn't match the background at all but as you can see we can explore really far to the left here and have this open world experience which honestly achieving something like this with 2d layers it takes a long time again I'd have to draw these mountains I'd have to draw the ground but here we've got everything as mesh which is really cool so let's exit play mode and then add in a sprite shape to our spline here so as you can see we don't have any sprite shape currently but I've actually gone ahead and created something called grass and that's going to create grass for us and as you can see it's a much lighter color so it stands out from the background and all these are if we open up this dirt texture really it should be called grass texture but it's called dirt texture we can open this up and just inside a Photoshop and you'll see it's just a green square and then what we also have inside of our sprite shape is a grass top texture which is basically going to show up at every single angle so let's open up that you can see it's just a simple drawing that I threw together really quickly and what it's doing is it's looping across the surface of our sprite shape if you want to get a more in-depth tutorial of sprite shape there's plenty on YouTube just Google sprite shape tutorial and you're immediately gonna figure out how easy it is to use sprite shape so that's our sprite shape and it has our grass texture on top of it so if we hit play now we have this beautiful look this open world experience and again it's just utilizing meshes and terrain now the funnest part here is definitely going to be adding trees now for those of you who don't know unities tree system that's totally okay because inside of standard assets they have trees available to you that you can use right away so if we jump into our terrain and go to our tree tool here you can actually just go ahead and add the broadleaf desktop tree to our brushes here we could just start adding in that tree and again this tree is included in your standard assets so let's decrease the brush size and also the tree density just the height maybe make it a little bit shorter there we go and let's just start drawing trees in the background here so let's try to add a tree there tree there tree there tree there and as you can see I've edited these trees materials a little bit to be a little bit more basic there's no texturing in the bark to give it that look of being more of a 2-d game again it doesn't look perfect I promise you it doesn't look perfect but I think overall it gets the point across of how we're gonna make this 2-d game look like it has depth so we have some trees here so let's hit play get an idea of how it looks and as you can see the trees will start to blow in the wind here just a bit and there we go and the trees are blowing in the wind this is a really cool feeling for a 2-d game or a 2.5 D game again trees don't look perfect we could definitely remove a lot of a shading from the leaves but overall I think this gets the point across now the best part of creating a 2.5 big game or really any 2d game with parallax is adding for grant foreground elements now because the the terrain sort of hits right up snug against this 2d portion here there's not a lot of room here to add any foreground elements near the camera so what we can do is simply just drag that prefab of this tree let's drag it into the camera zero it out and then drag it out of the camera that just gives us a position near the camera and then we're just gonna drag this tree into the foreground so in front of the player and just start dragging some trees along x-axis to give some depth okay let's hit play here here we go obviously we'd make the trees not cover so much of the camera but overall I think this is definitely the feeling we want to achieve for this game now again it doesn't look perfect but what you can achieve with this system is is seriously amazing I promise you guys this wasn't available ten years ago or at least give me five years ago when when a lot of you started making games I know a lot of my audience has been making games for a little bit but for me over a decade ago this was not available the ability to create something pretty much out of the box like this and you can imagine how important it is to have something that allows you to create a limitless environment like this if you haven't wanted to make changes to the background it would be really easy to do you wouldn't have to edit any pngs in Photoshop or change the layering look how beautiful that looks that depth and if we run to the left here notice how everything gets a lot more foresty and it's just by simply adding in some trees and some mountains in the foreground and you've got a forest this kind of this ability to create this 2.5 D environment I think hasn't really been utilized yet in unity at least I haven't seen a lot of games that do something like this but I think it definitely needs to be utilized because unity has all of these tools available to us so that's basically Wow was that not the easiest coolest thing you've ever seen in your entire life I bet okay if you like this video do all those cool things click the notification bells subscribe leave a comment I'll try and answer as best as I can remember you guys could support me by supporting Skillshare or heading on over to patreon supporting there and getting a free copy of Pinstripe also remember you can wishlist my games and the links in the description alright guys thanks bye love you [Music]
Info
Channel: Thomas Brush
Views: 170,561
Rating: undefined out of 5
Keywords: thomas, brush, unity, unity3d, asset, assets, model, texture, models, textures, beginner, easy, how, to, howto, learn, course, series, tutorial, tutorials, game, development, develop, games, programming, coding, basic, basics, C#, 2D, 2d game, tiles, sprite based, make, make a game, how to make, getting started, start, level, design, level design, platformer, side scroller, top-down, video game, introduction, intro
Id: PECZS26lgtM
Channel Id: undefined
Length: 14min 48sec (888 seconds)
Published: Fri Nov 15 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.