View previous topic :: View next topic |
Author |
Message |
. . , Master Cheater
Reputation: 3
Joined: 05 Nov 2009 Posts: 337
|
Posted: Tue Apr 27, 2010 1:03 pm Post subject: HOW DO I SAVE THE .EXE AS IT IS????? |
|
|
I'm making a project for my ICT work at school. It's a maze game, but I don't know how you save it. Say if you complete a level and you go onto the next you want to save your work. Any help please?
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 27, 2010 1:08 pm Post subject: |
|
|
what is your maze game coded in ? show some code please or describe the concepts behind your game
usually saves are done by finding what 'context' the game is in, what 'state' it is in. enumerating all of these, encoding it somehow and saving that to a file. next time the game loads, it opens that file, decodes it and restores this 'state'
|
|
Back to top |
|
 |
. . , Master Cheater
Reputation: 3
Joined: 05 Nov 2009 Posts: 337
|
Posted: Tue Apr 27, 2010 1:13 pm Post subject: |
|
|
Slugsnack wrote: | what is your maze game coded in ? show some code please |
http://plunder.com/580696c73e
If you see what I'm trying to do, you have radiobuttons under a label called level, 2,3,4,5 is "Enabled = False", after you complete level 1 RadioButton 2 will be "Enabled = True". I know how to do that but I meen save the radio buttons.
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 27, 2010 1:18 pm Post subject: |
|
|
i'm gonna assume your levels are static and not generated on the run. in which case all you have to do is save the level number. so you can do that however you like. you could even create a file that stores a single number and read out of that when your game is first launched
|
|
Back to top |
|
 |
. . , Master Cheater
Reputation: 3
Joined: 05 Nov 2009 Posts: 337
|
Posted: Tue Apr 27, 2010 1:20 pm Post subject: |
|
|
Slugsnack wrote: | i'm gonna assume your levels are static and not generated on the run. in which case all you have to do is save the level number. so you can do that however you like. you could even create a file that stores a single number and read out of that when your game is first launched |
Yea but I don't know what the code is. Youtube is just showing how to save textbox.text as a notepad file.
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Apr 27, 2010 1:23 pm Post subject: |
|
|
i don't code .net but what you want is probably :
http://msdn.microsoft.com/en-us/library/system.io.file.create.aspx
as for creating a text file, the only difference between a text file and any other is that it ends in .txt. you can create a file with any extension. it does not matter even if you were to create a .txt file
|
|
Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Tue Apr 27, 2010 1:55 pm Post subject: |
|
|
If you wanted to, you could also save this information in the assembly's (not machine instructions, the module itself) settings area.
|
|
Back to top |
|
 |
|