I Miss Arcades

December 10th, 2009 / No Comments » / by Kevin

I miss arcades.

I know there are still arcades in some degree of its definition out there, but it’s just not what it used to be, not like when I was growing up. It must be hard for publishers/developers to even produce ideas for arcade units anymore given the technology available in the consumer market like the Xbox 360 or Playstation 3. From a financial standpoint I can see where its not worth it for them. Hell, I have a Playstation 3, and previously had a 360. Both come with online stores, both also have a ton of vintage games for sale (with new features). The thought of even going to an arcade is already considered a ‘back in the day’ sort of past time. Honestly, you can turn on your system and in a few minutes be playing with people around the world. What’s the incentive to leave the house?

But really, who doesn’t miss the classic arcade? Arcades where the lights were dimmer than its surroundings, enhanced by the warm glow of rows of games, warmer than outside from all the machinery. The blips, bloops, the beautiful sounds of quarters dropping into the coin slot. Players squaring off in heated rounds of Mortal Kombat or Street Fighter, collaborating in the six man X-Men game, crowds gathered around watching someone on a hot pinball streak or people enjoying a good lap in Daytona USA. Arcades where $5 would last you for hours, everyone lined up to play the new Ninja Turtles game or The Simpsons epic game.

For me, my love of arcades began when I was 5 or 6. One of the very first games I recall playing was Spy Hunter- how can you not love this game? Classic ‘Peter Gunn’ like theme as you weave in and out of cars trying to take you out, going 100 miles an hour and getting upgrades by driving up into tractor trailers every so often. If it wasn’t that, it was Gauntlet, Galaga, Gyruss, Pac Man, Donkey Kong or anything like them. One thing was for sure, if I wasn’t spending time saving up quarters, the rest of it was dropping them into these games and just enjoying the experience.

I was in the right place at the right time at the right age to experience the golden age of the arcade. Companies are trying to instill nostalgia by offering the same games on consoles, but the effect is cheap, flimsy, and cold, at least for me anyway. It’s just not the same. I miss arcades.

Submit Article :- Digg + Del.icio.us + Google Bookmarks + Reddit + Technorati

Use hook_init() to sidestep Drupal Install Profile issues

November 30th, 2009 / No Comments » / by Kevin

Drupal ships with a powerful method of packaging and redistributing your platform configuration called Install Profiles. It is similar to how Linux distro’s work, where you have the same core operating system, but extensive customization results in a different experience (Fedora, Ubuntu, Debian, etc). This allows us to employ rapid application development (RAD) after finalizing a build of a customized Drupal application.

There are some ‘gotchas’ though if you develop custom Drupal modules like we do. During the install process, Drupal only bootstraps the bare minimum to get the job done. I’ve noticed that if a module’s install routine calls functions outside of the .install file, the expected result tends to fail because files other than .install are not included during this loading process. It seems there is a special case for the file to be included, or you have to specify in your install profile to explicitly include the file (which takes a lot of time to do). To be specific, I have seen this happen with Drupal Boost, Drupal Gallery Assist, and our custom module Billboard, which tipped me off to this problem. The issue has since been fixed in Boost (and Billboard).

For us, the issue was creating custom ImageCache presets during a module’s install routine. This worked perfectly if you were going to the Drupal Modules page and enabling Billboard. What happens was the hook_install() function fired, included a definition file, and created presets based on that file. This fails during a Drupal install profile, where you use a script to install and configure Drupal automatically. This same issue occurs in Gallery Assist, and here is how I got around it:

It was pretty apparent that the code needed to come out of the install function. However, I needed to be sure that where I put the code would be compatible to the module loading process, and I’d need to be sure ImageCache was both installed and loaded before running the following code. Otherwise it would error out, and no ImageCache presets would be created.

