10 Replies - 465 Views - Last Post: 12 December 2013 - 09:32 AM Rate Topic: -----

#1 alapee  Icon User is offline

  • The North American Snipe

Reputation: 101
  • View blog
  • Posts: 1,656
  • Joined: 24-October 13

Save Game Questions

Posted 12 December 2013 - 07:44 AM

What is the general consensus on creating a save game file? or do you embed the save game information in game itself?
I was thinking a string hidden in the game somewhere but as my game gets bigger and more robust I will needs something to handle graphics coords. So what is everyone's opinion on how to do it?
Is This A Good Question/Topic? 0
  • +

Replies To: Save Game Questions

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8964
  • View blog
  • Posts: 33,624
  • Joined: 12-June 08

Re: Save Game Questions

Posted 12 December 2013 - 07:54 AM

What's the argument against having an actual file-file?
Was This Post Helpful? 0
  • +
  • -

#3 alapee  Icon User is offline

  • The North American Snipe

Reputation: 101
  • View blog
  • Posts: 1,656
  • Joined: 24-October 13

Re: Save Game Questions

Posted 12 December 2013 - 08:44 AM

I was trying to figure out if it was better to have a file or embedded. That was my main question. I figure those with experience would be able to give me good points on both.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8964
  • View blog
  • Posts: 33,624
  • Joined: 12-June 08

Re: Save Game Questions

Posted 12 December 2013 - 09:00 AM

I always figure it came down to "embedding is a pain" and a "file is less so".. not to mention I can have multiple saved game files for testing.
Was This Post Helpful? 0
  • +
  • -

#5 axel1994  Icon User is offline

  • D.I.C Head

Reputation: 83
  • View blog
  • Posts: 167
  • Joined: 27-May 13

Re: Save Game Questions

Posted 12 December 2013 - 09:05 AM

Isn't XML files an option?
Was This Post Helpful? 0
  • +
  • -

#6 alapee  Icon User is offline

  • The North American Snipe

Reputation: 101
  • View blog
  • Posts: 1,656
  • Joined: 24-October 13

Re: Save Game Questions

Posted 12 December 2013 - 09:21 AM

So how hard is it to read a file in C#?
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8964
  • View blog
  • Posts: 33,624
  • Joined: 12-June 08

Re: Save Game Questions

Posted 12 December 2013 - 09:23 AM

Stream reader's pretty handy.
Was This Post Helpful? 0
  • +
  • -

#8 alapee  Icon User is offline

  • The North American Snipe

Reputation: 101
  • View blog
  • Posts: 1,656
  • Joined: 24-October 13

Re: Save Game Questions

Posted 12 December 2013 - 09:26 AM

Right now I have Date|Name|Level|XP|GP as the data needing saved. With Version 2 we expanded to Date|Name|Level|XP|GP|Weapon|Armor|In Game Days|Bank

I am just trying to figure out what would be the easiest for right now as well as in the future when the game goes from text to graphics.
Was This Post Helpful? 0
  • +
  • -

#9 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8964
  • View blog
  • Posts: 33,624
  • Joined: 12-June 08

Re: Save Game Questions

Posted 12 December 2013 - 09:28 AM

Sure.. streamreader's good in a pinch, but I tend to move to XML. I dig the structure and it's pretty handy. For what you have there - a quick 'write line' with streamwirter for each shouldn't be a problem
Was This Post Helpful? 1
  • +
  • -

#10 alapee  Icon User is offline

  • The North American Snipe

Reputation: 101
  • View blog
  • Posts: 1,656
  • Joined: 24-October 13

Re: Save Game Questions

Posted 12 December 2013 - 09:30 AM

Can that be saved in any format? Do you have a link for it? if not I can find it. Thanks Modi.
Was This Post Helpful? 0
  • +
  • -

#11 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8964
  • View blog
  • Posts: 33,624
  • Joined: 12-June 08

Re: Save Game Questions

Posted 12 December 2013 - 09:32 AM

Really? "msdn streamwriter"

http://msdn.microsof...=vs.110%29.aspx

Quote

Can that be saved in any format?

I do not follow. Streamwriter writes text.. to a file. The extension is irrelevant.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1