6 Replies - 617 Views - Last Post: 13 August 2012 - 07:21 AM Rate Topic: -----

#1 Mallaboro  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 26-April 10

What format should I use for storing external data like a save file?

Posted 12 August 2012 - 01:59 PM

I've been using .txt files for awhile now and although it works nicely, I'm sure there's a more professional secure file type.

I'm programming in C# using VS2008.

This post has been edited by Mallaboro: 12 August 2012 - 02:00 PM

Is This A Good Question/Topic? 0
  • +

Replies To: What format should I use for storing external data like a save file?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9093
  • View blog
  • Posts: 34,145
  • Joined: 12-June 08

Re: What format should I use for storing external data like a save file?

Posted 12 August 2012 - 02:04 PM

... like this?
Was This Post Helpful? 1
  • +
  • -

#3 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: What format should I use for storing external data like a save file?

Posted 12 August 2012 - 02:04 PM

So, are you asking if there's a way to store data that is secure?

The answer is no.
Was This Post Helpful? 0
  • +
  • -

#4 Mallaboro  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 26-April 10

Re: What format should I use for storing external data like a save file?

Posted 12 August 2012 - 10:16 PM

Thanks, Modi, Was a good read but not quite what I was after.
I've been making a world editor for my game over the last few weeks and it works great, just I thought I might be able to cut down on some file size and such.
File currently looks like:

Name: town.txt
Layers: 9
ObjectCount: 0627
|DOORS|
0080 0362 0016 0032 Path= forest.txt @ 0080 0362
0416 0522 0016 0032 Path= timsCave.txt @ 0416 0522
0928 0202 0016 0032 Path= DannisHouse.txt @ 0928 0202
0928 0394 0016 0032 Path= EmmaGarden.txt @ 0928 0394
|Objects|
_____Position_____ | _____Source_____ |*L P I L F D (*layer)
0048 0378 0016 0016 0096 0035 0016 0016 0 0 0 0 0 0
0064 0298 0016 0016 0096 0035 0016 0016 0 0 0 0 0 0
...ect, 625 more times for each placed object


This post has been edited by Mallaboro: 12 August 2012 - 10:23 PM

Was This Post Helpful? 0
  • +
  • -

#5 Hezekiah  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 207
  • View blog
  • Posts: 550
  • Joined: 12-July 09

Re: What format should I use for storing external data like a save file?

Posted 13 August 2012 - 05:45 AM

What don't you like about modi123_1's suggestion? You'll have to be more specific. Your only options are to use a text file (like you are currently doing) or a binary file (like he suggested). There are no other types of files.

Based on your text format and using the same syntax as the link, your binary format could look like this. This is just a guideline - you'll probably be able to create a better specification as you know what information is needed.
WORLD {
    header HEADER
    name STRING
    layers U8
    doorCount U8
    doors DOOR[doorCount]
    objectCount U16
    objects OBJECT[objectCount]
}

DOOR {
    sourcePosition U16[4] //I'm just guessing what these are for
    target STRING
    targetPosition U16[2]
}

OBJECT {
    position U16[4]
    source U16[4]
    lpilfd U8[6] //I don't know what this is for
}

Was This Post Helpful? 0
  • +
  • -

#6 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 571
  • View blog
  • Posts: 1,274
  • Joined: 24-April 12

Re: What format should I use for storing external data like a save file?

Posted 13 August 2012 - 06:17 AM

What Modi said sounded like the answer to your question. Are you asking how to encrypt a file?
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9093
  • View blog
  • Posts: 34,145
  • Joined: 12-June 08

Re: What format should I use for storing external data like a save file?

Posted 13 August 2012 - 07:21 AM

Encrypt or compress it sounds like..
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1