SF4 Ragequits – 3/31/2009

by casperOne 31. March 2009 21:01

camperelite

Tags:

sf4 ragequits

SF4 Notebook - 3/30/2009

by casperOne 30. March 2009 22:50

General

For some reason, Street Fighter Bar Fights just seems like a natural thing.

Damn you SoCal!!!  I REALLY want to go…

Tags:

sf4 notebook

SF4 Notebook – 3/29/2009

by casperOne 29. March 2009 23:42

Ryu

The more I see of better players playing him, the more it is apparent he is the best all-around character in the game.  He will consistently deliver damage, but not overwhelmingly.  The juggle potential with the LP Shoryuken is also very good (e.g. he can do it into the EX Hadouken).

Rufus

His juggle potential is the greatest in the game, IMO.  The Tornado Galaxy can juggle in the corner (they can get an extra Tornado Galaxy if the first one hits), and he can juggle into a full Ultra Combo, I believe.

Additionally, the Jatotsu Nature can be juggled into (but I’m not sure after which normal move).

Claw

I learned an interesting piece of information at the Play N’ Trade Last Minute Tournament this weekend from a claw player.  From what I understand, when claw loses his mask, the damage he does goes down by 10% and he takes 25% more damage.  When he loses his claw, the damage he does goes down by 10% as well.

When I asked how to get the mask to come off, the player responded “hit him in the face”.  Duh.

Tags: , ,

sf4 notebook

SF4 Ragequits – 3/29/2009

by casperOne 29. March 2009 19:06

andresloco
psicoblade80 – When I emailed my standard “ragequit much?” email to him, he at least admitted it.  Kudos to him!

Tags:

sf4 ragequits

Anything Counts

by casperOne 27. March 2009 14:26

Daniel Cazzulino has an entry about how LINQ can be used to transform nasty-looking code expressions like embedded for loops into something much more readable (and by extension, maintainable).

In it, he transforms this piece of code:

private bool IsPresentationModel(CodeClass2 baseClass)
{
foreach (CodeClass2 pc in baseClass.PartialClasses)
{
foreach (CodeAttribute2 attr in pc.Attributes)
{
if (attr.FullName == typeof(GeneratedCodeAttribute).FullName &&
attr.Value.Contains(ThisAssembly.Title))
{
return true;
}
}
}

foreach (CodeAttribute2 attr in baseClass.Attributes)
{
if (attr.FullName == typeof(GeneratedCodeAttribute).FullName &&
attr.Value.Contains(ThisAssembly.Title))
{
return true;
}
}

return false;
}
To this:
private bool IsPresentationModel(CodeClass2 baseClass)
{
return baseClass.PartialClasses
.OfType<CodeClass2>()
.Select(cc => cc.Attributes)
.SelectMany(ce => ce.OfType<CodeAttribute2>())
.Concat(baseClass.Attributes.OfType<CodeAttribute2>())
.Where(attr =>
attr.FullName == typeof(GeneratedCodeAttribute).FullName &&
attr.Value.Contains(ThisAssembly.Title))
.Count() != 0;
}

All-around, it’s a much better solution, easier to read, easier to maintain, easier to understand.

But there’s a problem with it.

It’s in the last line:

.Count() != 0;

Here, Daniel is trying to check for the existence of an item, the actual count of items is irrelevant.

The documentation for the Count method on the Enumerable class states:

Returns the number of elements in a sequence.

Knowing that an IEnumerable<T> implementation only represents the sequence of elements, and nothing more, it’s safe to surmise that the only way to get the count of the number of elements in the sequence is to iterate through the entire sequence.  This is an O(N) operation, which for high values of N, can be pricey.

Now, it’s true that the actual implementation of the Count method checks whether or not the IEnumerable<T> implementation also implements ICollection<T>.  If so, it returns the value from the Count property on ICollection<T> instead of iterating through every element.  This reduces the method to an O(1) operation.

Unfortunately, that’s an implementation detail.

And we all know that coding against implementation details, except when absolutely necessary, is a bad, bad, BAD (say it again with me, BAD) idea.

Fortunately, the Enumerable class offers a solution in this case, the Any method.  From the documentation:

Determines whether a sequence contains any elements.

Which is the semantic equivalent of checking the number of elements in the sequence to zero.

As stated before, because IEnumerable<T> is representative only of the sequence of elements (and nothing more), the simplest way to implement this would be to iterate for just a single element.  If an element is returned, then the method returns true and false otherwise.  Since only one element is involved, this is an O(1) operation, which is always better than the O(N) operation that the Enumerable.Count method is.

So what have we learned here?

  • DO use the Enumerable.Any extension method to check for the existence of elements in the sequence.
  • DO NOT use Enumerable.Count extension method in comparisons against zero, as the following are semantically equivalent:
    • sequence.Count() == 0
    • !sequence.Any()
  • DO NOT use the Enumerable.Count extension method in comparisons against the “not zero” condition, as the following are semantically equivalent:
    • sequence.Count != 0
    • sequence.Any()

Tags: , , , , , ,

programming

SF4 Notebook – 3/26/2009

by casperOne 26. March 2009 21:50

Boxer

Sagat’s LK Tiger Knee is a really good defense against the dash punch shenanigans.  The LK Tiger Kick has a great pushback effect on block, and it has really great priority against all of the dash punshes.

I believe that if Sagat throws a LK Low Tiger Shot followed by a single dash, and Boxer does a Buffalo Headbutt, Sagat can punish with the standing HK.

Ken

Ken does a lot of damage with three LPs chained together.  I was beat by a guy twice who used only the LP the whole match.

Tags: ,

sf4 notebook

SF4 Ragequits – 3/26/2009

by casperOne 26. March 2009 20:59

shoto-warrior99
Arnah

Tags:

sf4 ragequits

SF4 Notebook – 3/25/2009

by casperOne 25. March 2009 22:00

General

Seth brought light to a funny video:

Definitely funny, but what’s really of interest is what he says after the video:

For you game engine nerds, these moves are both being activated on the same frame.  In the case of Ultras, the game assigns the first animation to one character randomly, but the actual execution is totally simultaneous, as you can see from the results.

This shouldn’t be confused with activating an Ultra when the animation of the opponent’s Ultra is complete.  IIRC, that counts as a reversal, and the Ultra that activated later will typically have priority (depending on the move of course, or maybe Sagat’s Ultra just has that much priority).

What’s of even more interest was djmixah’s question:

Bison's super... was it done incorrectly, or does he somehow have more priority from the P2 side?

Jinrai responds:

Vega's super would act the same way as if two, say, Chun-Lis try to airthrow each other at the same time. One randomly wins out.

As for the ultra, I forgot to record it, but the two Vegas just whiff through each other.

The moral of the story?  Don’t try and do a psychic Ultra.  Always do an Ultra to respond.

Cammy

I’ve had moderate success using a regular HK to counter her rolling air throw attack.

Tags: , ,

sf4 notebook

SF4 Ragequits – 3/25/2009

by casperOne 25. March 2009 12:00

demerial
YR1EL

Tags:

sf4 ragequits

SF4 Ragequits – 3/24/2009

by casperOne 24. March 2009 12:00

OmePee
take4PS

Tags:

sf4 ragequits