brave-frontier-godot icon indicating copy to clipboard operation
brave-frontier-godot copied to clipboard

Add WIN and LOOSE view

Open Iruuka opened this issue 1 year ago • 5 comments

While playing the first stage (basics_of_battle), if you win or loose at any time of the fight, the user will be transported back to the home menu. It might be a bit abrupt for the user, because it doesn't know if it's a win or a loose (by the way, the same problem as Issue https://github.com/aMytho/brave-frontier-godot/issues/24 is present for the last units. They don't fade away after dying)

To let the user take pleasure with the winning moment (or crying in the loosing moment), we should add 2 new view and maybe an animation, like the original game :

  • A transparent view when the user has lost the fight. It will only show, for now, a button to go back to the home menu and a sad title "Defeat" (we should get it in the resource zip)
  • An animation and a "wait on user click" when the last monster is dead (when the boss of a zone is dead). We should have the animation of victory and wait until the user click on the scene. When clicked on the scene, we would transport the user to the recap view (which would be a bit blank until we add some feature)
  • The "recap view" as stated earlier

Iruuka avatar May 18 '23 17:05 Iruuka

We can definitely add the "Mission Complete" or failed animations in. For now, moving to the main scene is probably fine.

I started working on the dialogue/zone system a few months ago. However, a godot bug is preventing me from completing it. When that is fixed, that system will be linked to the battle system. It provides a staring cutscene, loads the battle, and plays an ending cutscene. Currently, our level selector just loads the battle scene. This is fine for now, but I'll have to link it to the dialogue/zone scene instead.

We can probably add the recap scene independently of the dialogue/zone scene though. We will have to keep track of what happens during the battle. For the simple stats (karma/mora/zel), we can pull it directly from the zone itself. It has entries for those. For more complex ones that have a random chance (number of units acquired), we have to keep track during the fight.

aMytho avatar May 18 '23 19:05 aMytho

I think I can start this now. I probably can't do anything with the dialogue portion (godot 4.1 dev 3 released, so we should be able to move to it soon to fix the issue), but I should be able to add code for detecting when a battle ends.

Instead of loading battle.gd in the level selector, we will load zone.gd which checks for dialogue, plays the battle, checks for end dialogue, and then adds a recap view. I think battle.gd can emit when the battle ends, as well as emit various stats (units acquired, zel/karma/etc). I'd prefer for battle.gd to not have to do more than emit the events, since it is already pretty complex.

aMytho avatar May 26 '23 18:05 aMytho

I merged the recap view PR #37

I still need to add the mission completed/failed screen. I'll do that soon. (Another project is taking up a lot of my time, but I'm almost finished)

aMytho avatar Jun 06 '23 18:06 aMytho

Started the win/loss animations in #46

aMytho avatar Jun 11 '23 19:06 aMytho

Finished win/loss animations in #46 It still needs sound effects and a fade effect, but the main content is completed.

aMytho avatar Jul 03 '23 19:07 aMytho