aMytho / brave-frontier-godot

A simple implementation of Brave Frontier in the Godot Engine
17 stars 8 forks source link

Add WIN and LOOSE view #25

Open Iruuka opened 1 year ago

Iruuka commented 1 year ago

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 :

aMytho commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Started the win/loss animations in #46

aMytho commented 1 year ago

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