Archive for June, 2007

We did it

Friday, June 29th, 2007

10k level finished!

dd_screen4.png

Here’s a screenshot of my layout:

dd_screen3.png

I let 1 flyer from level 91 go by, then a bunch more on level 98. I don’t see how level 99 is even possible. As you can see, I’ve got a TON of quad boosted, fully upgraded swarm towers, but I didn’t even get them halfway dead. I am proud to say not a single ground creep made it past.

So close

Thursday, June 28th, 2007

I came amazingly close to beating all 100 levels on the 10k fun level. Here’s a screenshot of my just before I lost:

dd_screen2.png

I have almost mastered 3 path juggling now. I made 1 mistake around level 80, letting about 10 creeps which I believe cost me the win.

Desktop Defender

Wednesday, June 27th, 2007

Desktop Defender 1.5 was released a few days ago. I’ve been messing around on the 10k fun mode. You are given 10k gold to start, and you try to complete 100 levels. the first 50 or so levels are ridiculously simple on this mode, since you can start with a good amount of towers already in play. After a while though, it becomes really tough, the furthest I have made it is level 84. Still experimenting with the new towers and trying to find the best layout.

dd_screenshot.png

In this attempt, I may be on to something. The creeps have to loop around 2 “hot zones”, and since it is a spiral formation, they each set of creeps hits each hot zone. I need to work on placement a bit, as well as taking away most of the squirt towers in favor of the cheaper pellet towers. Then I can concentrate of more powerful squirt towers around my “hot zones”.

Elite Series Tournament Report

Monday, June 25th, 2007

I drove 70 miles on Saturday to play in the “elite series” tournament in Towson, MD. Almost all interstate miles, so it took just over an hour for the journey. I had never been at this particular store, the first thing I notice… there is no parking. I almost made the mistake of going to parking garage that had public parking mon-fri, but some creative driving allowed me to avoid the $95 fee had I parked there. I finally found some room on the street a short distance from the shop.

The show itself was pretty nice - fairly large play area, awesome little indie/punk/hardcore record store in their back storeroom, very friendly staff, and several restaurants and a trader joe’s within walking distance. 26 people showed up, more than I expected. I heard they only had 5 people for their City Champs.

I get my packs, and immediately notice 4 copies of Spiderman - 2 Spider Hulks, 1 Sensational, and 1 with a bag over his head. I felt good about that. I noticed Moon Knight at 5, and 2 copies of Hellcat at 3, so I went with spiderfriends/defenders. I had 3 or 4 attack pumps, 2 team-ups, and a Ring of Fire that immediately went in. After some debate, What are Friends For? made the cut. I debated the last few cards for a while, but 1 card I thew in at the last minute was Damocles Base. I figured with 4 copies of spider-man, 2 Hellcats, and 2 John Walkers, I could hit every now and then. That was an understatement, it ended up being my MVP card. I hit cards all day with it. Once I had seen 3 copies of spiderman, I started naming other cards, so it allowed me hit the 6 or 7 I actually wanted to play.

game 1 - nothing special. I use attack pumps to attack up the curve on turn 5, establish board advantage, and win on 7.

game 2 - pretty much a repeat of game 1

game 3 - My opponent has Samantha Parrington on turn 4, and plans to clear my entire board. He attacks and says and says “just as long as you don’t play…” I flip over What are Friends For…”Noooooo!” I win again.

game 4 - I am slightly behind on this game the whole way. Turn 6 he has Madalyne Pryor, he plans on wiping out everyone. I have What Are Friends For? so I can at least keep my 6 drop. Going into turn 7, I have my 6, he has a 6, 7, 5 and 2 I believe. I try to get him to make a mistake in reinforcing, but he doesn’t fall for it, so I lose.

game 5,6,7 - Nothing special. Moon Knight + Hellcat destroy everything. I win 2 more and lose 1, ending up 5-2. Enough for top 8 draft + EA Enemy of my Enemy. Awesome.

During the draft, nothing really stand out in my opening pack, so I take Hulk 5, a very respectable 5 drop. Next pack has 3 or 4 bombs, it is very had for me to decide. I end up taking One Man Rampage, which I thought would go well with Hulk. Ends up being a bad choice, even though I drew it in almost every game, I never played it. My 3rd pick is Beast 2 drop, then the Defenders seem to dry up. The 3rd pack has a Spider-Signal, so I take that and start drafting Spider-friends. On the 11th pick, I notice a Dweller-in-Darkness still in the pack. wtf? This guy is an awesome 6 drop. I consider switching over to underworld, but for some reason I thought I hadn’t seen enough other support UW cards going around, so I think better of the idea. Either someone is this draft is really smart or a complete idiot. There are also LOTS of syndicate cards going around, but I think they are the worst team. I splash them when I need to, but I am not going to make them one of my main teams.

