Announcement

Collapse
No announcement yet.

Game Timer

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

    Game Timer

    Re-Spawn has a game timer that is set for each map rotation. This allows players to connect to a running game at any point and also imposes a time limit on map rotations.

    What is the best way to implement the game timer?

    Is it just a onTick event by the server that sends an update to all clients every second or is this some smart HUD element somewhere that I missed.
    Quinton Delpeche
    Founder - Gobbo Games | Designer - The Colony 2174 (Board Game) | Developer - Riders of Asgard

    #2
    UE4 has timers built in. I'd take a look at the "set timer" node. You might want to make a timer in your level blueprint and set it to be replicated, then in your HUD display the timer somewhere. That might get you started but I haven't played with these a lot myself yet.

    Comment


      #3
      I haven't really messed with this sort of thing before, But onTick should be avoided at any time possible since it uses so many processes. Maybe try using a deltaTime on the server and casting to all clients.

      Comment


        #4
        I think I may have found a solution ... need to go through it but it seems like it will do the trick.

        UE4 Game Timer | Video Tutorial by Devin Sherry

        In his tutorial he can stop the timer but I won't be needing that. 8-}


        EDIT: Got it working and instead of counting up it counts down from the set round time.

        Click image for larger version

Name:	UE4_MainHUD_002.png
Views:	1
Size:	707.5 KB
ID:	1066839
        Last edited by qdelpeche; 02-21-2015, 06:37 AM.
        Quinton Delpeche
        Founder - Gobbo Games | Designer - The Colony 2174 (Board Game) | Developer - Riders of Asgard

        Comment

        Working...
        X