How to save info after shut down

Started by
5 comments, last by v0dKA 20 years, 3 months ago
What type of file retains information and values of variables after the program is ended and or computer is shut down? how do games keep their save information?
.:<<-v0d[KA]->>:.
Advertisement
None, write your own file with anything you fancy.
quote:Original post by v0dKA

how do games keep their save information?


They keep it on the hard drive




--{You fight like a dairy farmer!}

--{You fight like a dairy farmer!}

Which they do HOW?
.:<<-v0d[KA]->>:.
google "File I/O"
There are a number of ways to do this, but the easiest explanation is this: for every object that you care about, you save their current position / stats in a certain order, then you reload the information in the exact same order.
If you don''t know how games write things to the hard drive i recommend you download the Platform SDK(google:"Platform SDK") and read about the functions Createfile(), ReadFile(), WriteFile(), and Closehandle()... that should be all you need to the writing.

This topic is closed to new replies.

Advertisement