Trying to write an alt. implementation of VS Datamodel

Need help testing contributed art or code or having trouble getting your newest additions into game compatible format? Confused by changes to data formats? Reading through source and wondering what the developers were thinking when they wrote something? Need "how-to" style guidance for messing with VS internals? This is probably the right forum.
Post Reply
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Trying to write an alt. implementation of VS Datamodel

Post by legine »

Well dono were else to write it.

I just want to inform you that I work on a new DataModell. My Aim is to easyly provide DataAPI to Python and to the navcomputer (Which will be a rewrite and a dataAPI in Cockpit - I think Navcomp needs badly a rewrite. The Comments are wrote like theyx were found on the toilet.)

I don't know if That work or will be anything useful, but keeps me doing something even if it never finds it way into VS it helps me to understand what I want and what VS already has.

My Idea goes as the following.
I think in three Layers.
Base - Data acquiring
Data - Data Administration
Front - Well Gui Engine and Game Stuff.

Base Classes (Like LoadXML) will load the data from a specific source, if it is our XML file, some wired Database or the Net should be defined by the class that gets called. It delivers to (or sends from ;) ) the Data layer.
The Datalayer will provide the Information to whatever layer request information, and it administrates the Data itself. I am not sure if it should know about actions too. I tend to put that some where else. Rather use the place for sanity checks. And trying not to overbload the Code. (Anything longer then 500 lines is impossible to maintain. Old saying in Datawarehouse Construction :P )
As Baseclass I only see to it that the XML Data can be loaded as before.

For starting purposes I only will implement Galaxy structures ( Sectors, Planets and other stuff like that.) Ofc the design I work will only be changeing things in the code. When I do things right I think no changes to the actual Game data needs to be made. (Thats the aim!)

I actually started Codeing already. (just to give it a go since I am realy fond of the Idea, and do not want to wait until I understand every bid of the code.)

I hope you guys are willing to help me a bit in planing things. This is (exciteingly) my first OO aproach ever and I am not sure about some consequences of this. At least some sources are scaring me like hell with class design is directly liked with experience and stuff (I.e. How it is best to sell the Data to the engine I am realy unsure)

If the plan works out. We get a flexible and Easy way to handle The game Data. And we will be hopefully be able to easly export or use the API wherever we want to.

Well I will post more soon. When I am a bit further in uhh rampageing around. (That will be fun!!! =D)
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Trying to write an alt. implementation of VS Datamodel

Post by klauss »

legine wrote:At least some sources are scaring me like hell with class design is directly liked with experience and stuff
That's true, but it only means you learn by doing. And it doesn't mean you won't learn by reading (properly structured code of course - which VS lacks, BTW).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Post by legine »

I am not a good reader. But I like making my own mistakes. :)
legine
Bounty Hunter
Bounty Hunter
Posts: 139
Joined: Mon Sep 27, 2004 8:40 am
Location: Germany
Contact:

Post by legine »

Okay the layout I am thinking on is a bit clearer now but I am still unsure on some stuff.

I have a master Class I call it Galaxy. The Purpose is to control the system Infos that gets loaded. As that it knows System names Files and if the File is read or not. And maybe some other general Stuff... (Like generated system, Do we have to regenerate it or not. Or has the system Changes that needs to be saved.)

As second class that has almost the same attributes as the Struct we use now is generated for each system. It knows the sanity checks that are done to the generated System and maybe some Other function to finework current positions.

Now in which file is the Mission system. Havent looked yet for it. So np if yopu ignore this. I just want to be talkative a bit.

Also I think I need to implement some Function that give the engine the coords. That belongs to the SystemInfo I think. I am right here, yes?
So all that is Data relevant can be asked by asking system Info.

Would it be wise to add some basic Graphical numbers too? (like what ressources to use for that System.) We could have another source / class within the Engine Layer (forgot the exact layout) that holds that data.
I am a bit unsure about the scope. I dont want to have a bulky slow thingy floating arount in Memory space. (However it could be a hell of a mess if we splitt Data in different areas to track those down. Just because they are different layers.)

I go on with basic stuff independently for now. (Keeping the Question in mind.) Maybe if you could help me with this brainstorming, this can go right right from the beginning. That would be cool.
(Dont worry for Coding. Ill try everything that belongs in here.)
Post Reply