About 'Returning Game Time in Seconds'!

ubp_s01_returning_game_time_in_seconds

#1

In this video (objectives)…

  1. Return Game Time in Seconds
  2. Combine two strings together by appending
  3. Restart level

After watching (learning outcomes)…

Return how long it takes to escape the maze

(Unique Video Reference: 12_MR_UBP)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!


#2

This might be a good place to introduce the idea that developers shouldn’t have to play the game to test it. The video fast forwards through playing the game to get the ball to drop through the hole to test the end of game logic, because playing the game is slow. An alternative strategy is to move the ball above the hole, such that when the game starts the ball drops through the hole. Varying the starting height of the ball tests printing the game duration, and the end-of-game condition happens automatically every time you run the game, which allows you to tune the end-of-game sequence faster. Thinking about how to short-circuit the game logic to get to a particular condition only saves a few seconds of fiddling with this game, but it can save you weeks of agony when you can test the conclusion of your incredibly challenging boss fight without actually having to fight the boss :slight_smile:


#3

Lol good point. I made a more complex maze while waiting for more lectures and did the same thing. Easier to move the ball than taking awhile to navigate the maze to find out I didn’t do something stupid, like child the end trigger to the mesh and having to run the maze again.


#4

Great point! Thanks for the heads up! I’ll take a look at updating the lesson with this information.