Seeking Brains In a 2D Plane

April 29th, 2008

I started back up on my zombie game the other day, with the approach of ditching the attempt at fancy graphics, and focusing on building a minimalistic but playable game. Since I needed to rebuild it with XNA 2.0 anyways, I started over with a great 2D tile engine from Nick Gravelyn. I then abstracted out the NPC classes a bit, and started by making a zombie NPC. Of course a zombie must seek brains, but how exactly would that work?

Zombies are too stupid to use a “real” pathfinding algorithm like A*, but a simple x,y comparison leads to an ugly behavior where it walks the diagonal first, then a straight line the rest of the way. I ended up finding the perfect algorithm in a line-of-sight demonstration for roguelikes, using Bresenham’s line algorithm. This algorithm is perfect for zombies, because they’ll travel in a straight line to food, until they hit an obstacle, then stop until the obstacle is gone. I’ll also be able to reuse this algorithm for my line-of-sight, line-of-smell, and line-of-sound algorithms to determine a zombie’s prefered target for tender, delicious brains.

Clinton’s Win Scenario

March 21st, 2008

As a follow-up on my post from the other day, I looked a bit more closely at some state polling, and filled out the CNN delegate counter based on what I could find. Where I couldn’t find any polling, I kept it more or less tied, with a slight advantage to the winner in the surrounding states. I then gave Clinton the required superdelegates to reach 2,024 Here’s how it turned out:

As you can see, that’s another 244 superdelegates Clinton will need to reach the nomination by June 7th. Keep in mind that it’s roughly the same number as Obama will need to reach the nomination by May 6th. The even more interesting thing here, to me, is that if Barack Obama can bring over 100 more delegates, he’ll have made it impossible for Clinton to ever reach 2,024 (assuming these results in the primaries).

I also should point out that I think the primary results on that map are extremely pessimistic from Obama’s perspective. A 30 delegate loss in PA would be far more surprising than the Ohio loss, and I expect it to be more in the 10-20 range. I’m also doubtful of the Oregon results, as the poll I used is from January, and still has Edwards and Kucinich in the running. From what I hear, Oregon has a strong level of support for Obama right now.

For comparison, here’s Obama’s win by superdelegates in the same situation:

With the Richardson endorsement, I expect we’ll see a flood of superdelegates coming out for Obama between now and 4/22.

Obama’s Pastor Problem

March 21st, 2008

There’s another controversial quotation that’s been floating around, from a different black pastor whom Barack Obama has named as an inspiration and personal hero:

God didn’t call America to engage in a senseless, unjust war, and we are criminals in that war. We’ve committed more war crimes almost than any nation in the world, and I’m going to continue to say it. And we won’t stop it because of our pride and our arrogance as a nation. But God has a way of even putting nations in their place.

I’m sure the media will call any moment now, for Obama’s denouncement of Dr. Martin Luther King Jr. and the above statement he made at Ebenezer Baptist Church in Atlanta, on February 4, 1968.

Read the full speech here.

Pot Calls Kettle Racist

March 20th, 2008

Geraldine Ferraro had some more lovely words to say about Obama and Wright yesterday How she can praise Tuesday’s speech as “excellent” while at the same time calling Wright a “racist bigot” is beyond me; either she wasn’t paying attention, or one of us was watching a different speech. I wish Ferraro the best of luck in coming to terms with her own bigotry, but in the meantime I implore her to just stop talking.

Barack Obama Will Clinch the Nomination on 5/6

March 19th, 2008

I was just running through some numbers, out of curiosity, and I noticed something: Barack Obama has a good chance at clinching the nomination on May 6th. Taking a pessimistic approach, let’s assume Clinton defeats Obama in PA, winning 89 delegates to his 69. Let’s then assume Guam, Indiana, and North Carolina are ties (I’ll even give Clinton the extra delegate in NC). At that point, according to CNN’s current delegate counts, Obama will have 1,785 delegates. With the threshold standing at 2,024, that’s just 239 delegates away. At that point, a rallying among just about 2/3 of the 350 remaining superdelegates could declare Barack Obama the presumptive nominee, whereas Hillary Clinton would still be out of reach.

You and Your Racist Friend

March 11th, 2008

This is where the party ends
I cant stand here listening to you
And your racist friend
I know politics bore you
But I feel like a hypocrite talking to you
And your racist friend

–They Might Be Giants: Your Racist Friend

Apparently Hillary Clinton isn’t a big TMBG fan, otherwise she’d have known better than to be so closely associated with unrepentant racist, Geraldine Ferraro. She actually just said:

“Racism works in two different directions. I really think they’re attacking me because I’m white. How’s that?”

Of course, Clinton is standing by her supporter. Never you mind that Samantha Power was forced to resign from Obama’s campaign for calling Mrs. Clinton a “monster.” Honestly though, if Clinton wants to keep friends like Ferraro close, she can be my guest; Obama can’t buy these sorts of headlines.

As with most things though, T-Rex said it best.

Cheap Gas, or “Who Killed The Lactic Car?”

March 11th, 2008

With as much bitching and moaning as you hear about gas prices these days, it’s refreshing to see a price comparison versus other liquids most of us buy. A gallon of gas is still a good bit cheaper than milk, for instance. “But still,” you might say, “I don’t use 10 gallons of milk in a week.” Well, why is it any less ridiculous to be using 10 gallons of gas in a week, then? If you were riding a bicycle, you could have gone 6,300 miles on that energy.

Yes We Can

February 7th, 2008

I was deeply struck when I first saw Barack Obama say “we are the ones we’ve been waiting for” in his speech. I just found out now that it’s from part of a Hopi saying, and the full thing is even more incredible and appropriate:

The Hopi Elders Speak
We Are the Ones We’ve Been Waiting For
You have been telling the people that this is the Eleventh Hour.
Now you must go back and tell the people that this is The Hour.
And there are things to be considered:
Where are you living?
What are you doing?
What are your relationships?
Are you in right relation?
Where is your water?
Know your garden.
It is time to speak your Truth.
Create your community. Be good to each other. And do not look outside yourself for the leader.?This could be a good time!
There is a river flowing now very fast. It is so great and swift that there are those who will be afraid. They will try to hold on to the shore. They will feel they are being torn apart, and they will suffer greatly.
Know the river has its destination. The elders say we must let go of the shore, push off into the middle of the river, keep our eyes open, and our heads above the water. See who is in there with you and celebrate.
At this time in history, we are to take nothing personally. Least of all, ourselves. For the moment that we do, our spiritual growth and journey comes to a halt.
The time of the lone wolf is over. Gather yourselves!
Banish the word struggle from your attitude and your vocabulary.
All that we do now must be done in a sacred manner and in celebration.
We are the ones we’ve been waiting for.

–The Elders Oraibi
Arizona Hopi Nation

Epoch Fail!

February 4th, 2008

I opened up Amazon.com this morning to track a recent order, and saw the following:

I couldn’t help but to be reminded of a recent XKCD comic.

It Had To Happen Sooner Or Later

February 1st, 2008

Today, I speak in links:
http://finance.google.com/finance?chdnp=1&chdd=1&chds=1&chdv=1&chvs=maximized&chdeh=0&chfdeh=0&chdet=1201907861000&chddm=1955&cmpto=NASDAQ:YHOO&q=NASDAQ:GOOG
http://www.google.com/search?q=define%3A+irony