Useless Game Dev
Useless Game Dev
  • 18
  • 1 282 195
Scene Management in Unity | Code Review
Scenes are one of the main concepts in the Unity engine. Let's check out this cute scene management system I built for my game. Let me know in the comments how you do it in yours!
*Music:*
"Beauty Flow" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons.org/licenses/by/4.0/
"Bleeping Demo" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons.org/licenses/by/4.0/
*Others:*
- Scene Reference drawer by JohannesMP: github.com/JohannesMP/unity-scene-reference
- More on Async Texture Upload docs.unity3d.com/530/Documentation/Manual/AsyncTextureUpload.html
Support the channel on Patreon to get extra content, and access to the source code of all projects!
www.patreon.com/UselessGameDev
Follow me on Twitter, not that I tweet that often: UselessGameDev
Kappa Avatar art by Boskoop ed.boskoop
And as always, have a good one!
Chapters:
00:00 Intro
00:17 General Architecture
01:43 The Scene Asset
02:45 The Loading Process
03:47 The Budget System
05:38 The Preloading Tengeant
08:42 Scene Initialization
09:21 Conclusion
#Unity #GameDev #IndieDev #devlog
zhlédnutí: 4 252

Video

Impractical Random Number Generators | Useless Game Dev
zhlédnutí 9KPřed 2 měsíci
Computers are bad random number generation. I want to help. Let's build a few way to extract entropy from the environment and start generating some numbers. Will it be a Tamagotchi colony? A Twitter spam bot? A dice shuffling robot? Or all of the above? Shamelessly yonk-and-twist'd from suckerpinch's brilliant "Harder Drives" video czcams.com/video/JcJSW7Rprio/video.html Watch me struggle to co...
This video took me a year to make
zhlédnutí 8KPřed 2 měsíci
Watch Stardew Kitchen part 1: czcams.com/video/ uz-9G4n5E/video.html I started this crazy project of recreating every dish from Stardew Valley. There are 80 items on the menu, and today we are tackling all the Spring recipes. Check out the video on the second channel. *Music:* "Settling In" from the Stardew Valley soundtrack composed by ConcernedApe #StardewValley #cooking
Time travel in Unity | Useless Game Dev
zhlédnutí 24KPřed 4 měsíci
New video out, it's about time. Time rewind more specifically, like you find in Legend of Zelda: Tears of the Kingdom, or Braid, or many other cool games that utilize this concept as a game mechanic or as part of their story. Let's see if we can make it work. This video took two years to make. It was supposed to be the very first video on the channel but I could never get the tone and angle rig...
Welcome to 3D World | Code Review
zhlédnutí 12KPřed 6 měsíci
Our game has isometric 2D graphics, but we need 3D physics. We'll explain how we detect collisions and fake a 3D world in order to make the game work. *More reading/watching on this subject:* - Sorting sprites based on Y position: www.evozon.com/two-unity-tricks-isometric-games/ *Music:* "Wallpaper" Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 4.0 License crea...
Painterly real-time rendering | Useless Game Dev
zhlédnutí 50KPřed 7 měsíci
Join me in this disastrous adventure as I try to make a real-time painterly rendering filter for a video game, there will be brushes, there will be compute shaders, there will be tears. Fun times all around. *More reading/watching on this subject:* - Interactive Painterly Stylization of Images, Videos and 3D Animations: gfx.cs.princeton.edu/gfx/pubs/Lu_2010_IPS/lu_2010_ips.pdf - GDC Talk A Livi...
My indie game needs your help.
zhlédnutí 10KPřed 7 měsíci
We need your help! We're working on a game called Brood and we've just reached a point where we can start showing it to the world, and start looking for a publisher to partner with us and make this game together. So if you work for a publisher and are interested in learning more about the game, we'd love to hear from you. if you don't, simply sharing this video to increase its reach would help ...
Just Boids | Useless Game Dev
zhlédnutí 56KPřed 9 měsíci
Boids are cool! I like seeing flocks of birds in video games, or schools of fishes swimming around. Join me in attempting to not thermal throttle my computer while putting as many "bird-oids" on screen! *More reading/watching on this subject:* - Check out Unity 2023 and its new features here: unity.com/releases/editor/whats-new/2023.1.8#release-notes - Flock, Herds and School: A Distributed Beh...
Chat GPT x Unity Localization | Code Review
zhlédnutí 8KPřed 10 měsíci
Get an exclusive @Surfshark deal! Enter promo code USELESSGDEV for an extra 3 months free at surfshark.deals/uselessgdev More reading/watching on this subject: - Unity Localization Package docs.unity3d.com/Packages/com.unity.localization@1.4/manual/index.html - OpenAI API C# Wrapper by OkGoDoIt github.com/OkGoDoIt/OpenAI-API-dotnet#chatgpt Music: "Wallpaper" Kevin MacLeod (incompetech.com) Lice...
Cheating at Countdown | Game Dev's Revenge
zhlédnutí 21KPřed 11 měsíci
I’m tired of being bad at Countdown’s letters game. I need to write some code and become the best countdown player, even if it means wearing a computer on my person! I want that teapot! I hope you enjoy this episode of Game Dev’s Revenge, where we dive deep into storing and looking up strings. Support the channel on Patreon to get extra content, and access to the source code of all projects! ww...
Simulating Chladni Plates in Unity | Useless Game Dev
zhlédnutí 42KPřed rokem
Dive with me into the world of Chladni plates and the weird sand pattern they create. Will my GPU catch on fire? There’s only one way to know! The Patreon is here! www.patreon.com/UselessGameDev Get bonus video content and the source code for all the projects! More reading/watching on this subject: - Steve Moudl’s video explaining Chladni plates: czcams.com/video/CR_XL192wXw/video.html - brussp...
Moebius-style 3D Rendering | Useless Game Dev
zhlédnutí 785KPřed rokem
It’s shading time. Watch me try to make a shader that renders real-time 3D in the hand drawn style of Moebius. There be crosshatch, outlines, sobel filters, we’re in for a bumpy ride. Support the channel on Patreon to get extra content, and access to the Discord server and to the source code of every project! www.patreon.com/UselessGameDev Play the hand shaded game Montrouge Grand Prix on itch....
Crushing Minesweeper | Game Dev's Revenge
zhlédnutí 29KPřed rokem
Minesweeper was a significant part of my childhood. I did not understand any of it and played mostly at random. Today, it is time I take my revenge on the game that has haunted me all those years. More reading/watching on this subject: - Very clear explanation on how to implement logic rules, by Apple Maths: czcams.com/video/8j7bkNXNx4M/video.html - Overview of learning Minesweeper, by i am err...
A Weird VR Musical Instrument | Useless Game Dev
zhlédnutí 17KPřed rokem
VR Instruments are doomed to fail until we get VR controllers that give the feeling of touching tangible objects. But what if there was an instrument that doesn't require physical contact? More reading/watching on this subject: - Lucas VRTech 's awesome VR Gloves czcams.com/users/lucasvrtech - Carolina Eyck for cool real theremin : czcams.com/video/ajM4vYCZMZk/video.html - Grégoire Blanc for co...
I tried to break a World Record and failed miserably | Useless Game Dev
zhlédnutí 22KPřed rokem
How many Dominos can Unity’s physics engine handle? How many Dominos can I handle? Is the plural Dominos or Dominoes? So many questions, so many Dominos. More reading/watching on this subject: - Hevesh5 youtube channel czcams.com/users/Hevesh - Domino King youtube channel czcams.com/users/TheDominoKing0197 Music: - One Sided Love by Wow Sounds - You Were Always In The Right Place by Andrea Baro...
I let an AI design my couch | Useless Game Dev
zhlédnutí 20KPřed rokem
I let an AI design my couch | Useless Game Dev
A Game about Gears | Useless Game Dev
zhlédnutí 84KPřed rokem
A Game about Gears | Useless Game Dev
ASCII Renderer | Useless Game Dev
zhlédnutí 84KPřed rokem
ASCII Renderer | Useless Game Dev