The 2nd pack solidifies my spider-friends, as well as fills in a few defenders. Damocles Base is in one of the packs, I count it out and it’s going to come back around to me on the 11th pick. Everyone else seems oblivious to its power, though I was bragging about how good it was to Stephen just before the draft. As luck would have it, the pack comes around without the Base. I shoot Stephen a look of disgust. He hate-drafted it and didn’t even play it! Going into the 3rd pack, my only 6 drop is Super-Skrull. Yuck. Luckily I pick up a Wendell Vaughn and a late Sub-Mariner.

Match 1 - I play Tommy, who has an interesting Syndicate/Underworld deck. He wants to keep a lot of guys stunned on the board, gain life with In Limbo, and have a huge Sub-Mariner on turn 6. Not sure why that Sub-Mariner came back around to me, guess he was missing drops, too. I don’t remember exactly what happened, but I won 2 games

Match 2 - Syndicate and random other teams. The games are pretty even, I think the self-burning the syndicate is known for pushed me over the edge.

Match 3 - I play Stephen King for the playmat, the glory, and the money. Oh wait, they took the money away. Guess it’s just for the playmat and the glory. 2x Spider Signal and 1x Ring of Fire is nice, but not as nice as his 2x Morbius. Plus he seemed to hit those huge spider friends 1 & 2 drops every game. Game 1 I even bricked one of his attacks on turn 7, then he smashed me with the rest of his dudes and I lost. I pulled a win on game 2 thanks to a timely spider-signal, but game 3 wasn’t even close.

So I come away with a few x-men packs (apparently the store is overstocked), a wolverine t-shirt won in a door prize, and of course the EA. I’m happy with that.

Everything all of the Time

Monday, June 25th, 2007

This past weekend was very busy.  Friday night I had to pick Lisa up from the bus stop, we basically just came home and crashed.  After 10 hours of sleep I drove up to Towson, MD for a VS tournament.  I’ll type up a more detailed report of that later.  The tournament ran until 9:45, so I didn’t make it home till after 11 pm.  Only time for a few rounds of boggle before going to bed.  Sunday we went to see 1408.  It was about what I expected, cheap scares & halfway attempts at plot twists.  It was all fairly predictable, but all in all, well made and worth the $6.  The rest of the day was spent running errands and trying to find a replacement tire for Lisa’s car, which was discovered to have a nail in it.  I did get time to watch the TUF finale Sunday night right before going to bed, so I’ll type up a report for that later as well.

Accessing Smarty Class Methods in a Template

Friday, June 22nd, 2007

I was working on a template today, and I needed a way to find out if a smarty template existed or not. If not, I wanted to display a default template. Now, this would be easy if I wanted to check this from the php page, as there is a smarty class method called template_exists(). However, I needed to check this from the template, where no such function exists.

At first I dabbled with accessing the $smarty variable from within the template, because I new the template_dir was in there somewhere. Using that, I could simply use the php function file_exists to check if the template was there. However, I wasn’t sure on the syntax, and concatenating strings within a smarty “if” wasn’t working. I considered writing a plugin to do this check, but why reinvent the wheel? A function already exists to do this, I just needed to get access to it somehow.
Eventually I stumbled on this piece of code:

php code:

$smarty->;register_modifier(‘template_exists’, array(&$smarty, ‘template_exists’));

template code:

{if “reports/sales/$report_type.tpl”|template_exists}
{include file=“reports/sales/$report_type.tpl”}
{else}
{include file=“reports/sales/default.tpl”}
{/if}

Which worked perfectly.

I’m Batman

Wednesday, June 20th, 2007

Batman

That may be the best artwork on a VS card ever.

Other world’s finest cards are here.

Shared Hosting is a Nightmare

Tuesday, June 19th, 2007