Drupal has a crucial hook for modules. hook_init() allows you to perform tasks every time the module is loaded. In this case, I wanted to tell it to run a function and check for two default ImageCache presets. If they didn’t exist, create them. This approach solves three issues:

  1. Getting around install profile limitations
  2. Provide default ImageCache presets for Billboard module when it is enabled
  3. Recreate the ImageCache presets if they are accidentally deleted by the user (or developer :) )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
function mymodule_init() {
    mymodule_create_default_imagecache_presets();
}
 
function mymodule_create_default_imagecache_presets() {
 
    $default_size = imagecache_preset_by_name('mymodule-default');
    $thumb_size = imagecache_preset_by_name('mymodule-thumb');
 
    if (count($default_size) == 0 || count($thumb_size) == 0) {
        if (count($default_size) == 0) { 
            $mymodule_default_size = "600";
            $mymodule_thumbnail_size = "80";
 
            $presets = array();
 
            // Default size.
            $presets['default'] = array (
            'presetname' => 'mymodule-default',
            'actions' => array (
 
                  'weight' => '0',
                  'module' => 'mymodule',
                  'action' => 'imagecache_scale',
                  'data' => array (
                    'width' => $mymodule_default_size,
                    'height' => '',
                    'upscale' => 0,
                  ),
 
              ),
            );
 
            imagecache_preset_save($presets['default']);
            $presets['default']['actions']['presetid'] = db_last_insert_id('imagecache_preset', 'presetid');
            imagecache_action_save($presets['default']['actions']);
            imagecache_preset_flush($presets['default']);
            imagecache_presets(TRUE);
 
        }
 
        if (count($default_size) == 0) { 
            $presets['thumb'] = array (
            'presetname' => 'mymodule-thumb',
            'actions' => array (
 
                  'weight' => '0',
                  'module' => 'mymodule',
                  'action' => 'imagecache_resize',
                  'data' => 
                    array (
                      'width' => $mymodule_thumbnail_size,
                      'height' => $mymodule_thumbnail_size,
                      'upscale' => 0,
                  ),
 
              ),
            );
 
            imagecache_preset_save($presets['thumb']);
            $presets['thumb']['actions']['presetid'] = db_last_insert_id('imagecache_preset', 'presetid');
            imagecache_action_save($presets['thumb']['actions']);
            imagecache_preset_flush($presets['thumb']);
            imagecache_presets(TRUE);
 
        }
    }
 
    return;
}
?>

What that says basically is ‘hey, do our default ImageCache presets exist?’ if not, it will create them at runtime.

I have tested this a handful of times with positive results, and, it works with install profiles since hook_init() is called after Drupal loads. Food for thought for all you Drupal developers out there. If there is a better way to achieve this feel free to leave a comment.

Submit Article :- Digg + Del.icio.us + Google Bookmarks + Reddit + Technorati

Tags: , , , ,

How to beat GaxKang the Unbound

November 17th, 2009 / No Comments » / by Kevin

I really thought this was one of the easier bosses in the game, and yes, I have faced off against Kangaxx the Lich in BG2 (one of the hardest bosses in any game I’ve ever played, period). It took me at least 30 solid tries against Kangaxx before winning, but Gaxkang I destroyed on the first attempt at level 19. Nothing to it really.

If you are fairly well prepared, you should have spirit resistance and a mage in your party (see a pattern?). When GaxKang appears, have a mage throw Cone of Cold or Hold Person to hold GaxKang in place, then start laying hexes down on him to lower his resistances. Keep the aggro on your tank, keep the party above 50%. Pretty standard fare as far as boss tactics go, but apparantly people are having a harder time with him than the High Dragon or Archdemon. Personally I don’t think its all that tough, its just the perception of difficulty since you are in a very small room to fight. I think the Sloth Demon was a hell of a lot harder because he had so many forms to defeat. Gaxkang isn’t so bad, you just need to interrupt his attack rhythm. Plus, if you have Zevran or another rogue, coat their weapon in any Magebane poison to disrupt his casting ability.

