How I Develop Supersonic Framerates for 2D Unreal Engine Games

Поділитися
Вставка
  • Опубліковано 9 тра 2024
  • Get my Unreal 2D Action Platformer Course:
    tinyurl.com/2DActionPlatformer
    Write up of best 2D Settings in UE:
    tinyurl.com/UE2DSettings
    Support the channel on Patreon:
    / cobracode
    Many developers believe Unreal Engine isn't suited for 2D games and has performance issues. However in this video I disprove that and show you how you can make performant Unreal 2D Games that run at framerates of 300 FPS and higher.
    🔔Subscribe: / @cobracode
    Twitter: / cobracodedev
    Discord: / discord
    Timecodes:
    0:00 Intro
    0:26 What are Frames Per Second
    1:49 FPS Benchmark and Project Settings
    4:02 FPS in UE 2D Games on Steam
    Icons made by Freepik (www.freepik.com) from Flaticon (www.flaticon.com/)
    #cobracode #gamedev #unrealengine #ue5

КОМЕНТАРІ • 99

  • @CobraCode
    @CobraCode  2 місяці тому +1

    Get my Unreal 2D Action Platformer Course:
    tinyurl.com/2DActionPlatformer
    Write up of best 2D Settings in UE:
    tinyurl.com/UE2DSettings

    • @johnr39
      @johnr39 Місяць тому

      Hey, do you have instagram? What is the best way to reach you for business inquiries? Thanks

  • @IstyManame
    @IstyManame 2 місяці тому +63

    1) Disable Lumen
    2) Enable Forward rendering

    • @heylister
      @heylister 24 дні тому

      As I just found (UE5.2) enabling forward rendering first greys out the option to disable Lumen, which caused me a bit of confusion.

  • @compatriot852
    @compatriot852 2 місяці тому +23

    Another aspect that would be interesting to learn more about would be compressing/reducing file size

    • @CobraCode
      @CobraCode  2 місяці тому +9

      Thanks for the suggestion.
      By default it's around 300MB, but I've seen Rocky Mullet get his games down to around 90MB.
      I believe it's mostly achieved by turning off unused packages, but this is actually something I plan to look in further soon.

    • @yellowloon
      @yellowloon 2 місяці тому +1

      ​@@CobraCode Are you planning on posting a video on this topic? This is one of the only things holding me back from commiting to UE5 for 2D.

    • @CobraCode
      @CobraCode  2 місяці тому +2

      @@yellowloon
      Yes!
      I'm currently doing research on this and sharing it on twitter.
      twitter.com/CobraCodeDev/status/1765016677211684989
      Once I'm done there will be a video!
      Already shaved off about 100MB!

  • @thelaw3536
    @thelaw3536 2 місяці тому +16

    People thinking that unreal is unoptimized are ignorant. Out of the box you won't have access to another engine that performs better even in the editor. Seriously, if you are running a good fps on a 3d game with a lot of assets why would it perform worse for 2d?

    • @MastermindAtWork
      @MastermindAtWork 2 місяці тому +3

      I agree with this statement. However, a lot of people don't use Unreal for 2D games cause it doesn't have strong workflows that favors 2D games. There are some plugins that makes it a bit better to make 2D platformers but Unity and Godot makes it WAY easier to work with 2D. 2.5D games on the other hand, is better to do in Unreal since that leans towards 3D, Unreal's strengths.

    • @Ehren1337
      @Ehren1337 19 днів тому

      Unoptimized.

  • @3RDEYELOVE
    @3RDEYELOVE 2 місяці тому +2

    Pretty cool bro I'm definitely getting the course💪🏾

  • @brandonjacksoon
    @brandonjacksoon 2 місяці тому +2

    Thank you my friend! Always very helpful tutorials!

  • @heroli9970
    @heroli9970 2 місяці тому +4

    I will always thank the algorithm for showing me your channel. Thank you for doing what you do ❤

  • @romanchannel69
    @romanchannel69 2 місяці тому +3

    Useful video, thanks!

  • @BlackG0lem
    @BlackG0lem 2 місяці тому +1

    Great Video, as usual. Thank you very much.

  • @brandonjacksoon
    @brandonjacksoon 2 місяці тому +1

    Absolutely the best, mate!

  • @NazariyDudnik
    @NazariyDudnik 2 місяці тому +3

    Thank you!

  • @RockyMulletGamedev
    @RockyMulletGamedev 2 місяці тому +3

    Great video !

    • @CobraCode
      @CobraCode  2 місяці тому

      Thank you :D
      I actually also tested all of your games on steam deck, but since they are all locked at 60 FPS (as they should be) I could only get some info about GPU and CPU usage.

  • @TC-mk1tc
    @TC-mk1tc 2 місяці тому +2

    You should do a series like brackeys did for unity teaching people how to code C++ for UE.

  • @haaay
    @haaay 2 місяці тому +1

    Thank you i love u

  • @NorseWhittler86
    @NorseWhittler86 2 місяці тому

    I have been following your tutorials, and others, to try and learn how to make an hd2d game. One thing I have notices and have not found an answer for is the animation transition for attacking while running. Is it possible to overlap, or blend, animations for 2d characters so you can attack while showing the character still running? Would/could this be done using a noti?

  • @saulsantos4132
    @saulsantos4132 2 місяці тому +1

    Super cool, would be great if you made the same for 3d if you want(as 3d runs bad af in my igpu.

  • @betelgeuse3287
    @betelgeuse3287 2 місяці тому

    Thanks for the tips at just curious what game is at 2:18 ?

    • @CobraCode
      @CobraCode  2 місяці тому

      It's the valley of the ancients tech demo from epic games

  • @Pewsplosions
    @Pewsplosions 2 місяці тому +1

    Nice. I originally wanted to use Unreal for my 2D game. I had a little concern about FPS but never really got around to testing it. It was the bloat that got me. 200-500GB for building a 2D game felt so unnecessary. Not to mention, for the life of me, I could not get my sandbox game to deploy to my steam deck. :(

    • @CobraCode
      @CobraCode  2 місяці тому +2

      Package size can also be brought down to about 90MB just for the engine files.
      I've seen it for Rocky Mullet's games, but still haven't had time to do the research on how to do it.

  • @shanliumoshi7904
    @shanliumoshi7904 2 місяці тому +1

    good

  • @HollaenderDK
    @HollaenderDK 2 місяці тому +5

    How did the changes affect the final build file size??

    • @CobraCode
      @CobraCode  2 місяці тому +6

      These changes are unrelated to build size.
      By default it's around 300MB, but I've seen Rocky Mullet get his games down to around 90MB.
      I believe it's mostly achieved by turning off unused packages, but this is actually something I plan to look in further soon.

    • @NeverduskX
      @NeverduskX 2 місяці тому +2

      @@CobraCode I'd love a similar tutorial that goes into reducing project size, if you ever plan to do one. Just for that extra optimization step at the end.

  • @tylergerhart4806
    @tylergerhart4806 Місяць тому +2

    Would a 2d paper vehicle be done just like a character? How would they interact,such as getting in the vehicle?

    • @CobraCode
      @CobraCode  Місяць тому

      There's a template for vehicles as well using the VehicleMovementComponent.
      Haven't done much work with it yet though, so might be overkill for what you're trying to do.
      you could create a class employing this component for 2D vehicles

  • @negativezero9179
    @negativezero9179 Місяць тому +1

    can you create tutorial of top view 2d game RTS? there is a game i wanted to make but now idea how to use unreal engine yet

    • @CobraCode
      @CobraCode  Місяць тому

      Something I'm very interested in, but haven't done anything similar so will need some time to research.
      Also even though I'm a huge fan of blueprints, that seems like the kind of game that could benefit greatly from having parts done in C++

  • @muhamadshaker1318
    @muhamadshaker1318 2 місяці тому

    I have a question, depending on frame rate my game’s speed differs, like movement speed etc., solution that I’m using right now is locking fps, is there other solutions, because I see 2d games running on uncapped FPS and performing the same

    • @thelaw3536
      @thelaw3536 2 місяці тому +4

      You have to use things like delta time or other fps independent things. Games update on a frame dependent basis. That means any fps change will change the rate of updating (so if I make a box move 5 cm/s than I would move twice as much with 120 fps vs 60 fps.) Delta time takes into account the time it takes to update a frame starting from the last one. So multiplying by delta time will cause your updates to occur based on what should have happened even if you miss an update on a frame (Say you dropped fps).

  • @MailmanHOF
    @MailmanHOF Місяць тому

    Im a full time mailman and hardcore gamer who wants to transition to game dev. What affordable pc or laptop should I look into to use unreal 5

  • @latef3663
    @latef3663 Місяць тому

    If i were to create a game like stardew valley does it count as 2d Hybrid game?

  • @alexlealch
    @alexlealch 2 місяці тому

    Hi, I still follow your firts udemy course, but I have a serious problem for compile and export to Windows. Some kind of error. Can You make a tutorial of this topic? Thankyou.

    • @CobraCode
      @CobraCode  2 місяці тому

      Hey, sadly that is something which is really hard to cover in a tutorial since everybody's machine is different and they'll run into issues I can't predict.

  • @monicde4570
    @monicde4570 2 місяці тому

    If you are already Unreal Dev it really good information.😀
    Some question if just make a full 2D game non-mix without 3D features maybe just dynamic lighting. Using unreal hava any advantage?
    I consider make a topdown action game with 2d character mix 3D and maybe small openworld using unreal becuse more high qulity scene but not sure 2D integration of Unreal is good enough(My team most only have unity experience).

    • @thelaw3536
      @thelaw3536 2 місяці тому +1

      Nanite and the unreal asset store alone can make it worth it. For 3d objects nanite will cover your needs to make lods saving man hours and will probably be more optimal than non nanite assets in 3d. Quixel mega scans has a ton of high quality textures and assets that can be adjusted for your games needs.

    • @monicde4570
      @monicde4570 2 місяці тому

      Yeah, Nanite and mega scans are very powerful for 3D creation, and Unreal Standard toolchain can handle the open world that's why I am considerate.
      My main question is whether 2D integration in Unreal is good or not. For example, if I want my sprite can receive Lumen or Posteffect(SSAO, TAA) if it works correctly doesn't need to do too much work. I don't mind tweaking something but We are not a big team so can't do so much like those games in the video if doesn't have enough support with those powerful tools.

    • @thelaw3536
      @thelaw3536 2 місяці тому

      @@monicde4570
      So, my questions would be: 1) What is the minimal requirements for your project 2) What do you get beyond that for using this particular engine?
      You could use unity for the tile based system, but if you plan on having 3D models than that isn't useful. You could than say you know more about c# than blueprints or c++, but than You could be missing out of time savers like megascans and nanite.

    • @monicde4570
      @monicde4570 2 місяці тому

      @@thelaw3536
      Thx for your reply.
      It's still in concept. Ideally, I think it's a middle-size open world(at least seamless load) and then supports a dynamic lighting system for both environment (3D) and character(2D), and not pixel art style. It's 2.5D that's why I hope Unreal fairly deals 2d sprites like 3d(I used to spend lots of time making sprites and models receive the same lighting and bake in unity ). I have experience dealing with 2d mixed 3D models in my current work but it side scroll.
      I consider this because Unreal has a modern lighting system production-ready toolchain for 3d work. To be short just wanna know more about the actual workflow of 2.5d in Unreal. Bty I am a technical artist so I am willing to know about tech and program.

    • @thelaw3536
      @thelaw3536 2 місяці тому +1

      @e4570 When it comes to 2D This video might have something: ua-cam.com/video/s4dBvSj9Zpo/v-deo.htmlsi=1T68HN-NS8m-IUi-
      It's long winded, but guy uses a normal map for his 2D sprite to get some lighting on his 2D character. You can also fake lights in unreal. To be frank unreal doesn't really have many tools for 2D, but you can do things out of the box that you can't in other engines and 3D is just a no brainer.
      PaperZD is a great plugin that lets you use the animation graph on 2D Characters. I can't say for sure, but people with some desire to learn c++ and blueprints I think Unreal has more to offer in this area.

  • @Sadness88
    @Sadness88 Місяць тому +3

    I love Unreal and I creat a 2d game but the probleme it's I don't see a lot of tutos for 2d game (sorry for my english, I am french)

    • @CobraCode
      @CobraCode  Місяць тому +1

      Well that's the problem I'm trying to solve xD
      Of course it would be better to have more choices since my teaching style won't work for everybody.

    • @legomancien3218
      @legomancien3218 Місяць тому +1

      Thanks you and thanks you for your job ✨

    • @Sadness88
      @Sadness88 Місяць тому +1

      ​@@CobraCode I come back to you to ask you if it was possible for you to make a tutorial for making intelligent 2D enemies because I can't find one on UA-cam, thanks in advance

    • @CobraCode
      @CobraCode  Місяць тому +1

      @@Sadness88
      The next scheduled video is actually about 2D AI in Unreal.
      It's just a starting point though and the bare minimum.

    • @Sadness88
      @Sadness88 Місяць тому +2

      ​@@CobraCodeThanks you 🔥

  • @MsCamiloAlejandro
    @MsCamiloAlejandro 2 місяці тому

    you should check the game "forgive me father" , is a 2D characters in a 3D enviroment with real time lighthing . is an awesome game that make me wanna try 2D in Unreal Engine . becouse the engine alone eat all the power of my computer . so i change to unity . but your videos make me wanna get back and try . also discover that is posible make sprite sheet from 3D in blender to 2D . so maybe can combine those 2 together

    • @CobraCode
      @CobraCode  2 місяці тому

      Thanks!
      Forgive me father has been on my steam wishlist for a while, but still got a long backlog to finish up.

    • @MsCamiloAlejandro
      @MsCamiloAlejandro 2 місяці тому +1

      @@CobraCode if you like FPS , comic and Lovecraft . you will love forgive me father . in fact i will love a tutorial on how make 2D FPS on Unreal Engine .

  • @rcoh4
    @rcoh4 2 місяці тому +1

    What game is that at 0:03?

    • @CobraCode
      @CobraCode  2 місяці тому

      The Siege and the Sandfox.
      It's still in development but already has a steam page.

  • @zufurioPlay
    @zufurioPlay Місяць тому +1

    I have a question, when I run the game in Lit mode it looks bad, but when I run it in Unlit mode it looks good. Anybody knows what could be the problem? thank you

    • @CobraCode
      @CobraCode  Місяць тому

      UE applies a lot of settings by default that make 3D games look good, but make 2D games look washed out.
      I have a writeup that will help you basically make LIT look identical or very close to unlit.
      tinyurl.com/UE2DSettings

    • @zufurioPlay
      @zufurioPlay Місяць тому +1

      @@CobraCode thanks very much buddy

  • @fosty9223
    @fosty9223 2 місяці тому +1

    0:47 whats the game? And great video

    • @CobraCode
      @CobraCode  2 місяці тому

      Thanks.
      It's Monster Hunter Rise!
      Been playing a lot of it recently.

  • @IamSH1VA
    @IamSH1VA 2 місяці тому +1

    Are these settings helpful for performance boosting in *3D Games*?
    - Disable Lumen
    - Enable Forward rendering

    • @CobraCode
      @CobraCode  2 місяці тому +1

      Yes, certainly.
      Lumen is quite expensive and many VR games use Forward Rendering to save on performance.

    • @IamSH1VA
      @IamSH1VA 2 місяці тому +1

      @@CobraCode thanks

  • @wamteng3790
    @wamteng3790 2 місяці тому +1

    0:04 What is the name of this game?

    • @CobraCode
      @CobraCode  2 місяці тому

      The Siege and the Sandfox!

    • @wamteng3790
      @wamteng3790 2 місяці тому +1

      @@CobraCode Thanks, it looks interesting. I will check it out!

  • @Josh-hl8jl
    @Josh-hl8jl 2 місяці тому +1

    No no, forward rendering is a lot better when dealing with transparents. Deferred shading pipeline cant support transparents. So they always have a forward shading phase that only renders transparents. So deferred rebdering is slower in that sense.

    • @CobraCode
      @CobraCode  2 місяці тому

      Hey, thanks for the input!
      I remember that when we made our VR game we used forward shading and also stopped using alpha transparency to use dithering instead.
      My partner mostly took care of this part and I assumed those things were related, but I guess there was another reason for this approach.
      This nice blog post helped me understand what you pointed out:
      martindevans.me/game-development/2015/10/09/Deferred-Transparency/

  • @royandescartes
    @royandescartes 2 місяці тому

    what is the name of the first game?

  • @ValleDelSergio
    @ValleDelSergio 2 місяці тому +1

    How about Switch?

    • @CobraCode
      @CobraCode  2 місяці тому +1

      Sadly I don't have a dev kit and couldn't test this with my own game, but switch is most problematic one... even more problematic than mobile.
      Ender lilies runs at 60 FPS on switch, but has a few dips into the 50s here and there, so Unreal 2D can definitely be viable especially since locking games to 30 FPS on switch is quite common.

  • @Burnrate
    @Burnrate 2 місяці тому +2

    You should really talk about frame time in ms and not compare fps values. It has a lot more meaning

    • @CobraCode
      @CobraCode  2 місяці тому

      Hey, thanks for the feedback!
      Most people understand FPS, but frame times are more obscure and not as well known, so it would make the video much less approachable.
      You can see the frame times on the steam deck performance screen and it's stable.
      Bringing it up would only make sense if there were strong irregularities, but the point of this video was to show the possible fps in an 'idle' state rather than under heavy load since that would be more game specific.

  • @gorofujita5767
    @gorofujita5767 2 місяці тому +1

    01:14
    "however, and especially for 2D games the benefits are negligible and you may actually want to lock the game to 60fps by default"
    Absolutely false. Provided the 2D game you're playing isn't some turn based RPG, having it run at more than 60fps is always a *huge plus* in terms of reaction times for the player, and overall feeling of smoothness and cohesiveness to the picture.
    Also, nowadays we're (thankfully) moving further away from the jurassic 60fps standard, with now even the most barebones office monitors coming at 75hz of standard refresh rate. And 2D games should support higher refresh rates whenever possible. The benefits are too huge, and arguably even above the benefits of increases in resolution.

    • @CobraCode
      @CobraCode  2 місяці тому

      That's why I didn't say the benefits are non-existent, but they are negligible to a REGULAR consumer.
      Yes for hardcore gamers and high fps fetishists (such as myself) there is a difference, but from a business perspective these are gonna be a very small percentage of your audience and supporting more than 60 FPS for a 2D Game isn't gonna skyrocket your sales.
      It's a 'nice to have' but shouldn't have too much weight on your engine choice.
      And as you've seen we can easily get into 300FPS + territory with Unreal as well.
      You should still cap the framerate by default and only give the option to unlock it in the menu.

    • @gorofujita5767
      @gorofujita5767 2 місяці тому +1

      @@CobraCode Well, this is subjective and YMMV, but in regards to high refresh rates and "hardcore gamers" and "high fps fetishists", even my mom much prefers the smoothness of the 144hz monitor she's now using, even though she cannot quite articulate it properly ("I don't know, it just feels much better on the eyes"), and in this sense, this is a feature which most people will notice and prefer. Tech illiterate people may also not know the differences between 1080p and 4K, but they'll largely prefer the second (if scaling is properly set up).
      I think refresh rates higher than 60hz being un-needed or superfluous for the so called "normal usage" (web browsing, office work, casual gaming) is a meme that would be better off left in the dustbin of computing history

  • @Zahardnik3
    @Zahardnik3 2 місяці тому +4

    Yes, but getting it to an Android platform is very difficult. If you made a how to for that, I would switch to Unreal right now.

    • @CobraCode
      @CobraCode  2 місяці тому +1

      Do you mean the build process?
      I personally don't have too much of an interest in making mobile games, but if many of my viewers care it's something I'll have to look into.
      When it comes to performance I believe any modern phone is more powerful than the nintendo switch and games like ender lilies actually run on the Switch at around 60 FPS, so that shouldn't be too much of an issue.
      The oculus quest is basically an android phone and Unreal Engine is perfectly suited for it.
      Some examples are: Robo Recall, RE 4 Oculus Edition and even some of the official Oculus Showcases are made in UE

    • @silverhunter4787
      @silverhunter4787 2 місяці тому +1

      I think he means that the APK size ends up being very large when using Unreal. I'm interested in Mobile game Dev and this would be the sole reason for not choosing unreal, in every other regard I would prefer unreal.

    • @Zahardnik3
      @Zahardnik3 2 місяці тому

      Yes, that's what I meant @hunter4787 . And the whole process of getting it packed up and published on the Playstore. I was able to do this with Godot without a problem.

    • @CobraCode
      @CobraCode  2 місяці тому +2

      ​@@silverhunter4787
      AFAIK the default build size is about 300MB for a desktop game and it might vary slightly depending on what else they need to package in with the android SDK.
      I've seen games that pushed it down to around 90MB by removing unused plugins, etc.
      This is something I still need to look further into and will cover it once I've reached a conclusion.

    • @CobraCode
      @CobraCode  2 місяці тому

      ​@@OverbiteGames
      Thanks for the info!
      I haven't really looked into the switch in detail yet.

  • @denholmpearson4346
    @denholmpearson4346 2 місяці тому

    unity sucks

  • @JohnRiversOfficial
    @JohnRiversOfficial 2 місяці тому

    lmao i get 999 fps on unity

    • @CobraCode
      @CobraCode  2 місяці тому +1

      Have fun finding a screen that can display 999 FPS.
      Having more than 60 FPS for a 2D game doesn't make much sense.
      I'll take a better license, not being stabbed in the back, a proper visual scripting solution and fast iteration over needlessly high fps.

    • @ToadLine
      @ToadLine 2 місяці тому

      agreed. Can't ever trust Unity again imo@@CobraCode

  • @JohnRiversOfficial
    @JohnRiversOfficial 2 місяці тому

    maybe upgrade your hardware and you will be less easily amused.