Announcement

Collapse
No announcement yet.

Speed issue

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

    Speed issue

    Hi guys sorry that my title is so vague i could not think of anything better .. Ok so my current issue is quite frustrating ..My game relies on the player to have good timing .As they find there way through obstacles at ever increasing speeds .However when i lay out the obstacles in PIE and play the game in view port it plays at 120 fps . But packaged game plays at a slower fps and hence the timing is all messed up . To get the same result in packaged game i can up the speed but then the game is impossible in PIE hope this makes sense

    #2
    It's strange that your FPS should be slower in packaged game than in PIE I would of course have expected the opposite.
    Do you close down the editor when you run the packaged? As it would drain resources to run both at the same time.

    Two things,

    In your Project Settings -> General Settings there's a smooth and Fixed frame rate setting. I never used this though so you'd have to read up about it.
    Not sure in what cases it's actually reccomended to use that? Be careful.

    If none of this makes sense maybe its time for you to start profiling. FPS is not the way to figure out how well your game runs because of various reasons.
    This is a big area which is difficult to give a clean answer to as it is different for each game project.
    Start by reading up on the 'stat' commands, the GPU profiler and how to do a cpu thread profile dump in your packaged game.
    The first thing you want to figure out is if your game is GPU or CPU bound. So start learning how to figure that out using 'stat unit'.
    Last edited by Fredrum; 10-31-2017, 01:37 PM.

    Comment


      #3
      I was told to disable smooth fps . And no i do not disable my editor when playing packaged game as i assumed my pc was good enough to run both easily maybe im wrong i will try thank you

      Comment


        #4
        In the meantime i have noticed that if i run with the bp open it runs a lot closer to that of the packaged project so i can use that as a fps limiter for now.

        Comment


          #5
          This is the infinite runner game? Are you accounting for Delta seconds?
          You could also use the BP Console command (t.maxfps 60) to lock FPS.

          Comment


            #6
            To me it looks like your Editor is capped at 120 FPS and your Standalone game at 60 FPS in addition to using speed without mitigating them with World Delta Seconds.

            If you're using the tick event to move things around (or to do anything based on time really) you'll have to setup it correctly.

            If you want something to move at a speed of X you'll have to base your calculation off of 1 second. That means all float values you use in your tick events will be your speed / second.

            Getting back to our example, you'll move your actor by 100 (speed float) * World Delta Time (you can get it or simply drag the green wire out of your tick event). This will give you the proper speed / second for your actor regardless of your framerate.

            Trying to be more clear here: tick event triggers once every frame, if your game is laggy, your FPS slow down and less frames happen in between seconds. If you move something every frame and you don't have the same number of frames every second, your something will be slower / faster depending on the amount of frames / second (obviously). To account for that, we multiply our speed by World Delta Time which corresponds to the amount of time elapsed since previous tick event.

            This always gives you an average speed / second when doing things on Tick.
            [Released] Multiplayer Combat Editor
            A-RPG Sacred Swords
            Auto-Chess Live Development
            Youtube Tutorials

            Comment

            Working...
            X