wiki:TechnologyDistributionProposal
Last modified 3 years ago Last modified on 02/08/10 09:42:14

Since one of the goals of Epiar is exploration based gameplay, we can't use the current model of making ships, weapons, engines available everywhere. Obviously this was just a development step, but it got me thinking about how we should distribute various technologies. Ideally I would not want to have each planet define every ship, weapon, engine, and outfit that you can buy there since it would make the creation of planets tedious. Instead, I propose a way to cluster technologies by the alliances and have each planet pick an alliance, tech level, and _then_ add any planet specific options.

Each alliance would have a list of Tech levels that would have names of the technologies (ships,engines, weapons, outfit) that would be available there. A planet would have all technologies from their alliance of their tech level and below. The planet could also use that list to generate the traffic and militia. This would allow mixing and matching weapons and ships, but it could prevent bad ships from having great weapons or vice versa. (There are a lot more options for how to do ship configurations though, I don't want to get into that right now.)

Examples:

<planets>

<planet>

<name>Antikythera</name> <alliance>Inter-Terran Conjunctive</alliance> <techLevel>2</techLevel> ... <model>Terran Explorer</model>

</planet>

</planets>

<alliances>

<alliance>

<name>Inter-Terran Conjunctive</name> ... <techLevel>

<level>1</level> <model>Terran FV-5 Frigate</model> <model>Terran Miner</model> <weapon>laser</model>

</techLevel> <techLevel>

<level>2</level> <model>Terran Corvert Mark I</model> <weapon>missiles</model>

</techLevel> ...

</alliance>

</alliances>

Here, Antikythera would have everything in the Inter-Terran Conjunctive tech levels 1 and 2 as well as the Terran Explorer model.

I like this idea, and I'm looking for feedback. Does this seem like something that we should implement? Is there a better way of distributing technologies around the universe without unnecessary repitition?

One technical hurdle I haven't figured out is that our Parser template class can't handle xml documents with more than 3 levels. Meaning that it could capture 'alliances','alliance', and 'name', but it would fail on techLevel and it's children because it doesn't match the mostly-flat configuration style of our other xml documents.

There are three solutions that I can think of but I don't particularly like either, so I'm hoping that somebody can come up with some better ideas.

Idea 1) Rewrite the Parser to deal with aribtrary depth xml documents. This would require working knowledge of xmllib2 that I don't have but could learn I'm sure. This would also require that each of the parsed our objects be able to understand more complex objects than the key-value pairs we have right now. I'm not particularly fond of the idea of rewriting so much just to add this feature, but I wouldn't be surprised if we wanted artibtrary depth xml documents in the future, so it might be a worthwhile investment.

Idea 2) Create a new xml file called TechLevels?.xml that is a slight modification of what I've described above: techlevels -> techlevel -> [alliance,level,model,weapon,engine,...]. Then link the alliances to the techlevels or the planets to the techlevels. This feels like it would require more handshaking than I was hoping for and it creates a bit of 'needless' complexity that I would like to avoid. Id does stick with the simplicity of the Parser though, so it might be an acceptable method.

<techLevels>

<techLevel>

<alliance>Inter-Terran Conjunctive</alliance> <level>1</level> <model>Terran FV-5 Frigate</model> <model>Terran Miner</model> <weapon>laser</model>

</techLevel>

</techLevels>

Idea 3) Modify this idea slightly to have Planets pick and choose from a collection of named technology sets. This would mean that technologies could vary more planet to planet and potentially less consistent between allied planets. I got this idea just before I was about to send this mail, so it hasn't been fully fleshed out yet. I think I like it though. This could also be expanded so that Antikythera has buyable-technologies, traffic-technologies, and militia-technologies.

<technologies>

<technology>

<name>Light Terran Commerce</name> <model>Terran FV-5 Frigate</model> <model>Terran Miner</model> <weapon>laser</model>

</technology> <technology>

<name>Mid Terran Defence</name> <model>Terran Corvert Mark I</model> <weapon>missiles</model>

</technology>

</technologies>

<planets>

<planet>

<name>Antikythera</name> <alliance>Inter-Terran Conjunctive</alliance> <technology>Light Terran Commerce</technology> <technology>Mid Terran Defence Force</technology> <model>Terran Explorer</model>

</planet>

</planets>