🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Generating Random Missions (long)

Started by
10 comments, last by Wavinator 23 years, 8 months ago
If I can figure out a bunch of mission types, I''ve got this scheme for generating random missions. It''s a bit long, but I think I''ve figured out some of the more important factors, and I''d like to get feedback / constructive criticism: (BTW, this is for an space combat game, but I think could apply to fantasy or whatever) SETUP: The first thing is to note how you get your mission information. Although there''s room for variety here, I''m going to keep this simple and assume it''s a briefing. So, the first important factor is the task: Find X, Kill Y, Protect Z. These can be combined as long as they''re not contradictory (not Kill X, Protect X). This sets the win/lose conditions. The next important factors I''ll simply call friends, neutrals, and enemies. So the above tasks will reference these (Find and protect Neutral Y, or Kill Enemy Z). They could be objects, NPCs, ships, etc. MISSION START: First, the start point: This can be randomly located if the fiction supports it (teleport), at some friendly controlled area, or along a side of the map as long as it makes sense. I see a mission being made of waypoints. Each waypoint is where the action happens. Each waypoint contains a certain percentage of the above mentioned friends, neutrals, and enemies. The important part is that their state determines the mission and how it''s to be accomplished. You can do this by varying hitpoint levels, number of forces, and their current AI actions. An easy example: Let''s say you generated a straight combat mission. Destroy three pirate ships. For all involved, you can vary the position, HP, and other important capabilities. SURPRISE! To prevent boredom, it''s important to surprise the player. Challenge their expectations. One way lies in how much information you give them in the briefing (e.g., say 2 enemies when it''s really 5). Another is how much you change things in game. For instance, you might pit the player against 2 enemies, then add in 3 more during the middle of the fight. This is similar to the above, but doesn''t make the mission giver look so inept (bad luck rather than bad intel) You could suddenly change the mission objectives, or waypoints themselves as well. For instance, your goal is to guard X, then lots of enemy Y''s show up, and your goal changes to destroy X before the Y''s capture it. DIFFICULTY Factors that make a task difficult will depend on the task. For combat missions, it seems you can compare attack and defense strengths. You can sum enemy HP and attack, and compare them to player HP and attack. This won''t be perfect, but will help. TIMING AND TRIGGERS To create more variety, timing and trigger conditions can be used at each waypoint. I need more details here. Timing limits could be used for tasks themselves (destroy X in Y minutes), but seem better if attached to real world conditions (add 100 enemies in Y minutes). Triggers could be based on conditions. For instance, if the mission is "Do Not Attack Neutrals" and the player does, the trigger might be to turn all neutrals into enemies. Thoughts? -------------------- Just waiting for the mothership...
--------------------Just waiting for the mothership...
Advertisement
Wouldn''t something such as this get very repeditive? (I realize most games are repeditive anyway). It reminds me of Daggerfall''s tactic of generating thousands of quests. There are only maybe 5 or 6 quests types and they just change NPCs involved, the cities involved. It got old real quick.


"All you touch and all you see is all your life will ever be --Pink Floyd

"Though the course may change sometimes, the rivers always reach the sea" --Led Zeppelin

Need help? Well, go FAQ yourself.
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Naz,

I''m wondering why it is that scripted missions wouldn''t be considered boring (say those of Starcraft).

Anyway, yeah, it might get boring. If you generate a mission which is "Destroy X" several times in a row, I think that will be lame. Even varying the target and size / composition of forces wouldn''t be enough. Repetition kills, and must be avoided.

So I''ve got some ideas to deal with it:

1) Vary the map / terrain (which gives somewhat different strategy)

2) Continuity - Make most missions relate to something larger. For example, a war where X is invading Y. The battle gets fought over a certain number of maps. Your success influences the war, and changes the context of why you''re doing something. For example: Mission 1 is a pre-emptive raid against a base. But during the mission, you see the base is storing some weapon of mass destruction. Now, in mission 2, your goal is to destroy the same base before the weapon can be used. Essentially same mission, but with a different meaning.

3) Crescendo - Make missions come to a point. So the invasion of Y by X and all the missions in between is ultimately leading somewhere (you don''t know where) and this holds your interests.

4) "Storyness" - Worst made up word of the day, but what I mean is using characters and missions in such a way as to create a "sorta plot." For instance, in the Wing Commander series, you meet the character Paladin. Paladin appears off and on again, and creates tension and story interest by being a consistent element (that you can affect) in the game universe. Paladin could turn out to be a traitor, or get killed, or come to your rescue like Han Solo to Luke in the original Star Wars. This is the trickiest idea, but seems like it will pay off the most.

--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
Those are some nice solutions. Although, how randonly generated were you thinking things will be? Seems like if things are very random some of those things may be hard to control. I may be jumping to conclusions though.


"All you touch and all you see is all your life will ever be --Pink Floyd

"Though the course may change sometimes, the rivers always reach the sea" --Led Zeppelin

Need help? Well, go FAQ yourself.
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Sort of like something I would like to do.

The key is, you need more variety than
Destroy X
Protect Y
Find Z

I assume you have many more ideas in mind and just didn''t mention them. Also, allow different methods for each option. For example, you could convert X over to your side instead of Destroy X. Given enough different options which are all customizable would provide more variety than human written scripts could do, although with some loss of depth.

Several billion trillion tons of superhot exploding hydrogen nuclei rose slowly above the horizon and managed to look small, cold and slightly damp.-The Hitchhiker's Guide to the Galaxy by Douglas Adams
quote: Original post by Nazrix

Those are some nice solutions. Although, how randonly generated were you thinking things will be? Seems like if things are very random some of those things may be hard to control. I may be jumping to conclusions though.



