On the game I'm currently working on, it's built very heavily around Lua. So for the save system, we simply fill a large Lua table, and then write that to disk, as Lua code. The 'save' file then simply becomes a Lua file that can be read directly into Lua. This is absolutely amazing for debugging purposes. Also you never have to worry about corrupt save files or anything of it's ilk. Development is easier, diagnosing…
Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
111–120 of 265 posts
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#112On the game I'm currently working on, it's built very heavily around Lua. So for the save system, we simply fill a large Lua table, and then write that to disk, as Lua code. The 'save' file then simply becomes a Lua file that can be read directly into Lua. This is absolutely amazing for debugging purposes. Also you never have to worry about corrupt save files or anything of it's ilk. Development is easier, diagnosing…
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#113Earlier quoted context omitted.
Not sure what you are referring to. What are some common ways "expert users" manage to "trash their repositories?"
Let's start here: http://randyfay.com/content/avoiding-git-disasters-gory-stor... So, the solution to the fact that the merging UI is a pile of garbage is HAVE A SINGLE PERSON ALWAYS DO THE MERGE . Excuse me? The whole point of a distributed revision control system is so I don't have to have a single choke point. That's the definition of distributed . Then there was the KDE disaster: http://jefferai.org/2013/03/29/di…
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#114On the game I'm currently working on, it's built very heavily around Lua. So for the save system, we simply fill a large Lua table, and then write that to disk, as Lua code. The 'save' file then simply becomes a Lua file that can be read directly into Lua. This is absolutely amazing for debugging purposes. Also you never have to worry about corrupt save files or anything of it's ilk. Development is easier, diagnosing…
That's how people are going to cheat at your game.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#115Earlier quoted context omitted.
Let's break this down into two statements: XML doesn't have strings (or types at all really) JSON strings are strings. There is a massive semantic difference here when it comes to parsing.
What is that massive semantic difference? If you want the number represented by 1e999 as the value for salary, at some point, something has to take "1e999", whether you call it a string or a something-with-no-type, and turn it into a number. Your deserializer has to know to do that in either case.
XML:
->[byte stream]->[deserializer]->[bignum]
JSON: ->[byte stream]->[json reader]->[string]->[deserializer]->[bignum]
The latter is, well, wrong.Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#116On the game I'm currently working on, it's built very heavily around Lua. So for the save system, we simply fill a large Lua table, and then write that to disk, as Lua code. The 'save' file then simply becomes a Lua file that can be read directly into Lua. This is absolutely amazing for debugging purposes. Also you never have to worry about corrupt save files or anything of it's ilk. Development is easier, diagnosing…
Also, the Tiled Map Editor exports directly to Lua.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#117On the game I'm currently working on, it's built very heavily around Lua. So for the save system, we simply fill a large Lua table, and then write that to disk, as Lua code. The 'save' file then simply becomes a Lua file that can be read directly into Lua. This is absolutely amazing for debugging purposes. Also you never have to worry about corrupt save files or anything of it's ilk. Development is easier, diagnosing…
That's how people are going to cheat at your game.
If not loading things is important to you, mind.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#118On the game I'm currently working on, it's built very heavily around Lua. So for the save system, we simply fill a large Lua table, and then write that to disk, as Lua code. The 'save' file then simply becomes a Lua file that can be read directly into Lua. This is absolutely amazing for debugging purposes. Also you never have to worry about corrupt save files or anything of it's ilk. Development is easier, diagnosing…
That's how people are going to cheat at your game.
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#119What's with all the XML hate? Of course, doing everything in XML is a stupid idea (e.g. XSLT and Ant) and thanks heaven that hype is over. But if I want something that is able to express data structures customized by myself, usually with hierarchical data that can be verified for validity and syntax (XML Schemas or old-school DTD), what other options are there? Doing hierarchical data in SQL is a bitch and if you wan…
I personally miss having schemas and XSLT in JSON. > doing everything in XML is a stupid idea (e.g. XSLT and Ant) XSLT actually made a lot of sense. If everyone writes code to transform format1 to format2 then what you end up with a lot of slightly different transformations. Its main downfall, just like XML itself, was that it was annoying and time consuming to write. How would you replace all this if you moved away…
Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”
#120Earlier quoted context omitted.
One of the core aspects of XML that is really important is that no typing is inferred by the structure of the file unlike JSON. JSON is by nature tied to the JavaScript type system which is sparse and inaccurate. For example, if you look at the following: { "name": "bob", "salary": 1e999 } Ah crap! Deserializer blew (in most cases silently converting the number to null) bob 1e999 No problem. The consumer can throw th…
The equivalent of your XML would be: {"name": "bob", "salary": "1e999"}