Komentáře

  • @KucheKlizma
    @KucheKlizma Před dnem

    Since you're working with a small number of symbols, perhaps instancing the symbols could be one possible strategy to improve performance among others? I don't want to be a downer, but 20fps isn't viable for a realtime videogame, so this definitely falls in needs performance optimization category.

  • @michaelcaterina4583

    Quick tip about specular highlights! They look best when placed closer to the viewer rather than on the brightest point of the object since they are a reflection of the light source rather than cast light.

  • @vpexmc
    @vpexmc Před 2 dny

    Take on me music video

  • @carelesswhisker4155

    Were you thinking of take on me at all when you decided to make a racing game

    • @uselessgamedev
      @uselessgamedev Před 2 dny

      I wasn't and was very confused by the people shouting "TAAAAAKE OOOON MEEEE" in the comments haha

  • @Vizzile
    @Vizzile Před 3 dny

    Even though I have no experience and have no interest in developing games, using unity or stuff like that, I always love these kinds of videos. Take my sub :D edit: quick grammar check from ChatGPT on punctuation

  • @fabiansw8
    @fabiansw8 Před 4 dny

    Is this why you might see white outlines where there should be a black one or none at all in some games?

    • @uselessgamedev
      @uselessgamedev Před 4 dny

      Not sure what you're describing but I'd say usually if there is an outline the devs have control on its color. The hard part it to get an outline there in the first place

    • @fabiansw8
      @fabiansw8 Před 4 dny

      The sobel filter i was thinking of c: Cant believe you answer after 20 min on a year old video!

    • @uselessgamedev
      @uselessgamedev Před 3 dny

      It's not like the other videos are generating many comments haha

    • @fabiansw8
      @fabiansw8 Před 3 dny

      @@uselessgamedev just found your channel today! Love your style haha! You make alot of pretty stuff, would love to see some more of brood! Looks like a great idea

  • @yitzharos
    @yitzharos Před 4 dny

    BRavo man. I like it. Although I want to note the finished product still lacked a real '2D ' Feel. It was defineitly a 3D game with some fantastic shading and mesh ideas. I thought about hand drawing frames angle by angle and creating vector style 3d levels.

  • @SnakeEngine
    @SnakeEngine Před 4 dny

    Wonder if Unreal Engine would give you better performance by default without fiddling with these optimization strategies.

  • @notquitehim
    @notquitehim Před 5 dny

    3:45 Gee I wonder why that is 😆 *stares at 3 nested for loops to parse each frame*

  • @HorribleHomeVideo
    @HorribleHomeVideo Před 5 dny

    absolutely NOT moebius style

  • @alaskandonut
    @alaskandonut Před 5 dny

    I’d pay to have an mc filter like this

  • @holybiscuits7714
    @holybiscuits7714 Před 5 dny

    ITES MOEBIN TIME

  • @mr2meows
    @mr2meows Před 6 dny

    morbius rendering

  • @marshmelon696
    @marshmelon696 Před 6 dny

    I love that part in Moebuis when he said "It's Moebin' time" and then he Moebed all over those guys

  • @j.e.f.f3352
    @j.e.f.f3352 Před 6 dny

    Loved it ! As a french artist I really enjoy the work of Moebius and he still is a massive inspiration for me. As for your shading system, a way to improve it would be to make the shadow lines follow the direction of the objet they are casted to. For example: a wall would have vertical lines on it, grounds would have horizontal lines, diagonal lines for slopes, even curved lines for curved objects. For artists this way of drawing shadow helps giving a better understanding of space in the image.

  • @theworm7156
    @theworm7156 Před 6 dny

    Just rediscovered you

  • @crafterboyz
    @crafterboyz Před 7 dny

    How do you make it on the full screen???

    • @uselessgamedev
      @uselessgamedev Před 7 dny

      I use the URP fullscreenrenderpassfeature which applies a material (and thus shader) to the whole screen, but you could do it manually with a blit yourself

    • @crafterboyz
      @crafterboyz Před 7 dny

      @@uselessgamedev cool, thanks man! does it matter with editors, does it depend on a certain editor?

    • @uselessgamedev
      @uselessgamedev Před 7 dny

      I think I made this with Unity 2019 so you should be good with basically any version

    • @crafterboyz
      @crafterboyz Před 6 dny

      @@uselessgamedev I don’t see it for some reason can you make it tutorial on how to get it?

    • @crafterboyz
      @crafterboyz Před 5 dny

      @uselessgamedev

  • @Shayan_failure
    @Shayan_failure Před 7 dny

    Quality content ❣️🤌✨

  • @akujules
    @akujules Před 7 dny

    Oh man, this video was great. Instant sub!

  • @lyrith2449
    @lyrith2449 Před 8 dny

    lovely video like always

  • @comet3429
    @comet3429 Před 8 dny

    Moebius style is one of my favs , kind reminds me of borderlands x spiderverse if that makes sense

  • @Meteotrance
    @Meteotrance Před 9 dny

    Pfiou doing an Anime style cellshading shader is already complicated to render well, but you making that type of "gravure" and hatch style, it's something delicated to operate, it's nice to pay hommage to Mister Jean Giraud aka Moebius ^^...

  • @NirielWinx
    @NirielWinx Před 10 dny

    Seriously though... Why are you still using Unity?

  • @GameDevelopmentBeyondTheBasics

    I ran into the issue where SceneManager.LoadSceneAsync() causes lag (which didn't make sense to me since I was using the async version) but come to find out it's an Editor only issue. Builds work seamlessly. Unity recommends profiling scene transitions in builds, not the editor. From my understanding, the Playdead team updated the Unity source code to allow them to get seamless transitions in Inside and there's a Unite 2016 talk about it.

    • @uselessgamedev
      @uselessgamedev Před 10 dny

      Yes, the behaviour is completely different in the Editor. Which I don't mind. The results in the video are profiled in a built version

  • @TobyJWalter
    @TobyJWalter Před 10 dny

    To this day I don't understand why this channel is so underrated. I Love your videos and keep up the great work!

  • @SharpAccent
    @SharpAccent Před 10 dny

    If you are going to add the addressable scene then your add in build settings function won't really be used. You can just use the AssetReference for the scene instead of the scene. HOWEVER, if you are going to use a scriptable to keep the scene data like this then you won't be able to do online content delivery if you want to add a new scene without making a new build for the game, since you'll have to be making the container for each new scene. Technically, a clean approach for ocd would be to get a container with all the addressable paths you may need for a scene from an online backend somewhere, then recreate these containers at runtime. But that's only if your game actually requires that.

  • @Spy653
    @Spy653 Před 11 dny

    I personally would give the choice to the player between longer loading screens, preloading with potential lag spikes, or just full ram usage (I paid for 16gb I'm going to use them god damn it!)

    • @uselessgamedev
      @uselessgamedev Před 10 dny

      True, it could be a parameter for PC users

    • @WeslomPo
      @WeslomPo Před 10 dny

      I have 64gb xD

    • @Spy653
      @Spy653 Před 10 dny

      @@uselessgamedev it would also mean your pipeline would be more flexible for future projects that may have more or less intense scenes

  • @_zarka
    @_zarka Před 11 dny

    Doesn't having a big root object for each scenes affect performances? Smaller hierarchies beneficiate from multithreading to update their Transforms, whereas larger and more complex hierarchies have a bigger impact on garbage collection. Unless you scenes are not complex enough for that to actually affect your frame budget?

    • @uselessgamedev
      @uselessgamedev Před 11 dny

      Wait a minute is that true? I've been certain everything Unity.Object related is updated on the main thread always for years. I thought this was both the strength of Unity (ease of use/learn) and its weakness (performance). When you do stuff to a transform from a a thread it even tells you you can only do it on the main thread. Do you have a source for this?

    • @noisecrime
      @noisecrime Před 11 dny

      Possibly, how bad is often dependent upon project. Unity recommends to use flat hierachies where possible and to keep the depth of the hierarchy to a minimum, ideally less than about 50 gameObjects ( I believe thats due to optimal memory usage/performance when updating transforms as batches). As a general rule, you should prefer multiple small hierarchies at the root to one big hierarchy.

    • @uselessgamedev
      @uselessgamedev Před 10 dny

      All right I did my rounds and it seems the confusion is that unity multi-threads *transform change checks* per hierarchies. They do indeed recommend flattening hierarchies and using multiple small ones rather than one big one. Not a huge issue in my case (except for the dungeon this is most likely going to have a noticeable effect on performance). I'll see if I can think of a different architecture

    • @noisecrime
      @noisecrime Před 10 dny

      @@uselessgamedev If you do change this, it would be interesting to profile before/after and see if it had any effect. For example if your scenes are only a thousand GO or less, I could see the overhead from this being dwarfed by some other unoptimised practise and thus not gain or really lose performance due to hierarchy layout.

    • @_zarka
      @_zarka Před 10 dny

      ​@@uselessgamedev that's an interesting nuance! I second what @noisecrime said, if you do make the change it would be interesting to see if there's any actual difference in term of performances

  • @MaxIzrin
    @MaxIzrin Před 11 dny

    Since the main issue with the scenes is the large textures, I would've handled it the way maps are rendered. Split the massive textures into small tiles, and load them based on player position, same concept as Minecraft's "Chunks". This way only a small part of every scene's background needs to be loaded at any given time. It will also allow for seamless traversal of the world if you wish, doing away with scene management altogether.

    • @WeslomPo
      @WeslomPo Před 10 dny

      There also a some info of how Disco Elisium working. There are similiar concept.

  • @psuvideographer
    @psuvideographer Před 11 dny

    Thanks for the video! I always enjoy them. I thought maybe if you needed to upload a big texture but didn't want to decrease the quality, you could slice it in pieces and upload one piece per frame. That way you still have your overall resolution.

    • @uselessgamedev
      @uselessgamedev Před 11 dny

      Yep, that's the plan. One of the plans anyways. Splitting would also allow me to get po2 textures which is nice

  • @WeslomPo
    @WeslomPo Před 11 dny

    So hard theme you tackle. It have so much pits and bumbps. For example. With loading/unloading you at risk to have severe a memory segmentation with time that lives your game. Also, I think, if you can, you should stop using OnEnable, Start, Awake etc events if they for logic. Better to have some object on scene, that have all objects that can have logic, and call their method directly. Unity events can be unpredictable. Anyway good luck. You have a nice project :)

  • @alex2416
    @alex2416 Před 11 dny

    your videos are so interesting ! seeing how sub-systems like this one are used in real game production is really cool :D

  • @firegater8540
    @firegater8540 Před 11 dny

    First

    • @uselessgamedev
      @uselessgamedev Před 11 dny

      I can attest this person was indeed first.

    • @frenkgoes
      @frenkgoes Před 11 dny

      @@uselessgamedev First

    • @DarthBiomech
      @DarthBiomech Před 10 dny

      @@uselessgamedev _Please_ do not encourage them...

  • @instanttv1368
    @instanttv1368 Před 13 dny

    Bro that's literally Sable's artstyle

  • @yaroslavb.2589
    @yaroslavb.2589 Před 13 dny

    👏👏👏

  • @oksobasically704
    @oksobasically704 Před 14 dny

    this looks awesome

  • @peschken23
    @peschken23 Před 17 dny

    This video is so informative, I love it. I've been replicating this effect in Godot and so far it works fantastically! There is one detail I don't understand though; in your demo it appears as if the crosshatch completely replaces the shading on objects; how is this possible if the crosshatch is computed based on the shading?

    • @peschken23
      @peschken23 Před 17 dny

      Or as I understand it; in your first pass on the object's shader you multiply the normal based on the shading, after which you apply an flat shader, after which the screen space shader catches the normal hatches and outlines it?

    • @uselessgamedev
      @uselessgamedev Před 16 dny

      Yes, but also the image is rendered once with only shade/shadows, to provide info for the final shader to use

  • @1x93cm
    @1x93cm Před 19 dny

    A man that can't draw- can do all this.

    • @uselessgamedev
      @uselessgamedev Před 18 dny

      Teach a man to draw he will make a masterpiece. Teach a man shaders he will spew poor results at 60fps

  • @user-pc7yw9my2q
    @user-pc7yw9my2q Před 20 dny

    i watch your video on bilibili,this very good!!!!!!!!! love it!!!!!!!!!!!!!!!

  • @woodenfences
    @woodenfences Před 22 dny

    Beautiful. Makes you wish you could explore that world on foot.

  • @raulzilla
    @raulzilla Před 24 dny

    What if you use multiple cameras, each rendering a desired layer with this effect? It might be the solution for moving and every stroke getting blended and blurred together.

  • @alexbown9689
    @alexbown9689 Před 25 dny

    wow it kinda looks like sable

  • @official-obama
    @official-obama Před 26 dny

    "it looks scary at first" what??? how are you even capable of doing this???

    • @uselessgamedev
      @uselessgamedev Před 25 dny

      Research I guess. I didn't come up with the equation myself for sure

    • @official-obama
      @official-obama Před 23 dny

      @@uselessgamedev i was saying that it didn't look scary at all?

  • @pedroduran8927
    @pedroduran8927 Před měsícem

    You should sell this asset on the asset store! looks really powerful and something that many would buy without thinking twice!

    • @uselessgamedev
      @uselessgamedev Před měsícem

      It is available on the Patreon, however the results are definitely sub par compared to an actual human for now

  • @PaigeVG1995
    @PaigeVG1995 Před měsícem

    Hey, you just started showing up in my feed and I've found your videos very interesting and useful. It's good stuff! 👍Which, is why your name rubs me the wrong way... Useless game dev? 🤔 I don't think what we're doing here is useless, why do you?

  • @_sadwax
    @_sadwax Před měsícem

    Found you through the Stardew Kitchen videos (saw the Frenchmen Begs for Mercy screenie and had to check if that was legit on a second channel) and found this haha! Environment artwork looks amazing, concept is familiar and always a winner. Who doesn't love rescuing animals and teaming up?? I know you said you're looking for publishers, but maybe you could reach out to TheHotCross (he's on youtube, twitter, twitch)? He's got a background in teaching/game development. It's a long shot, but it's possible he'd have some good advice, and he's a really kind person. He does a podcast with some big youtubers, who do a "book club" where they choose a game for them all to play for two weeks and then talk about it on the next episode and their audience plays it along with them too. So maybe that could be a longer term goal too? Just to get some exposure for it. And never underestimate kickstarters!! Sometimes it takes a while, but they really can blow up over night if it catches the wind right. Anyways, sorry for the long comment. I hope you have great luck with your game, it looks so charming!! EDIT: The podcast isn't on his channel, but it is posted here on youtube, it's called Spine Chill and it's on his friends channel John Twolfe.

  • @thomas7726
    @thomas7726 Před měsícem

    Amazing

  • @abuDA-bt6ei
    @abuDA-bt6ei Před měsícem

    how do you get the little holes on the ground

    • @uselessgamedev
      @uselessgamedev Před měsícem

      iirc it's a noise texture with single pixels here and there

  • @coreyholt8522
    @coreyholt8522 Před měsícem

    That was so cool and conveyed so well

  • @tjspeirs75
    @tjspeirs75 Před měsícem

    what in the hell? an incredible shader tutorial just kinda. hangin out? on yt? this is great stuff