Announcement

Collapse
No announcement yet.

Will blueprints be enough for 3D sidescroller game ? Performance wise

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Will blueprints be enough for 3D sidescroller game ? Performance wise

    blueprints are much slower than c++ , i am just so confused if i should go ahead creating my 3D sidescroller game with just blueprints .
    im just afraid performance issues might make my game unplayable , as a person who has experienced bad gameplay because of hardware issues i am even more scared.

    so this is what im planning to make

    3D sidescroller game entirely in blue prints
    possible export to consoles in future
    not high graphics , medium to low stylized graphics

    can anyone please tell me if unreal engine and blueprints can get the job done without ruining player experience ?


    thanks in advance for taking time to read and reply

    #2
    Blueprints shouldn't be an issue for that at all. They've made them faster than they were before and you really have to be doing an absolute ton of stuff at once to really notice the difference. If it gets bad you can always use the new feature to nativize your blueprints to C++ without actually having to write the C++.
    Gooner44
    Cribbage Sample Project on MP

    Comment


      #3
      You should be just fine with blueprints. Like Gooner44 pointed out, Unreal implemented the feature to nativize the blueprint. Just a thing I wanted to point out. Even without nativizing the blueprint system performs very well. It may be slower than the C++ counterpart, but don't assume it is in the realm of java code or anything worse than C#. I always say that it comes down to programming/scripting practice. If you write redudant and messy code, your game will run like ****, even if you use C++ as a faster language. So learn better programming/scripting practice and you should just be fine. Learn a little bit about optimizations. Will also help tremendously .
      Main channel:
      https://www.youtube.com/channel/UCGC...o9s3YcA/videos

      Comment


        #4
        Like the others have said, Blueprint will be good enough for 90% (or more) of the cases. The only exception are math-heavy calculations happening VERY frequently. For these cases, use the Blueprint nativization feature to covert it to C++.

        BPs are about 10x slower than C++, but this seldom matters for us humans, as we are not able to distinguish an operation that took 5 MS vs 10 MS
        [WIP] Procedural City Generator | RPG AI
        [MARKETPLACE] Animal Behavior Kit | Space Shooter Template | Procedural Foliage Tool | Procedural Park
        [FREE] Modular Road Tool | Action Platformer Template | Radar BP | Free Birds
        Join our Discord

        Comment


          #5
          Does anyone knows good resources for such optimization topics? Probably particularly for unreal4?
          I never had a coding education and now started learning-by-doing. Most of the time Iam simply happy if things work like I want them to and I don't really know how to optimize.
          I guess it would be already really helpful to know what operations have highest impacts. For instance, what can be considered a "math-heavy operation"? Exponantials and logarithms? Wave functions?
          Should I be careful using line traces, overlap checks, collision checks, adding forces, .... ?

          Iam sure that it is not possible to force all the complex knowledge into "simple guidelines" but if there are any rough thumb-rules I would be extremely happy about that.
          Check out my GTA2 remake in UE4

          Comment


            #6
            I cant think of a good resource for this right now, but you can look at the Epic's Youtube channel for videos like "Rendering Best Practices" and the like. Tbh, this is a skill you learn overtime as you get more experience coding.

            The basic idea is to reduce redundancy in the code or code that runs frequently that doesn't need to run. Think of all the code you plug to OnTick (runs every frame, so about 120 times per second!). Or any code that is attached to a timer that loops.

            Look at variables that are set constantly that don't need to be.

            One example: You have an actor that will execute an action when the player is nearby (say a door opens automatically)

            1 solution: You could run a custom event that runs on tick that checks the distance between the actor and the Player to determine the distance. If distance is less than X, open the door
            A better solution: Use a box collision trigger and set it to overlap the player. If the Player overlaps, open the door.

            Notice how in the second solution you aren't running constant code.


            A "heavy" calculation, for example, would be getting the location of all actors of class X in your level and then doing some calculations for each vector, on tick!

            Example of the above:

            I have a procedural asteroid filed using Instanced static meshes. I have thousands of meshes as part of the same actor. I run an event on tick that goes through all instances and rotates the mesh to simulate rotation of each asteroid individually. This means that every frame I will go thru thousands of meshes and applying a rotation. If you have too many meshes you will see an impact on your game.

            When you are running your game, type '~' for the console and type 'stat unit' to view how long it takes UE4 to draw a frame in milliseconds. The lower the number, the better

            Hope this helps!
            [WIP] Procedural City Generator | RPG AI
            [MARKETPLACE] Animal Behavior Kit | Space Shooter Template | Procedural Foliage Tool | Procedural Park
            [FREE] Modular Road Tool | Action Platformer Template | Radar BP | Free Birds
            Join our Discord

            Comment


              #7
              Thanks for the examples!
              I will try being more conscious while writing my code ;-)

              But a short question regarding the "Trigger overlap for opening door"-approach. Iam not sure how exactly these overlap checks work but don't they essentially have to run the same code? I.e. to check the distance of all actors to themselves for knowing if someone is overlapping?
              Check out my GTA2 remake in UE4

              Comment


                #8
                Yes blueprints are fast and nice. So no performance problems at all.
                But they have other aspect that limits scope of projects created in them.
                You see as graphical programming script, any code done in blueprints takes up several screens, sometimes i feel that my whole code done in blueprints that takes 10 or more screens would fit in 100 or so lines of C++ * that is around single screen).
                So when your project grows you are losing track of code much faster than with projects done in C++. At some point you want to change something in old code, it is much faster to find it in C++ than find which blueprint it was in.

                Comment

                Working...
                X