Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > The real world > Idle chatter

Reply
 
Thread Tools Display Modes
Old June 18, 2013, 21:23   #21
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,386
debo is on a distinguished road
Quote:
Originally Posted by Derakon View Post
Realistically these days there's only two reasons to use custom binary file formats:

1) You want it to take an extra two hours for the hackers to figure out how to modify your savefiles / the idea of people being able to easily modify your game fills you with shame and horror.
2) You're writing a program for older mobile devices that don't have the storage/processing power to effectively make use of text formats.
3) U r L337
debo is offline   Reply With Quote
Old June 19, 2013, 18:42   #22
Gorbad
Apprentice
 
Join Date: Sep 2008
Posts: 74
Gorbad is on a distinguished road
Quote:
Originally Posted by Derakon View Post
Realistically these days there's only two reasons to use custom binary file formats:

1) You want it to take an extra two hours for the hackers to figure out how to modify your savefiles / the idea of people being able to easily modify your game fills you with shame and horror.
2) You're writing a program for older mobile devices that don't have the storage/processing power to effectively make use of text formats.
4. You plan to store tens of millions of save/data files (Massively successful multiplayer games)

But anyway, yes agree to generally use a txt/xml/yaml/json format, and I'd even go so far as to say that if you have speed enough, don't use C or the like, but an interpreted language (Python/Perl/choose your preferred poison).
Gorbad is offline   Reply With Quote
Old June 19, 2013, 18:48   #23
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
Quote:
Originally Posted by Gorbad View Post
4. You plan to store tens of millions of save/data files (Massively successful multiplayer games)
Then you use compressed text. zlib is not hard to work with and will get you similar space savings as a custom binary format would. Heck, we have a custom binary format at work (I didn't choose to use it!) and compressing it gets us a 50% reduction in file size simply because it's not well-designed for space saving (it contains a lot of raw image data).

However, I suspect that MMO saves are stored in databases instead of flat files, since there must be all sorts of juicy analytics that the game developers will want to be able to run.
Derakon is offline   Reply With Quote
Old June 19, 2013, 19:46   #24
Gorbad
Apprentice
 
Join Date: Sep 2008
Posts: 74
Gorbad is on a distinguished road
We store many items (non game related) in, for example ASN.1 formats, which tends to be highly efficient (and easily readable again if needed).

The smaller items/larger numbers stuff indeed goes into clustered databases, but keep in mind that for companies wanting to keep data for longer periods, even one byte saved means massive savings (not only storage, but also transport).
Gorbad is offline   Reply With Quote
Old June 19, 2013, 21:17   #25
fph
Knight
 
Join Date: Apr 2009
Location: Pisa / DL0
Posts: 960
fph is on a distinguished road
Quote:
Originally Posted by Derakon View Post
Then you use compressed text. zlib is not hard to work with and will get you similar space savings as a custom binary format would. Heck, we have a custom binary format at work (I didn't choose to use it!) and compressing it gets us a 50% reduction in file size simply because it's not well-designed for space saving (it contains a lot of raw image data).
Does this mean Angband savefiles are scheduled to become compressed xml soon?

Code:
<item><name>The Phial of Galadriel</name><bonus type="searching">+1</bonus><bonus type="light radius">3</bonus></item>
__________________
Dive fast, die young, leave a high-CHA corpse.
--
You read a scroll labeled 'lol gtfo' of Teleport Level.
fph is offline   Reply With Quote
Old June 19, 2013, 22:24   #26
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 9,024
Derakon is on a distinguished road
Quote:
Originally Posted by fph View Post
Does this mean Angband savefiles are scheduled to become compressed xml soon?
I dunno about Angband, but Pyrel will most likely be using plaintext JSON for savefiles. I'd guess (completely blind) they'll probably end up in the 50kB range, which is not exactly going to break anyone's hard drive.
Derakon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Experiences with Frog-knows Timo Pietilš Vanilla 110 July 27, 2014 18:58
Programming Q&A Derakon Development 23 September 20, 2012 23:00
New to Angband programming BreathesFire Development 14 October 13, 2011 18:33
Windows Programming Question Kyle Development 5 July 29, 2009 04:52
Morgothian programming language zaimoni Idle chatter 2 April 22, 2009 10:26


All times are GMT +1. The time now is 16:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.