The structure I''m thinking of putting this into is an open ended game. So there''s no traditional ending, or story contraints, and this makes lose evolution more acceptable.

The main control issue beyond interesting mission composition is difficulty. How do you stop a newbie in a shuttle from being ganged up on by a wolf-pack of destroyers?

Well, percentages and ratios may be one way. I''m just going to have to see for sure, but I think if you compare the offensive and defensive capabilities and scale you''ll get a good difficulty rate.

For example:

Newbie Level: 10:1 force strengths, can''t lose!!!!
Experienced: 1:1 force strengths (even match)
Expert: 5:1 force strengths (it''s gonna be tough!!!)

(Of course, ratios will have to be tweaked in testing)



--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
quote: Original post by Forneiq

Sort of like something I would like to do.


Cool, I''d be glad to trade ideas!

quote:
The key is, you need more variety than
Destroy X
Protect Y
Find Z

I assume you have many more ideas in mind and just didn''t mention them. Also, allow different methods for each option. For example, you could convert X over to your side instead of Destroy X. Given enough different options which are all customizable would provide more variety than human written scripts could do, although with some loss of depth.



You''re right. How you are allowed to approach the task determines how fun it will be for the most people.

Right now I''m testing this concept and a few others by making a top down space shooter with missions. The domain is intentionally narrowly limited to combat so that I can prove the concept without a lot of extraneous factors (more importantly, so I can FINISH the friggin'' thing as well!)

--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
To remove the staleness that would inevitably occur, I think you need to look at it from a different angle.

The random mission is generated. That''s fine. But then you need to throw in random sub-plots / side-plots that are not relevant to the player''s mission, but have an effect on the player''s ability to complete the mission.

Examples like:
1) Power outage on the 5th floor.
2) Two innocent bystanders getting in the way.
3) A street vendor hassling you. (Is this my informant or not?)
4) A rebellious subordinate.
5) An overzealous security agent.
6) A locked door that wasn''t supposed to be locked.
7) A barking dog giving away your location.



_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
In each mission it is important to allow different things to happen. Your goal may start out as Destroy X. That does not mean the mission will be the same as every Destroy X mission. First of all, X can change. Also things will not always go as planned. The point is to add enough things that can go wrong to keep it interesting. Wav, I also was planning to use this in an open-ended system with no real ending. The question might be, can this only be used in open-ended games, or also in linear games? It is definitely much better suited to the open-ended type.

I have a lot of work to do before I ever get around to implementing this idea, but it would be a nice thing to try.

I am so glad that Landfish is finally getting the respect he deserves.
Several billion trillion tons of superhot exploding hydrogen nuclei rose slowly above the horizon and managed to look small, cold and slightly damp.-The Hitchhiker's Guide to the Galaxy by Douglas Adams
If you want to provide the player with a seemingly endless supply of missions, randomly generated, I''d opt for a mixture where the computer picks random missions within structured plots.

A designer would create a subplot, something like this (for space combat)

Planet X is about to be attacked by enemy Y.

You and your squadron are the only hope for planet X, an ally of your forces.

On your way to planet X, several things can happen at several points along the way.

When you leave your spacestation, still far away from planet X, you can''t be expecting enemy Y to lay in hiding, waiting to intercept you from your rescue attempt. But, you might encounter rogue pirates, or maybe just some patrolling enemy Y''s, meteorites or whatever you can think of. The more things you can think of here, and program them, the more options you give for the computer to randomly pick one.

Halfway on your journey to planet X, the amount of patrolling enemy Y''s might increase. And maybe there are more rogue pirates, since your spacestation (who fights the pirates) is so far away. Maybe there are other entities in this area that do not particularly like you. Again, the more things you can think of, the better. And again, let the computer randomly pick one of the options.

Closing in on planet X, you''re likely to encounter enemy Y''s patrols. And maybe you see a lone fighter from planet X in a dire situation, and maybe you can help. Or maybe you don''t encounter anything at all. Again, let the computer pick one of the options.

Then finally, arriving at planet X, you might want to land and discuss tactics with the leaders of planet X. Maybe they can lend you some of their ships. Maybe they''re already under attack, since you took so long to get there. Maybe it''s already destroyed. Or maybe you do what you came for and you save the day.

I think the best way to go about it with random missions, is to create some structure in the random patterns.

Just think of ANY possible situation you can think of and then start to assign them to your many subplots.

In the above situation, the following scenario''s might unfold:

A) Leave space station, encounter nothing at all along the way, arrive on time at planet X, land, discuss tactics, fight enemy Y with assistance of 10 planet X planes.

B) Leave space station, encounter rogue pirates, encounter sudden meteorite shower, encounter enemy Y patrol, arrive late, planet X already taken over/destroyed.

C) Leave space station, encounter nothing until almost at planet X, encounter enemy Y patrol, arrive just in time to join the fight already in progress.

As far as your options for encounters:

encounter living force:
-give information to
-get information from
-protect
-destroy
-capture
-remove from area
-get help from

encounter non-linving:
-avoid
-destroy
-take
-investigate
-go to
-get away from

I think if you opt for any random in a game, make sure the player never feels like he''s just repeating the same thing over and over again in a different shape (as mentioned: Daggerfall sort of had that effect on me)

Silvermyst
You either believe that within your society more individuals are good than evil, and that by protecting the freedom of individuals within that society you will end up with a society that is as fair as possible, or you believe that within your society more individuals are evil than good, and that by limiting the freedom of individuals within that society you will end up with a society that is as fair as possible.

This topic is closed to new replies.

Advertisement