I believe I finally have (almost) everything working on my new site. When I set out to remake this page, I figured I had 3 choices

  1. Host the site from my own house.
    Not ideal because I don’t want to open up my home firewall to incoming traffic on ports I don’t have to, and because I don’t have a static IP. It rarely changes, but still, I hate having other people tell me when my own site is down because something I didn’t know about changed.
  2. Host the site on a my employers server.
    Not a bad choice, things are pretty lax around here, no one would really mind unless I started bringing in huge amounts of bandwidth (not likely). The only problem would be in the future, if/when I change jobs, I’d have to move my site.
  3. Use shared hosting.
    I don’t really like paying for hosting, but being a web developer, why can’t I get free hosting somewhere? I asked Matt Frazier if I could piggyback some space and bandwidth off his account, for the price of naming my firstborn son after him, and offered to help him give his site an upgrade as a bonus. He said he didn’t mind, so the choice was made.

This is the first time I have used shared web hosting, and let me tell you, it sucks in ways I hadn’t thought of. I think the main problem is I like to have control over everything that is happening behind the scenes, and I want to figure out exactly why something isn’t working. Let me run down the problems I encountered getting the site up.

First, there was getting the name to point to the right place. So I buy majmcdonald.com and point it towards Matt’s site. The next step will be to somehow get the vhost into the apache config file. The webhost uses cPanel, so I log in and find a button for setting up a parked domain. Bingo! I tell it majmcdonald.com is a parked domain for mattfrazier.net, and get a message that majmcdonald.com must use this hosts’ name servers. Blimey!

Not a huge problem, I log into my registrar, set the nameservers to the shared hosts, then go back into cPanel and set up the parked domain. Now majmcdonald.com and mattfrazier.net are one and the same.

Next I set up a directory in Frazier’s website for my own site. I create a .htaccess file that uses mod_rewrite to send majmcdonald.com traffic to this new directory. It works, hallelujah! Site up and running smooth. This is around 11pm Sunday night. A bit later that night, I log back into cPanel and notice everything has changed. It appears they upgraded their servers. I cross my figures and check my site. Blank… White… Page. Blimey!

I figure it is some type of php error causing this, and they have display_errors turned off. Despite my best attempts to turn it on, using a .htaccess file, the server resists. Then I notice a error_log in my directory when I am logged into ftp. I open in up and see a bunch of errors about unknown cURL functions. So they didn’t compile cURL, even though their site specifically says it is enabled. We send some support requests to the webhost, they recompile php with cURL and increase the memory limit from 8 MB to 32 MB, and we’re back in business.

The next problem happened when I started noticing majmconald.com wasn’t redirecting to my directory. It was just pulling up mattfrazier.net I check out the .htaccess file, my rewrite lines are commented out. I uncomment them. The problem reoccurs, lines commented out again. I uncomment them, and move somet things around. Problem reoccurs AGAIN, this time the lines are simply gone. I figure Frazier is playing a cruel joke on me, or uploading old .htaccess files on accident, but he claims otherwise. The only other thought I have is the host has some type of cron making the changes, or even someone at the company is doing it by hand, which seems really bizarre.

I log into cPanel again, and play with the options. Then I notice there is not only a “Parked Domain” option, but an Addon domain option. This turns out to be what I wanted all along. So I unpark the domain and make it an addon.

The final problem was the Wordpress editor. I was missing the “Visual” editor - the same one you get when writing forum posts to help you with your html style. I did a bunch of research on the Wordpress site, a lot of people were complaining the realpath() function was causing the problem. I poked around the code for a few hours, but nothing worked. There were no errors in the error_log file, and realpath() was behaving as intended. I did notice on my local copy, there was 1 extra javascript file being loaded for the page, so I tried hard coding the include to that file onto the page. Still not working. I tried to pull up the page directly… and saw a 403 error?

So I check the apache error log in cPanel, sure enough, there is a 403 error happening over and over. Since the filename was tiny_mce_config.php, I can only hypothesize apache is set up not to allow “config” files to be viewed in the browser. I renamed the file to tiny_mce_conf.php, hacked the code a bit, and it all started working. I’ll be safe until I forget the change and upgrade Wordpress.

UFC 72 Results

Sunday, June 17th, 2007

*spoiler warning* this post contains spoilers from UFC 72, which I watched this weekend.

Some people over at the sherdog forums were complaining the lineup for UFC 72, and I could definately see why. No title matches. Griffen/Guida looked like a possible show stealer, but the other fights looked pretty mediocre. I never was a big fan of Forrest Griffen or Rich Franklin. While they are both great fighters, they are both prone to getting ahead in points and just coasting to a win. Here’s a brief rundown of the action (*= my pick to win)

