phunni Posted April 14, 2006 Report Share Posted April 14, 2006 I'm currently messing around with developing a simpl game. At present all the startup data is based on an XML file, but it struck me that it would faster and easier to code if it was all in a database file. Now, the only databases I've ever worked with are enterprise server types - and some testing with access databases. What I need is a database that can be distributed as a file with the app - a la Access, but is platform independant since I want the game to be for Windows and Unix... Any suggestions? Is there such a thing? Quote Link to comment Share on other sites More sharing options...
tyme Posted April 14, 2006 Report Share Posted April 14, 2006 what language are you coding in? i believe you can use any database as long as the language you're using has libraries that can access the database file. i've written a java program in linux that used an MS Access DB file...so it's not really a matter of platform independence but rather if what you're coding in can access it. Quote Link to comment Share on other sites More sharing options...
Gowator Posted April 14, 2006 Report Share Posted April 14, 2006 mysql has ports in win as well. However like tyme says if you just want the data its not important if the database actually runs as such .. for instance with a dbase file you can just access the data without needing the actual Db engine... Quote Link to comment Share on other sites More sharing options...
phunni Posted April 15, 2006 Author Report Share Posted April 15, 2006 I'm writing in C#. So, if I used an access DB file, would that work happily on Linux if I had the right drivers? Quote Link to comment Share on other sites More sharing options...
tyme Posted April 15, 2006 Report Share Posted April 15, 2006 If the proper libaries/interfaces are available in the C# compilers for linux, yes. i don't know specifics as i don't know c#... Quote Link to comment Share on other sites More sharing options...
Gowator Posted April 15, 2006 Report Share Posted April 15, 2006 I'd probably stay away from the Access (Jet) db engine because its horrendously complex for what you need. All you want is the table info and something like a dbase IV file is much simpler and efficent. The easiest way I have found for embedding databases is proably PERL with dbd and its very fast once you build the # the first time. Its also very simple and you just embed SQL in the code .. you can embed the perl itself into C .. its platform independant etc. etc. Another good bet might be SQLlight... as used in Amorok if you don't use a full mysql... If you search for PERL DBD and DBI (you need a main module and one for the specific database you access) you can get examples. Quote Link to comment Share on other sites More sharing options...
phunni Posted April 15, 2006 Author Report Share Posted April 15, 2006 It looks like SQLLight might be a good option - there are drivers for mono, so it should be fine on both windows and Linux... Quote Link to comment Share on other sites More sharing options...
Jza Posted April 15, 2006 Report Share Posted April 15, 2006 I'm writing in C#. So, if I used an access DB file, would that work happily on Linux if I had the right drivers? SQLite might be a good option also berkleydb is the world famous embedded jeans for the applications. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.