Re: problem with saving my game
you could implement an interface or a base class which holds functions to save and load, in which you would define how the structure is defined. This would require to manually define each structure in the BinaryStream, but if performance is what you're after
Re: problem with saving my game
I never used BGT. B. I am writing an RPG game, so I need to write NPC states and such, unless I manually code for example AfterQuest1, AfterQuest2 ETC.
URL: https://forum.audiogames.net/post/490902/#p490902
--
Audiogames-reflector mailing list
Re: problem with saving my game
@10: No, that's the problem, you can't, as far as I know, do it that way.If you want to save a whole class, though not the fastest solution, the serializer is a safe bet.Plus, the binary approach is, though significantly faster, verry low level. Imagine you
Re: problem with saving my game
@10: No, that's the problem, you can't, as far as I know, do it that way. If you want to save a whole class, though not the fastest solution, the serializer is a safe bet.Plus, the binary approach is, though significantly faster, verry low level. Imagine you
Re: problem with saving my game
Can I binarily save the whole class?
URL: https://forum.audiogames.net/post/490796/#p490796
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames
Re: problem with saving my game
If you want to go for speed and size the best (yet most low-level) way to do this is to use a binary stream:BinaryWriter s = new BinaryWriter(new FileStream("path", FileMode.Create));
s.Write(variable ToWriteOut);
.
Re: problem with saving my game
Yeah, zip should not, in my opinion, be used when speed is critical. A good place to enter a save is when inbetween levels area, something like the gate. Anyway, the thing is to say when save is in progress and when it ended, so that the user not think
Re: problem with saving my game
Maybe. I dont know, but for me the speed was a factor andI dont know if ZIP is fast enough.
URL: https://forum.audiogames.net/post/490070/#p490070
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin
Re: problem with saving my game
I never used binary streams before, only xml ones, so that, in case anything unexpected happens, I can at least figure out what happens to my data with xml.As to why zip files, the size of the data packaged this way tends to diminish considerably, so if you
Re: problem with saving my game
Why to use ZIP archives? I can set up a binary serializer which will contain two or tree or X file streams which then can be serialized to one file!
URL: https://forum.audiogames.net/post/489950/#p489950
--
Audiogames-reflector mailing list
Audiogames
Re: problem with saving my game
Or you could save each class in a sepparate file for the sake of a simpler retrieval, but still present to the user a single file that is, further more, in a not so accessible location as well as harder to cheat.The first step is to serialize the classes
Re: problem with saving my game
I can always make separate files, and make a class which will be container for these files.
URL: https://forum.audiogames.net/post/489526/#p489526
--
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin
Re: problem with saving my game
It doesn't really matter. I personally like to put everything in one file (this can get complicated if you need to worry about separators showing up inside data, but that's what String_replace is for). But separate files work just as well.
URL: https
problem with saving my game
Hi all!So, can someone explain me how should I go for saving my game? I have some classess which I need to save, notably Player and World.How should I go for it? Serialize the player class to one file, the world class to one file and the third class which
14 matches
Mail list logo