Bug 175122

Summary: please provide save game option
Product: [Applications] kbreakout Reporter: Ritesh Raj Sarraf <kde-bugs>
Component: generalAssignee: Fela Winkelmolen <fela.kde>
Status: RESOLVED FIXED    
Severity: wishlist CC: kde-games-bugs-null, lange-123
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Adds a "save game when closing kbreakout" option
update - the first patch missed one variable to store

Description Ritesh Raj Sarraf 2008-11-14 13:28:57 UTC
Version:           1.0.0 (using 4.1.3 (KDE 4.1.3), Debian packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.26-custom

Please provide a Game Save option like ksokoban.
KBreakout is an awesome game and would be much more awesome if I can save and resume the levels.
Comment 1 Fela Winkelmolen 2008-11-15 17:44:33 UTC
No sorry, that wouldn't do for this kind of game. KSokoban is a puzzle game, it's main goal is to solve puzzles, in KBreakout the goal is to get as much points as possible starting with a certain number of lives and from the first level. Having the ability to save in KBreakout would be a bit like having the ability to save in Tetris.
Comment 2 Albert Astals Cid 2008-11-15 17:54:10 UTC
I have to disagree, what if i've been playing for two hours, have highest score up to date but have to leave? A save option to continue later is what i want in tha very moment
Comment 3 Fela Winkelmolen 2008-11-15 18:31:41 UTC
Ok, one option I didn't think of is to be able to reload a saved game only once. Or another way to think of it is to pause the game and resume on next restart. Else it becomes too easy to cheat. I suppose it would be still easy to work around the restriction, but well... it's free software after all one can do with it what one likes.
Comment 4 Ritesh Raj Sarraf 2008-11-15 19:39:39 UTC
Come on. You're restricting on how the user should play.

The focus should be more on the game play and the game experience.

If I have to cheat the game, I'd not play it often. And starting something from the very beginning, after I've spent 2 hrs, is just going to bore me and keep away from playing it again.

And thanks for the game. I think I have played the Windows/Web version of it and really like it in KDE.
Comment 5 Fela Winkelmolen 2009-08-15 17:16:19 UTC
*** Bug 203951 has been marked as a duplicate of this bug. ***
Comment 6 Julian Helfferich 2009-11-26 14:53:07 UTC
Created attachment 38607 [details]
Adds a "save game when closing kbreakout" option

In short:

The values "level", "lives" and "score" is stored in three new values in "settings.h" every time a level is completed. When KBreakout is closed the user is asked if he wants to save the game. If the game is saved, KBreakout starts with the level, that was active, when KBreakout was closed. The score and number of lives are set to value, when this level was started.

The GeneralSettings have the option to "Save automatically", "Ask" or "Close without saving" as RadioButtons. The answer is stored in "dontAskSaveOnClose" (wich is used by the "dont show this message again"-checkbox) and in "Settings:saveOnClose" (to keep the ConfigDialog consistent with choices made when the "dontAskAgain"-checkbox was activated). These two are synchronized, in loadSettings() (activated, when the "settingsChanged" signal is emitted) and when the questionDialog is closed (and the dontAskAgain checkBox has been activated).
Comment 7 Julian Helfferich 2009-12-04 00:30:46 UTC
Created attachment 38818 [details]
update - the first patch missed one variable to store

In the first patch, i missed one variable, that has to be stored: m_elapsedTime, which counts the seconds since the game was started. This value is shown in the higscores.