About 'Polishing the GUI'!

In this video (objectives)…

1 Giving the player feedback when coins and lives values change 2 Allowing Bunny to gain extra lives

After watching (learning outcomes)…

Control multiple animations in a single function by calling arguments

(Unique Video Reference: 18_HD_GDT)

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!

Quite chuffed that I got pretty much the same answer as Yann on the challenge for this, apart from the ‘onready var’ thing, which was new material anyway. Obviously the Gamedev.tv subliminal messaging regarding code structuring is having an effect. :robot: :grinning:

2 Likes

To be honest, I think that putting on a challenge, and then presenting a completly new topic as a solution is not the best way there is (i mean the onready var solution). Right now i am forced to look up to the idea of using the onready var myself, and althought it is not a problem I would rather be taught (as a “good programming” habit) of the best solutions / mostly used patterns in GDScript before I’m up for the challenge.

I like the course, thank you.

The idea of giving assignments during a lesson is good, it forces you to think. Usually my and Yann’s solution are the same, sometimes Yann’s is better. Here I am not sure. Earlier, I liked the solution to put all player animations in one place in PlayerAnimation.gd and inferring what to do depending on the motion. Here, this is also possible, you can put all banner related animations in one place, in GUI.gd, and infer what to animate depending on value changes. Unfortunately, this does require giving the banner an initial state (or a state).

Can you explain your reason(s) for choosing your solution, which basically treats the banner animations the same as you do the sound effects later on?

Privacy & Terms