How do I create new entities (the collection of their components) in an entity system? I have space ships in my game, for example, they need a lot of information set in their components when I create them. For example I set the mass, size and a moment of inertia tensor in a physicscomponent of the ship. I also have a component that contains a list of engines on the ship (is that right by the way? My ES doesn't support multiple components of the same type, should it?), each engine has a position and a force.
Now when creating a basic ship I see a couple of options. I can just hard-code it in my game. This is the way I have it at the moment, and it doesn't feel too good, there will be a lot of code to create different kind of space ships that are very similar except for some properties which would create lots of code duplication.
I could also use a database, I've seen this used before and I can definitely see how it'd be a good fit. Although it's a pretty small hobby project that I'm working on and it seems like it would be a little overkill. I'm not sure though, maybe it's worth it?
So the only thing remaining I can think of is describing entities in a text file of some sort, which might work. I guess it would require writing lots of code to parse different kinds of values, and where would I put the code that actually sets the values on the components? I'm using C# so I guess I could use reflection on the properties but I fear it'd be slow? And I don't want to clutter up my component code.
Maybe I should mention that it's a multiplayer game. So some components are client-only which could easily be marked in some way.
So how do you create new entities, or their components, in an entity system?