Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » Design Delimma
Re: Design Delimma Sat, 10 April 2004 02:00 Go to previous messageGo to previous message
Ptolemy is currently offline Ptolemy

 
Commander

Messages: 1008
Registered: September 2003
Location: Finland

We don't need the complexity of a relational database - there simply isn't enough stuff to require it. Look at Stars! now in a maxed out testbed and you don't have all that many components. Also, components are grouped based on type (scanners, egines etc.) An indexed array of structures containing the componet variables works fine. A base identifier is assigned to each component family (i.e. 0 = engine and the first entry (0) is the QJ5 engine).

#define Engine 0

now all I need to do is get the array entry for the Fuelmizer (for exapmle) which is engine 3 so I go get array entry 2 for the engine. It's lightning quick and efficient.

The actual initial values for the components can be stored in a separate file initially so that they can be changed and, that file can be loaded at startup - or, they can all be stored in the .ini file. At some point though, they will need to be encoded into the executables as fixed values so that they can't be changed by players.

Ptolemy


[Updated on: Sat, 10 April 2004 02:01]





Though we often ask how and why, we must also do to get the answers to the questions.

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: Thu Jul 04 00:26:57 EDT 2024