Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo from Savegames feature #392

Open
hajo4 opened this issue Oct 6, 2024 · 5 comments
Open

Demo from Savegames feature #392

hajo4 opened this issue Oct 6, 2024 · 5 comments

Comments

@hajo4
Copy link

hajo4 commented Oct 6, 2024

Add a feature 'Demo-from-savegames'

This would load files like *-ok.pso from a folder of savegames,
rewind and play them in demo-mode.

@joeraz joeraz changed the title Add a 'Deal Card'-button to the toolbar Demo from Savegames feature Oct 6, 2024
@joeraz
Copy link
Collaborator

joeraz commented Oct 6, 2024

Please be more careful with the issue names - having the duplicate issue names is confusing for me.

Before doing something like this, I think a feature would be needed to have the demo "Replay" the current game.

@hajo4
Copy link
Author

hajo4 commented Oct 6, 2024

feature .. to .. "Replay" the current game

Could be done as follows:

  • To prepare the savegame
    ** set a bookmark before doing the first move
    ** play the game until you win
    ** set another bookmark at the end
    ** save the game

  • To replay
    ** load the game
    ** goto first bookmark
    ** repeat 'redo-last-move' until end of game

It looks like restart-current-game forgets the history needed to go forward again.
Going back with undo is a bit cumbersome - maybe automatically set a bookmark#0 at the begin ?

@hajo4
Copy link
Author

hajo4 commented Oct 6, 2024

Here a small demo of such a bookmarked savegame:
Hanoi Puzzle 5-85644395461021679616_ok-demo.zip

@joeraz
Copy link
Collaborator

joeraz commented Oct 6, 2024

I'm more thinking about a single "Replay" button that runs the demo with the exact moves you've played to that point. And using bookmarks might not work well if bookmarks are already being used. More likely the game itself with its move history has to be passed in the demo method itself, and logic needs to be written for that.

Yes, restart current game starts a new game of the same deal, so the move history is lost. I considered adding an Undo All option, but decided against it when I realized doing so would make it very easy for a player to cheat their statistics.

@hajo4
Copy link
Author

hajo4 commented Oct 7, 2024

Another savegame ready for playback:
Pegged Cross 1-93457135428827561984_ok-demo.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants