Thursday, February 09, 2006

The March of Science!

So, I've got a list of "bare bones" technologies that the player can research. However, I don't want a tech tree. I want something that feels more organic. The problem is that each technology needs to have rather a lot of features: how much income it provides when completed, how it affects the war effort, how it affects the social game, whether it unlocks any rooms or provides any special devices, and what happens when it goes horribly awry during the research phase.

These are rather difficult to do with an algorithm. I could program them all in manually, but that would be quite the pain in the ass. Plus, I want the player to feel like he's actually pioneering new technologies, rather than simply rediscovering technologies I've hidden.

So I've been thinking about the algorithm I'll be using.

Each research project has two components: the technology it's based on and the device we're using to help research. For example, you start with water turbines. If you were to research further in, say, the machining room, you might get high-efficiency water turbines. If you were to research in, say, the map room, you might get "the civic water turbine plan".

The problem is getting the computer to know what comes out of any given combination. Getting "more efficient water turbines" is easy, and the results are pretty clear: just some added income. However, when switching technologies between realms, you get some jumps that the computer has a hard time making. From water turbine to putting water turbines in each city. And what if you go and research that on the gun range? What do you get? Do you get defending civic power centers? Defending cities? Attacking enemy civic power centers?

But I think I solved it.

You see, the problem is one of overzooming. It's easy if you allow for overzooming.

What do I mean by overzooming?

Well, you have the basic "water turbine" technology. Combined with the "geographic distribution" activity of the map room, this becomes "geographically distributed water turbines" - or, civic power. From there, the gun range would actually have two (or more) devices in it - one researching defensive tactics, another assault tactics. Combined with the "armed defense of" meme, this becomes "armed defense of geographically distributed water turbines". Or, civic power grid defense.

Then you can go back to the map room, if you want. This would create something like "distributed defense of civic power grids". Does it have any meaning? Well, it's close enough to having a meaning. More importantly, the computer can tell what kind of features it has, and determine the effect it will have on the game.

Of course, there's more than one toy in each room. If you were to go and research "assault tactics" in the gun range, you would get "armed assault on defended civic power grids". If you wanted, you could simply continue to research it: "armed assault on armed assaults against armed assaults on defended civic power grids".

Each technology has an adoption level. For example, your "civic power grid" will steadily become more and more common. When it's uncommon, defending civic power grids is a pretty wussy technique. When it's more common, the defending is more useful. Of course, the two can grow up together, if you want.

So "armed assault on armed assaults against armed assaults on defended civic power grids" is only useful if "armed assaults against armed assaults on defended civic power grids" is common, which is awfully specialist.

The thing is, of course, to get the computer to determine what the technology is and how it should affect the game. The basic idea is that the computer needs to determine how much money it will make you (civilian use), how much of an effect on the war it will have (military use), what kind of thing will happen when researching it goes horribly wrong, and what the prototype you get to keep is.

Believe it or not, the hard part is that last one. You see, the prototypes have to have some kind of in-game effect, in order to make researching worth doing. When you start the game, your rooms and devices are all prototypes of starting technologies. You have a room with a water turbine in it (along with the water needed), because "water turbine" is a starting technology. What use does the water turbine have?

Good question!

How about the civic power grid technology? Is it a little model of a city? What use does it have?

How about the map room? It's obviously from the technology "mapmaking", but it can be used to apply the idea of large-scale geographic distribution. Can the model of a city be used to apply the idea of small-scale geographic distribution? Can the water turbine apply the idea of, uh, harnessing forces to spin?

More than that, however: is the model city a good place to go on a date? Is the turbine a good place to push a loose monster in? Does the map increase people's intelligence when they walk by it?

I've got the rest of it figured out: how the grammar works and so forth. Thanks to Adam Nakama and random wedge rats for their advice on the matter.

All that's left to discover is this last bit. I'll get it...

1 Comments:

Anonymous Anonymous said...

That sounds an awful lot like the turn-based-strategy game you tried that only lasted three turns before exploding.

Not that that's a bad thing, really, but you might be able to steal some other ideas from it as well.

But here's an idea for your researcher's creations: You start with the basic widget for each technology. Say you have a map or model from the map room, or a portable power generator from the water turbine room, or what have you. Your scientists carry these widgets from room to room to research them. Researching them in the same room makes them look cooler, and increases their efficiency. Researching them in a different room adds a graphical overly to the sprite. Thus, as you reserach something, the 'prototype' keeps changing appearance. The 'add an arbitrary image overlay' effect should work out pretty well, as the mad scientists continue to make a bigger, wackier device out of a simple one.

As for the exact affects of the prototype itself, it should depend a great deal on what the starting device was. The turbine prototype should be used to power gadgets. The map should be used to display a map of the base. The gun from the gun range should be used to defend it from invaders.

Now, every time to prototype is upgraded, you end up with additional abilities from the device, but you should still be able to use it as it was originally intended. A turbine which is researched in the gun room a lot should improve the weapons performance of any giant mecha it's put into. The map that's reserached in the power room should display all the power lines and electrical outlets in the base. The gun that's researched in the map room should get homing bullets (well, maybe on the third or fourth researching).

And the effect you get out of the prototype needn't have anything at all to do with the effect you get on the war mini-game (it's really a secondary game, after all). Because these are mad scientists, right?

4:46 AM  

Post a Comment

<< Home