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)

Abierto
#136 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
12
Forks
12
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Check the SaveGame method in the console arcs DLL to see the partial fix. Look for where global flags are set in game scripts and compare with other arcs' code to see if they already save flags on set or on returning to the main menu. Implement a debounced save to disk to avoid excessive writes, testing with flag changes during gameplay.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp
Área
game-dev
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.