Bog Turtle Games LLC Welcome, Guest. Please login or register.
September 09, 2010, 07:22:36 AM
Home Help Search Login Register
News: Elfland Reloaded Volume 1 is available on Xbox Live Indie Games!

+  Bog Turtle Games LLC Forum
|-+  Spuds
| |-+  General
| | |-+  Pattern priority
« previous next »
Pages: [1] Print
Author Topic: Pattern priority  (Read 1253 times)
Xenomath
Member
*
Posts: 1


View Profile
« on: August 10, 2008, 08:38:20 AM »

Hi,

great game, but despite the many tutorials I still have some questions regarding pattern priority.

So the most specific pattern that fits the current situation is chosen, right?
But what features determine how specific a pattern is? Obviously the number of objects.
What about conditions? It seems to me like a pattern with conditions is alway more specific than one without.
Orientation and distances seem a bit more tricky. They only count if conditions and number of objects are met?
If I have pattern with enemy orientations and one without it's not always clear to me why one is chosen over the other.

What if no pattern fits? The spud still choses one, but how?

I had some problems with the explicit pattern priority.
Pattern A: if there is a VIP friend, heal it
Pattern B: if there is a healing field already present, just go in that direction but don't fire another one (to save ammo).
I increased the priority of pattern B to ensure it get's choosen over the other, but it didn't work, I had to include a VIP spud in pattern B to make it work. Any ideas what went wrong?


Another topic:
is there a description of the different MultiPlayer modes?
How does king of the hill work for example?
I do have to design the scenarios myself, right? Haven't seen any premade ones.

Thanks
Logged
CarlErikson
Administrator
Member
*****
Posts: 30


View Profile Email
« Reply #1 on: August 10, 2008, 11:24:21 AM »

Hi Xenomath,

Thanks for the compliment on the game. I will try to answer your questions the best that I can.

Pattern priorities are only applicable if everything in the pattern matches the state of the world exactly. For example, if you have enabled a what-if in the pattern that is not on in the world, the pattern priority will not be applied. If a map test fails, the pattern priority will not be used. Similarly, if there is no object in the world that matches a pattern object (properties of the objects are considered here), the pattern priority will be ignored.

There are some cases where the relative positions of pattern objects as compared to their corresponding world objects causes the priority to not be applied. For example, if you have a pattern with a rock in between you and an enemy and in the world your spud is not hidden behind the rock from the enemy, that is enough to disqualify the priority bonus. The kinds of relationships that can prevent the pattern priority from being used are generally linear relationships (your spud, the rock, and the enemy are all in a line).

Note that a pattern priority bonus will not be disqualified just because there is a superset of objects in the world as compared to the objects in the pattern.

The eligibility of pattern priorities is based solely on the criteria above. For example, discrepancies in distance or orientation are not grounds for ignoring the pattern priority.

I would have to see your example (where there is an enemy with an orientation and one without) to pinpoint what is happening. Feel free to attach .SPD and .SCN files to your posts or you can e-mail them to btg@bogturtlegames.com.

If no pattern fits, the spud still chooses the "best" pattern it can using a "goodness" calculation. The calculation of goodness involves weighting several different criteria including:

1. Do the pattern what-ifs match the world?
2. Do the map tests succeed?
3. Does the world contain the objects specified in the pattern?
4. How well are the relative positions of the objects in the pattern preserved in the world?
5. How close are the pattern objects in terms of distance and orientation as compared to their corresponding world objects?
6. Should the pattern priority be applied (requires 1, 2, 3, and linear relationships in 4 to be exact matches)?

As for your Pattern A, Pattern B example, I will try to reproduce what you are seeing. If you want to send me specific files to look at, that might help me figure out the issue more quickly.

The networking modes are described in a file located in the Spuds folder. The name of the file is:

Networking.html

The King of the Hill networking game has a time limit and once the time limit is over, the team with the spud who is highest in elevation wins. You should play this game on a map that has mountains or hills in order for someone to be a clear winner.

Yes, you have to design the networking scenarios yourself. However, with a little effort you can use any of the single player levels in networking mode. For example, in the Spuds\Scenarios folder the file:

ReachApex.SCN

might be a map you could use for the King of the Hill game. To use it, you have to copy that file into your personal Scenarios directory. Your personal Scenarios directory can be found under Spuds\Players\[YourPlayerNameHere]\Scenarios.

I am sure you will have more questions after reading this post. Feel free to ask about anything that I did a poor job of explaining. Also, if you are having problems with specific levels, we can give more hints or we could look at your spud definitions and give you suggestions.

Thanks,
Carl Erikson


Logged
CarlErikson
Administrator
Member
*****
Posts: 30


View Profile Email
« Reply #2 on: August 10, 2008, 11:51:06 AM »

I tried to reproduce your Pattern A, Pattern B example in your post.

I had a VIP spud stationary and another spud with two patterns. The first patten would shoot out a health field onto a friend VIP spud. The second pattern would move closer to a health field.

What happened was that my spud would shoot out a health field onto a nearby VIP, then move a little closer until it reached the edge of the health field (so that it was actually just inside the field, getting healed). At that point it would just sit there and choose the first pattern. The reason that this is happening is that one of the important relationships with fields is whether you are inside or outside the field. In my second pattern, my spud starts outside the field and moves toward the field. As soon as the spud is deemed inside the field, the second pattern is not quite as "good" as it once was, because the spud is no longer starting outside the field in the world. So my spud now picks its first pattern from then on because the second pattern has fallen in "goodness."

One solution for a problem such as this is to enable the "Reloading" what-if in the second pattern. By doing so, the spud will choose its second pattern while reloading its health generator and therefore will move into the center of the health field.

As for why the Pattern B was not being chosen even when you hiked up its pattern priority, the reason is because this "in/out of" field relationships is one of the relationships that can make or break the rewarding of the pattern priority bonus. So when my spud was deemed inside the field, the second pattern's "goodness" rating fell as well as it was no longer receiving its priority bonus because one of the key relationships (similar to the hiding behind the rock linear relationship that I mentioned before) was no longer valid.

I hope this helps a little,
Carl Erikson
Logged
CarlErikson
Administrator
Member
*****
Posts: 30


View Profile Email
« Reply #3 on: August 10, 2008, 12:05:45 PM »

I tried reproducing some oddities with enemies with no orientation and enemies with orientation. I put down a spud that circles to the right of an enemy with no orientation and circles to the left of an enemy that is facing away from my spud. When I ran the simulation, my spud circled right no matter what.

I can see why this may be confusing, but the orientation of spuds can only penalize the "goodness" of patterns. So in my example above, because I did not specify an orientation for my first pattern, there was no penalty to its goodness when matching with an enemy in the world. In the second pattern, because I did specify an orientation, a penalty was applied to the goodness of my pattern since the pattern orientation did not exactly fit the enemy's world orientation. And so the first pattern was always chosen.

If you want to execute different actions depending on the orientation of an enemy, I suggest you specify an orientation for the enemy in both patterns. That way each pattern's goodness will be affected by the enemy's orientation.

And one final note is that orientation is not an "important" relationship that can make or break the application of pattern priorities. So hiking the priority of one of the two patterns in the example above would cause that pattern to always be chosen.

Hopefully this clarifies this issue a little bit. Please ask questions if anything is confusing.

Thanks,
Carl Erikson
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!