Herman* vs Smith
Scott Smith is always exciting to watch, but both of these fighters are pretty predictable. Ed Herman is going to take the fight to the ground for some GnP, Scott Smith is going to look for that one big shot to win. Herman shot for a takedown in the first 15 seconds or so, and got it without a problem. He landed a nasty elbow, opening a huge cut in Smith’s nose, which gave the fans who wanted blood something to cheer about. Smith fought back for all he was worth, but Herman was too much for him, eventually sinking in a rear naked choke, which had Smith tapping fast.

Griffen* vs Guida
As predicted, this was a barn burner. While I normally hate Mike Goldberg’s commentary, he was right about one thing. If someone wanted to know what mma was all about, this was the match they should watch, as it had everything. Stand up action - combos, kicks, throwing for the fences. Great grappling, crazy scrambles, many different submission attempts - kneebars, ankle locks, RNCs, even a suplex from Griffen (though it looked like he hurt himself more than Guida). Griffen absolutely won the first round, though Guida started to come on strong in the end. Round 2 was a lot closer, though I had Guida winning it on my card. Guida dominated the 3rd round, spending most of the time on top, though I admit, Griffen did more damage throwing from the bottom than anyone I have ever seen. In the end, the entire place thought Guida had won, but somehow 2 of the judges gave it to Griffen. While I was happy my pick won, I was pretty disappointed with the call. All I can figure is the judges still aren’t sure how to score takedowns and submission attempts.

MacDonald* vs Singer
Both have similar fighting styles, though MacDonald always looked stronger, faster, and hungrier to me. That pretty much dictated the match. Singer looked better on his feet, and had a very active guard, but still wasn’t a match for MacDonald. He dominated the match till he got full mount and GnPed his way to victory.

Griffin* vs Ramirez
Griffin put on a striking clinic in this matchup. He took it to Ramirez with both punching and kicking combos. Every time Ramirez tried to counter, Griffin stepped out of the pocket. Griffin dominated the entire match this way. Ramirez finally started the engine in the 3 round, but couldn’t change up his style enough to score any points. Griffin wins *yawn*.

Franklin* vs Okami
Okami’s strength and wrestling ability have brought him to the top of the division. I figured Franklin would be where his drive ended, though I saw it being very, very close. They are the biggest, strongest guys in the division, but Franklin’s striking far surpasses Okami’s at this point in his career. The first 2 rounds were pretty much the same. Franklin would come in, through some punches, and a kick here and there, then back out. Okami never seemed to engage. Sure, he would through a few strikes, but for some reason he never went for a takedown. Even in the clinch, Okami did almost nothing. I loved Frankin’s comments after the first round - “He’s not that strong.” The 3rd round, Okami suddenly came to life. He got leg sweep from the clinch, and ended up in mount. Franklin remained calm and bucks him off without taking any real damage. After a guillotine attempt, both fighters are on their feet, but Okami is looking to go for a kimura. The fight goes to the ground, Okami has the kimura in deep now, and I thought for sure he might pull this out after all. Franklin is able to roll out of it and end up on top, when the round ends. Now if Okami had fought like that from the beginning, the fight would have been his. Not sure why it took him so long to settle into his game. Too little, to late, Franklin wins by decision.

Amazingly, I picked all of the fights correctly. My luck continued to the undercard fights. I ended up with 71 points on mmaplayground.com, finishing 4th in my fight camp, and 120th overall (out of 3493). Not bad!

Squirrels are not Herbivores?

Saturday, June 16th, 2007

On the way to the movies today, I saw a squirrel in the middle of the road. He seemed to be enjoying his brunch, though it what he had was too big to be a nut. As we got closer, he scampered away, still holding his… mouse? That’s right, this squirrel was chomping down on a mouse. All along, I thought squirrels were herbivores, apparently not.

The movie we watched was Ocean’s 13. I have to say, it was pretty good. Maybe not as good as Ocean’s 11, but way better than 12.

Allow me to Reintroduce Myself

Friday, June 15th, 2007

So I’m back to blogging again. I’ve had the itch a few times over the past couple of years, but just never took the initiative to actually sit down and do it. Not sure what is different about this time around, but whatever, here we go.

Wordpress has gotten a lot better since the last time I looked at it (maybe 4 or 5 years ago) so I’m going with it over my last choice, Drupal. This weekend, I’ll work on getting the domain name pointed to the write place, and try to dig up my old blog entries and get them up.

Test

Thursday, June 14th, 2007

Just a test.