Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » Design Delimma
Re: Design Delimma Fri, 09 April 2004 13:42 Go to previous messageGo to previous message
multilis is currently offline multilis

 
Lt. Commander

Messages: 789
Registered: October 2003
Location: Edmonton, Canada
In my opinion you want to do it as a relational database (multiple seperate tables). The actual database can be xml or some other simple text format and loads like a spreadsheet into whatever structure your server feels like using.

In real application, Id field would likely be larger than 3 digits to make more room for expansion.


So for example you might have 3 tables:

Table language
Id, Code*, Name
301, SmtB, Smart Bomb
302, CrbS, Crobby Shield
501, Bomb, Bomb
502, Shld, Shield
503, GenP, General Purpose slot
801, AShi, Add Shields
802, AShN, Add Shield with no gain from RS
803, AArm, Add Armour
804, AArN, Add Armour with no loss to RS
805, ASma, Add Smart Bomb

*code field is for making modifications easier in the long term. One day translator programs could convert Id and Code back and forth in other tables if they prefer a code in their language rather than remembering an id. Number ranges would be clearly defined including space for public expansion and end user private addins.


Table SlotType
Id, Slot
301, 501
302, 502
302, 503


Table Property
Id , Property, Value
301, 805, 15
302, 801, 60
302, 804, 65


As an added note: I feel relational design is more flexible than object oriented, it is easier to change your perspective of what is on top... the base object.

For example sometimes you may care about all the properties that are members of a ship component such as crobby shield. Other times you may want to go through all components that are members of the shield property. Using pointers and hash collections to link, you can squeeze out amazing performance as well in a memory based database.


[Updated on: Fri, 09 April 2004 13:54]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Just how flexible?
Next Topic: Planet Transfer
Goto Forum:
  


Current Time: Wed Jul 03 23:54:41 EDT 2024