[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Novelty forum • View topic - Permanent storage demo

Permanent storage demo

Come down to the basement if you have questions about scripting or would like to talk about coding in general.

Permanent storage demo

Postby Krzysiek » Sun Dec 18, 2011 2:57 am

Here is a demo project showing how to store permanent configuration using save slots and checking their existence.
This solution may be HDD intensive due to the fact there's no possibility to delete save slots (each new configuration is stored as new slots in other place).
This solution may be prone to Saving/Loading because of global variables' loading but this may be fixed after some tweaks (just store them as internal values of not persistent object (?) or not "$"-s).
TBH I'm more enthusiastic about making some external launcher that'll take care of save slot mess on each game start, but this example seems fine to some extent and is written pretty easily to understand (be sure to read script files).
Attachments
Permanent Configuration.zip
(22.8 KiB) Downloaded 509 times
Krzysiek
 
Posts: 4
Joined: Thu Jun 30, 2011 4:16 pm

Re: Permanent storage demo

Postby Avaible » Sun Dec 18, 2011 12:45 pm

Something ?
Though I limited myself to 50slots for a reason you already stated.

Thanks for sharing this :)
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Permanent storage demo

Postby Krzysiek » Sun Dec 18, 2011 1:20 pm

Your example works fine with achievements, but my approach deals with configuration. The difference between them is that achievements can be only unlocked - they can't be locked again. Configuration on the other hand changes throughout the game from one state to another.

My example focuses entirely on the configuration problem because I was already aware achievement system has been already dealt by you.
Krzysiek
 
Posts: 4
Joined: Thu Jun 30, 2011 4:16 pm

Re: Permanent storage demo

Postby Avaible » Sun Dec 18, 2011 1:56 pm

I see, then a question: When changing the GUI to blue, red or green, the save/load/log/close buttons do not work properly anymore, with their, in lack of a better term, hotspot being moved downwards to the right. Does this happen to you too? The problem does not occur with the grey-colour.
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany

Re: Permanent storage demo

Postby Krzysiek » Sun Dec 18, 2011 2:09 pm

This doesn't occur to me. Dealing with objects thru Layer's GetRootObject() never made me any problems. Can't explain these errors :-(.
Krzysiek
 
Posts: 4
Joined: Thu Jun 30, 2011 4:16 pm

Re: Permanent storage demo

Postby Avaible » Sun Dec 18, 2011 2:25 pm

Kay, thanks. At least I know that the problem lies with me somewhere.
User avatar
Avaible
 
Posts: 1201
Joined: Mon Nov 29, 2010 5:12 pm
Location: Germany


Return to The Basement

Who is online

Users browsing this forum: No registered users and 1 guest

cron