07th-mod / 07th-mod/higurashi-assembly
Globals Flags only save on graceful program shutdown and not when saving normally - (need to check if this has already been fixed on other arcs)
- Linguagem predominante
- C#
- Estrelas
- 12
- Forks
- 12
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
A user on Steam Deck (native) was reporting that their choice option (set by flag "GChoiceMode"), was not obeyed while they were playing the game.
It turned out that every time they exited the game, they either shut down the steam deck, or used steam to exit the game, which force closes the game.
On the console arcs DLL, the game does not save globals, even when you save the game. It only saves on exit. So their globals were never saved, unless they used the in-game menus to exit the game gracefully.
I added a partial fix for this issue by also saving the global flags at the end of public void SaveGame(int slotnum), which is called on quick or normal save. Would be good to also add saving when you return to the main menu.
It may be a good idea to also save whenever a global flag is set in the game script, as usually it's really important those flags are remembered, and that may be the cause of some of the random flag related bugs we see (like completion status not being remembered).
Just need to make sure we don't excessively write to disk (e.g when a flag is written, add a debounce time of 1 second before actually saving to disk, plus a timer to prevent repeated writing more than once every 10 seconds?). If a good debounce method is used, I guess don't need all the extra save methods.
----
I need to check if this was already fixed on the other arcs, as the console arcs code is way behind the other chapters.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Verifique o método SaveGame na DLL dos arcos do console para ver a correção parcial. Procure onde as flags globais são definidas nos scripts do jogo e compare com o código de outros arcos para ver se eles já salvam as flags ao defini-las ou ao retornar ao menu principal. Implemente uma gravação com debounce no disco para evitar gravações excessivas, testando com alterações de flags durante a jogatina.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- csharp
- Domínio
- game-dev
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100