Good format for game data
Moderator: Forum Moderators
Good format for game data
So I'm working on porting an old classic game called Realmz into Javascript and there's a lot of old practices that were used for storing game data. All the data is in binary files, which made sense 15 years ago so you could fit stuff on floppies. However, there are a lot of llmitations as there's a fixed number of bytes in sequence for things like in a character file for items and spells.
I want to save things in a slightly more dynamic method, and since this is going to be web based maybe it makes sense to do it in a text-savvy way? Perhaps XML or CSV, or something else entirely.
Specifically, the different types of data I'll need to store include map files, character files, saved game files, scenario files, and databases for items, spells, monsters, and races and castes.
I want to save things in a slightly more dynamic method, and since this is going to be web based maybe it makes sense to do it in a text-savvy way? Perhaps XML or CSV, or something else entirely.
Specifically, the different types of data I'll need to store include map files, character files, saved game files, scenario files, and databases for items, spells, monsters, and races and castes.
Wesnoth Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Re: Good format for game data
How about txt? It's an easy format to read and it is standard for web storage in systems like dokuwiki. XML will be more useful if you want to use other dynamic web interfaces.
Re: Good format for game data
Interesting, I'll look unto YAML.
Just to clarify: as far as I know, I'm going to use text or binary for storing information. My question really is how best to:
Just to clarify: as far as I know, I'm going to use text or binary for storing information. My question really is how best to:
- Make it lean
- Make it human readable
- Make it accessible through Javascript (parsing)
- Make it dynamic so things can be added or deleted without having to recompile
Wesnoth Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Re: Good format for game data
So, you basically want anything that's written in plain text, no? Regardless whether it's XML, YAML, WML or something else you come up with on your own shouldn't matter as, if need be, you can always write your own parser (of course it's better to not to have to "reinvent the wheel", but virtually any kind of plain text parser would be possible to do). The whole question sounds kinda moot unless you drop the "Make it human readable"-requirement.ancestral wrote:[*]Make it human readable
[*]Make it accessible through Javascript (parsing)
[*]Make it dynamic so things can be added or deleted without having to recompile[/list]
Yes I use windows, too.
Yes I too am aware of what that means.
Yes I'm still gonna use windows too.
Yes I too am aware of what that means.
Yes I'm still gonna use windows too.