How To Make a PS1 Style Game In Unity [Unity Tutorial]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys mike here from com3 interactive welcome back to the channel if you've been following me on facebook or twitter you'll have noticed recently that i've been working on a little project that i've called behind closed doors and that is a survival horror game but in a playstation one kind of aesthetic so today i'm going to show you how i actually got that playstation one kind of style to the game and if you're interested in following the progress of this game being made make sure you go and follow us over on twitter i've got a link on screen and i'll also put the link down in the description as well and just before we continue i just want to thank gigatank3000 for sponsoring this video i've got his links down in the description below go check him out on twitter go check out his website see what he's up to keep up to date and i also want to thank everybody supporting me over on patreon so that's steve uk and brandon zill you guys are fantastic okay so i'm gonna show you how to change a scene from something like this really basic scene into something a bit more like this as you can see we've got the jagged edges that are synonymous with the ps1 and all the graphics we've got low res textures and we've got none of that new stuff like anti-aliasing so let me just revert this project back to its original state and we'll start building this playstation camera together so we're back to pretty much our original state now let's start downgrading the quality of this image so the way that we're going to do this we're going to be casting our view from the camera to a render texture and then we're going to show that render texture to the player instead of being able to see through the digital eyes of a first person controller so the way that we need to do this we're going to set up a quick folder and we're just going to call this psx just to keep everything to do with this rendering together and inside that folder i'm going to create a render texture i'm going to call that psx texture and just for the purposes of this i'm going to set this to hd so 1920 by 1080. so now that we have our render texture we need a way to display that in a game and the way we can do that is by using a quad so again for anything to do with the renderer i'm going to keep it as its own game object so i'm going to create an empty and i'm going to call that psx renderer now inside of this i'm going to go ahead and create a 3d object and i'm going to create a quad now a quad's kind of like a plane just a full-sided object but what this will allow us to do is display a render texture so we can remove that mesh collider because we know we're not going to need that and then the final thing that we need to display this render texture onto a quad is a material to actually assign to the quad itself so we're going to create inside of our psx folder a new material i'm going to call that psx matte so we'll start with the material first we want to change the shader from urp slash lit to unlit texture we're going to keep the tiling in the offset exactly the same but inside of the texture itself we want to drag this psx t render texture that we just created into that slot and now if we drag a psx material to a quad we see turns completely black that's because the render texture currently isn't rendering anything now we want our cameras view to be rendered onto that texture and that's really easy to do we'll just go ahead and select our main camera a first person view camera and right down towards the bottom we have an output section now in our output texture we see that it accepts a render texture we click on the little eyedropper and select our psx texture we should see our render texture is now rendering whatever our camera is seeing so if we rotate our player we can see that that updates in real time perfect but now the problem is we can't see this as you see we have the no cameras rendering error over here and that's not ideal so again inside of our psx renderer game object where we've got a quad i'm just going to rename that quad to render texture we're going to add another camera and i'm going to rename that straight away to render camera now we need to change a few things inside this one this camera's projection type isn't going to be perspective it's going to be orthographic because we're just looking at a flat plane the fps camera is going to be what's given us a depth and a perspective view this is just going to be rendering whatever this texture is showing so we'll set that to orthographic and then we just need to drag this about a little bit and position it so we can see uh render texture in view and there it is just about so now we need to scale this up so just to make sure that we get the correct aspect ratio for the demonstration we set the render texture to output a hd format so that's 1920 by 1080. so i'm going to set the scale of the render texture to be 1920 on the x by 1080 on the y now that's going to be absolutely huge the only reason i do that is so i can get the aspect ratio perfect now if we grab the anchors and scale using shift and alt at the same time we'll scale inwards and also keep our centered position so now we can scale that to the point where it's filling our screen now this may take a little bit of time just getting it perfect i'm just going to rush this a little bit so may not be right on the money but be close enough so now we can see that a render camera is completely rendering what's on a texture and if we play the game it should look exactly the same and it does but the only difference is we're not seeing from the player's viewpoint we're now seeing just a static camera that's pointing at the render texture and you may have noticed this there are two audio listeners in the scene whenever you add a new camera that comes with an audio listener and you only want one audio listener in your scene as the error says so we can just go ahead and on our render camera will delete that audio listener simple that'll fix that little warning message there so we've got to this point now and currently all we're doing is exactly the same as we did before we can see exactly the same as we did before so what's the point well now that we're outputting to a render texture we can change those quality settings so we want to downscale the camera's output to a playstation one resolution and we can do that by coming over to our psx texture in a project folder and instead of either the default size that you gave it at the start or this full hd what we're going to do we're going to change this to be 256 by 224 is pretty much the lowest resolution any game on the ps1 ran out because we want that full nostalgic feel and i'm also going to change the filter mode from bilinear to point now if you do quite a lot of pixel artwork you must know about the filter mode point because what that does that keeps all the edges of the pixels crisp and it kind of removes any anti-aliasing that will happen automatically and now that we've got our render texture set up we can hop over to our main camera and change a few more settings so the first one we want to tweak so the first one we want to change is our clipping plane now this won't make a difference in my example but if you have an open world example or something with a longer draw distance then this will add that um effect where objects in the distance kind of just appear they pop into view because they've reached the render distance currently or by default it's set to a thousand and that's way too far we want to change that to 100 so we'll only render objects that are within 100 units of our camera next we'll move down here to anti-aliasing by default it'll be set to fact fast approximate we want to change that to none because the ps1 did not support anti-aliasing as far as i know or it just makes this effect look a lot better anyway and now that we've changed the resolution of our render texture we're going to have to change the resolution or the size of the render texture quad that we have in our scene so again i'm going to do it in the same way to preserve the scale so i'm going to set it to 256 on the x 224 on the y and just revert that back to 1 on the z zoom all the way out and we'll do exactly the same as we did before now you may have already noticed that this aspect ratio doesn't fit a screen which is a widescreen screen screen screen so you could in theory still output it to a um a 16 by 9 or 16 by 10 resolution but keeping it to this 4x3 adds a lot to the experience adds a lot to the effect so at the end of the tutorial i'm going to show you how i kind of mask that in behind clause doors so we just go ahead and play this game we'll have a look what it looks like now so you can already see we've got this jagged edges we've got no anti-aliasing but the textures look a bit blurry they look a bit muddy and that's not good enough we want those heard sharp pixelate edges so the way that we're going to have to do that is we're going to go into the textures that we've assigned to the materials for our objects so i'm going to select all of these and over in the inspector i'm going to change the filter mode again from bilinear to point we'll already see that crispin up a little bit and just to add that low quality feel to it the max size i'm going to bring all the way down to 128 so that's going to compress our textures to be 128 pixels by 128 pixels at the max and now if we were to play the game again we'll see that that muddiness in the textures has disappeared and we have beautiful crisp pixel art look at that i love it i am a real fanboy for the ps1 so this kind of thing is bread and butter to me i love it so that is the basics of how you get your playstation renderer up and running you can tweak those settings you can output the render texture into hd format if you wish you can open this at any different resolution that you like these are just my preferred settings and like i said before i'm just going to show you a quick way of how to mask this ugly uh empty border around your game so inside the playstation renderer i'm going to add in a new quad so that's 3d object quad and i'm going to call this tv overlay because going for full nostalgia so let's put a tv screen in front now i've already gone ahead and created a material for this but all this is is an image texture of a tv overlay with the inside the actual screen as white and the rest of this as a tv texture and then a material which is set to only transparent with that tv texture as its texture now if we drag that onto our plane we can then scale this up to fit our screen and again if you hold alt and shift that'll bring it up from the center and then alt again to bring it out from the sides this isn't going to fit perfectly is it what has happened there we bring that in just so it cuts off the sides this texture does need to be a little bit wider so it'll actually fill the full screen but we can just go ahead and select a render camera don't render the skybox render it as a solid color and then we'll just color pick the color from a screen and one last time we play this game it now looks like we're looking through a 4x3 television how good is that i love that and i want to see your examples of this because i want to see this come back i know puppet combo and others do playstation 1 style graphics i really want to see more people doing this so if you actually do start making a game using this kind of system please tag me on twitter i'd love to have a look at it but that is everything that i've got for you today i'll see you again next week thanks for watching guys if you like the content remember to subscribe to the channel for weekly unity tutorials
Info
Channel: Comp-3 Interactive
Views: 21,620
Rating: undefined out of 5
Keywords: comp3, comp3interactive, unity, unity5, unity3d, unity2d, tutorial, game, development, dev, introduction, program, programming, code, coding, csharp, c sharp, c#, games, develop, 3d, 2d, artist, programmer, editor, extension, easy, beginner, advanced, professional, multiplayer, how to make a game, how to make games, game development, how to use unity, brackeys, comp-3 interactive, unity 2d, unity 3d, how to do, make money with games, ps1, playstation, one, resident evil, graphics, render texture, silent hill
Id: _nxJ8olekBY
Channel Id: undefined
Length: 13min 26sec (806 seconds)
Published: Fri Feb 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.