He drops a Keening Blade, warrior only. It’s kind of lame, versus what you usually would get from a boss like this. Most people like to get loot that their main/custom character can use, and if you are not a warrior you are screwed here. I chose an assassin for the combat difficulty (it didn’t seem to matter) and fun, and there aren’t any rogue-specific gear in the game but a ton of warrior/mage only stuff. Design oversight? I wasn’t too happy with loot drops overall in Dragon Age being a Baldurs Gate veteran myself, but eh, what can you do. I’ll play through it again in a few months.

Submit Article :- Digg + Del.icio.us + Google Bookmarks + Reddit + Technorati

Tags: , , , , , ,

How to beat the Archdemon

November 15th, 2009 / 16 Comments » / by Kevin

Here we are, final boss, the capo di tutti capi (boss of all bosses), the big bad Archdemon. This fight takes place on top of Fort Drakon, and I have to say the Tolkien influence really shows here. Before you can even reach the fort, you have to fight through the main sections of Denerim through, I shit you not, at least 300 darkspawn including lieutenants and Generals. The Generals are no joke- I believe they are a mix of Champions, Reavers, and Blood Mages; they are pretty tough.

Depending on how you played through the game, you will have 4 groups of CPU controlled allies you can summon at will. I had humans, dwarves, elves, and magi to use. Without these troops, the final battle is pretty impossible to say the least, as there are waves and waves of darkspawn that come out at you as you battle the Archdemon.

The best strategy is to save your allies for the final fight. You may want to call in the dwarves when dealing with the darkspawn Generals, because the adds during the fight are a pain in the ass. You could just as easily though cast AOEs with Morrigan and be alright. The Darkspawn in this final encounter are different. The generic enemies have very little HP (names are white) and go down in one or two hits. There are a good amount of lieutenants here though (yellow names) who take a bit more of a beating. The Generals are full on bosses (Orange names) and there are two of them. They have a ton of HP and lots of status ailment type spells, hexes, and direct damage spells.

Since you cannot leave this area after you enter Denerim, be very careful when and where you choose to use poultices and balms. You won’t be able to get any more. There is one vendor just before the final area (why does this keep happening in RPGs?) who has a few balms and poultices, but not many. You will want to have a lot of spirit balms and greater or better poultices. I had 30 greaters and potents, and used 22 of them in the final battle.

My party is the same as it always is. The Archdemon is different than a regular dragon- it uses spirit based attacks and not flame. So equip your party with the very best gear you have, like large flawless spirit crystal for Shale (40% spirit resistance) and make sure they have a spirit balm active to up the resistances even more. You are going to need it.

When the battle starts, summon in Dwarves or Humans to start chipping away at the Archdemon. They aren’t going to do much, but the point to this is to keep the Archdemon and darkspawn distracted on them while you get to the nearest ballista. A ballista shot will do between 50-100 damage on the Archdemon, and you can get 3-5 shots from a ballista before it ‘breaks’. You can then run to the next one that is in range and use it, or, if you are a rogue, you can repair the broken ballista once or twice for another round of shots.

Once you reduce the Archdemon’s HP to 50%, the fight starts to get a lot harder. It will summon in waves of darkspawn against you. Make sure you get Morrigan or any caster out of harms way, and keep anyone healed who needs it. If they drop to 75%, heal them. Take your main and find the next nearest ballista to hit the Archdemon, at this point it is situated on a platform no one can reach except for ranged attacks like bows, ballistas or spells.

After the first few waves of darkspawn are dispatched, the Archdemon will fly back into the main arena and you can start melee’ing it again. It’s really a test of endurance- just keep your tanks healed, put hexes on it with your mage, and keep using ballistas to do significant damage. If you run out of allies, summon more. You will eventually pull through the fight and win. Sadly, you don’t get any loot from the Archdemon. You do get to see a cut scene and epilogue, and the chance to continue playing the game. I’ve already done all that you can do in the game (including killing Gaxkang the Unbound) so I guess I will have to wait for DLC.

Submit Article :- Digg + Del.icio.us + Google Bookmarks + Reddit + Technorati

Tags: , , , , ,