Game Information and Data
I'm well underway of designing a game, i'm lost on this issue though.
Where do games like flgiht sim store airport information?
I want to store information like this, longitude/latitude - normally i would use SQL Server, Access but i want my application to be able to read it even if the user does not have SQL Server or Access installed.
What can I do?
Re: Game Information and Data
Re: Game Information and Data
Re: Game Information and Data
Such as whatever you want. Resources in a DLL. A serialised object. A binary file in a format of your own creation. An encrypted text file. A plain text file. An XML file. Etc, etc, etc. It's your app. You get to store the data however you want.
Re: Game Information and Data
Can a DLL hold information?
Re: Game Information and Data
Quote:
Originally Posted by
AirlineSim
Can a DLL hold information?
No, I only included that one for a joke. ;) Of course it can. That's exactly how .NET Localization works: each cultures resources are stored in a separate DLL.
Re: Game Information and Data
Have your app install MySql with it and use a local sql database.
Re: Game Information and Data
It is kinda a silly question. Your the programmer you can do what you want!! YOU HAVE THE POWER!!
I think your looking at the problem wrong. Don't think about just storing data. Saving data isn't something a program needs to do, in fact most programmers would rather not save data. Takes time to do, you need algorithms to save it and pull it back out and then redisplay it. It would be much more easier if you never had to save data. Your efforts to save data should be driven from functionality that you want to provide in your program instead of just having the ability to save data.
Now when you think of saving data. Think of what your going to do with this data. Are you going to just have your program use it? Are you going to let others interface with your program so that everyone would need to save data the same way? Are you going to let people import settings and export data? You'll need some error checking to make sure your getting good data in before someone can import data.
So lets take your example of a latitude and Longitude. Probably the easiest way to do this is to save this to a text file. What I would do is put the latitutde and longitude then a ";" or something.
So it would look something like this: 123.45 568.90; 124.3 4.00; 156 874;
So now all i need to do when I pull the data out is look for the ";" in the file to know I get one latitude and longitude pair.
Now the really hard hard hard question. Game Programming. GOOD LUCK! Very very very expensive, lots of competition and lots and lots of intensive graphics (one of the hardest programming concepts you can get into. Cool, but very very difficult.) Just to give you an idea of what your up against starcraft 2 cost about 100 million to develop and they started in 2003 and it was released in July. They also had an army of programmers, game designers, artists and support staff.
If I was you and I had my heart dead set on game programming, I would find an engine that is free. I know the Unreal 3 engine, and the Quake 3 engine is open source. Find an open source flight sim engine and start there. Then I'd figure out how to use that to build what I wanted. Then I would save my data that would conform to that engine.
Re: Game Information and Data
I know how DLL's preform task etc but how can I get a DLL to reference airport names and locations via a index or it's airport code?
Re: Game Information and Data
otherwise XML I can use but it's not the best format to use.
Re: Game Information and Data
Quote:
Originally Posted by
AirlineSim
I know how DLL's preform task etc but how can I get a DLL to reference airport names and locations via a index or it's airport code?
For the third time, if you wanted to use a DLL you could store the data as resources. You would extract the resources the same way you do any other resources. How you then use them is up to you.
Re: Game Information and Data
jmcilhinney - thanks again but if you hadn't realised I've not used DLL's in this way before and was looking for a pointer - tutorial, write up, link or something to get me started. You seem familiar and perhaps easily forget others may have no idea what you are referring to and that some of us are part time hobby programmers!
If you are able to offer more it would be great appreciated.
Re: Game Information and Data
You don't need to be an expert in a subject to pick out the keywords from some information on that subject and then use them to find more information. I'm well aware that not everyone has my level of experience but I'm also well aware that anyone who is a hobbyist or part-time programmer and using this forum is most likely quite well versed in computer and internet use, so they are quite capable of looking for some information on their own. If they can't find what they need or they don't understand what they find, that's one thing, but I expect them to at least look.
http://www.google.com.au/search?q=re...ient=firefox-a
Re: Game Information and Data
Thanks I've had a look at google and can't find something specific to this, can you confirm it's possible by showing me a specific link.
Just to confirm you understand what i'm asking for I want to hold maybe 1000 - 3000 recored being held by their "ID" and each record will hold this info
ID: (An ID Number)
Name
LocationLongitude
LocationLatitude
CityID (ID number of a City which will be another dll)
RunwayLengthM
This all screams a database but i want it in another format which any user can read without needing to install a database application - XML could work but is to easily changable by the user and perhaps too slow.
Re: Game Information and Data
anything other than a database will be hard to secure from the user's edits.. even a database can be edited with some work.
if you don't use a local mysql instance, I would use XML. that way other applications can use it, it works well with .NET.
Re: Game Information and Data
If your just going to keep a record of a few things. Why not just create a structure of all those things. Then put them into a list of that structure. Then when you want to save it have them write to a file and when you need them have it read that file into memory. I wouldn't worry about securing the data because you can use whatever encryption scheme you want or make up your own and if anyone really wants it they'll have a really tough time trying to get it.
I really wouldn't go database, that's going to be slow and a lot of overhead. If it's a database that your going to maintain then you'll need to have internet ability in your program. But if its a file you can be offline which would make it easier.
Re: Game Information and Data
that's not entirely true. a database can be a local file, just as much as a network file/resource, and at the same time, a file can be on a network and not necessarily local.
if he's got lat/long combinations, odds are good that he has more than just a "few". a database was designed for this exact purpose. couple posts above he even says he needs to store 1000-3000 records.
Re: Game Information and Data
Your right about that, but the main reason for databases is so that people can read and write to them at the same time. If your not doing that then it's a lot of overhead with a database that you don't need. In which a file would be better.
Re: Game Information and Data
I'd argue a database's main advantage is structure and organization of data. With 3000 records, a flat file is easily susceptible to modification, prone to easy deletion and if you want record 3000, you have to read all the data before it in order to retrieve it.
Re: Game Information and Data
That's why god invented data structures. You could use binary tree's, heaps, linked lists take your pick to speed up recovery time.
This is my last comment on this post. I really don't want to start a war over database or file.