Announcement

Collapse
No announcement yet.

Is using "Event Tick" bad practice?

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

    Is using "Event Tick" bad practice?

    I noticed I can not ask 10 or more questions by Event Tick that I need to know every delta second of game play. If i do, the FPS will slowly drop until it reaches 0 during game play. (even while standing in place)
    What should I be using then if I should not be using the Event Tick?
    I am only updating on Health, Stamina, Weapons ability, and 8 more roughly to gauge similar info.
    Not sure what screen shots anyone might like to see, it would be broken down in images to see my nodes for Player Event Tick.
    If I haven't provided enough info, just ask, i will show, or explain.
    Thanks to anyone out there.

    #2
    Use onTick only for information that is really needed on a per tick bases. Mostly physics calculation will require this.
    If you want to keep track of a health value for example, only update the display when the health value changes. There is no need to constantly monitor the value on tick.
    This is indeed bad practice.

    Comment


      #3
      Can you clarify what you mean. The update does only run when there is a need for it, but say If i put when the player loses all health to run an action on begin play, it wont function as begin play runs once at the start.

      Comment


        #4
        For example here is my death tick.
        Attached Files

        Comment


          #5
          For smooth movement Tick is essential. For other operations like screen info updates you could just try a Timer (Set Timer By Event + Create Event). Try out an interval of 0.5 secs to start, and then lower it if you need more updates, and increase it if you don't. But usually you wouldn't expect this to cause FPS loss even on Tick, maybe something else is happening as well.

          Comment


            #6
            Originally posted by ClavosTech View Post
            For smooth movement Tick is essential. For other operations like screen info updates you could just try a Timer (Set Timer By Event + Create Event). Try out an interval of 0.5 secs to start, and then lower it if you need more updates, and increase it if you don't. But usually you wouldn't expect this to cause FPS loss even on Tick, maybe something else is happening as well.
            I did run through since i roughly just started this project and found that when I unplugged my sequence for Event Tick, all runs fine.

            I am making a fan version of Zelda. So I need to have things like Sword updates, Bow updates, Sprinting, and few more.

            For the img above, I am not using the hearts health on the HUD, but a sectioned bar that can be upgraded 2 times.
            Last edited by NuHabit; 02-17-2020, 08:48 PM.

            Comment


              #7
              My Health Bar Upgrade Tick
              Attached Files

              Comment


                #8
                Can you clarify what you mean. The update does only run when there is a need for it, but say If i put when the player loses all health to run an action on begin play, it wont function as begin play runs once at the start.
                I dont understand your question in regards to the begin play event.
                What I mean is, asuming you have a health variable in your player character, do the following:
                - Establish a reference to the widget in the player character
                - Add a function "Modify health" to the player that modifies the value and changes the widget info
                That should be it. No need for tick or timers.

                pps: If you really dont get it, I could make a little demo video
                Last edited by KVogler; 02-17-2020, 08:59 PM.

                Comment


                  #9
                  Originally posted by KVogler View Post
                  I dont understand your question in regards to the begin play event.
                  What I mean is, asuming you have a health variable in your player character, do the following:
                  - Establish a reference to the widget in the player character
                  - Add a function "Modify health" to the player that modifies the value and changes the widget info
                  That should be it. No need for tick or timers.
                  So You are saying as long as I set it in a Function, it wont run like it is simply put on Event Tick in whole?

                  Comment


                    #10
                    So You are saying as long as I set it in a Function, it wont run like it is simply put on Event Tick in whole?
                    From what I saw in yoyr screen shot you seem to recreate the widget allover every time. there is no need for that.
                    Its very easy to set up an example and show you in a little video to make things clearer.
                    But that wont happen until tomorrow, since in my timezone, its getting reeeaallyy late by now

                    I also covered this in a tutorial series (which remained incomplete for reasons), but it also covers some other stuff.
                    There you can see where I use "normal" function calls for updates, but also do use tick on the sprinting (stamina depletion) but still just call a function on the widget update
                    I just cant remebre in which part of the series I covered that.

                    https://www.youtube.com/watch?v=sQEl...t49gGr&index=1
                    Last edited by KVogler; 02-17-2020, 09:08 PM.

                    Comment


                      #11
                      Originally posted by NuHabit View Post
                      My Health Bar Upgrade Tick
                      Actually I feel a bit dumb as I saw the issue almost immediately after uploading the image. I was creating a widget every tick when setting the health bar upgrades. setting a do once stopped the FPS drop.

                      Comment


                        #12
                        Actually I feel a bit dumb as I saw the issue almost immediately after uploading the image. I was creating a widget every tick when setting the health bar upgrades. setting a do once stopped the FPS drop.
                        Just wait until tomorrow when I'll show you an even yet more elegant way

                        ps: I think is is epsisode 2 or 3 in my series where i set this up
                        Last edited by KVogler; 02-17-2020, 09:25 PM.

                        Comment


                          #13
                          Originally posted by KVogler View Post
                          Just wait until tomorrow when I'll show you an even yet more elegant way

                          ps: I think is is epsisode 2 or 3 in my series where i set this up
                          I will check the videos out and see if it can help. Thanks

                          Comment

                          Working...
                          X