Thursday, 26 November 2015

PHP include checking mechanism; try..catch alternative

Including outside PHP files into your script is good for code maintenance.

A regular include line looks like this:

include '/location/to/script.php';

If include fails to process or locate the file, it will post an E_WARNING and your script continues. Include does return a true(1) on success and false(0) on failure. Meanwhile, includes sister function, require, will stop your script in its tracks on failure; both do not throw a catchable exception.

Here are 2 simple, and similar, checking mechanism for including files into your PHP scripts and catching the failures for processing:

1.
$check =
(include $_SERVER['DOCUMENT_ROOT'] . '/location/to/script1.php') +
(include $_SERVER['DOCUMENT_ROOT'] . '/location/to/script2.php') +
(include $_SERVER['DOCUMENT_ROOT'] . '/location/to/script3.php');

2. or:
$check = false;
$check += include './location/to/script1.php';
$check += include './location/to/script2.php';
$check += include './location/to/script3.php';

Then for each of the above you can just test $check

if($check != 3){
    //handle what you want to do, throw error etc
}

You could also wrap the include mechanism in your own function that throws a normal exception and then use the regular try, catch block exception handling in your calling code.

Monday, 9 November 2015

Elona Plus / Elona+ Review


What happens when you mix crazy Japanese memes with a rougelike RPG? Elona happens, or more specifically Elona Plus (Elona+) happens.

Elona Plus is a very heavily modified roguelike, probably based on the roguelike ADOM, featuring an expansive overland map, day/night weather cycles and stacks of Japanese otaku cliches.

Originally created by Japanese developer Noa, the newest fork of the game, Elona Plus, has been continued by developer Ano. Because of Elona's Japanese origin the English translation is dicey, especially in newly released areas.

Warning: Elona Plus contains some very mature content. On the surface, Elona may seem like a light-fun, roguelike variant, but it doesn't take long for its true nature to be revealed. Elona does come with a proper mature content warning for a reason. As an example of these mature themes, a friendly NPC tries to trick the starving player into eating a human corpse in the tutorial as a joke - in the tutorial for god's sake, as a joke.

Elona Overworld
Dark humor aside, Elona has tried breaking the mold of the traditional roguelike. Instead of conquering the traditional randomized single dungeon, players can freely choose how to progress throughout the game. Game progression isn't based on dungeon level or even player level, but with rare tiered equipment and overall character stat development. Spending real life days and virtual months in one of Elona's cities grinding skills is not unheard of and grinding can become a hefty part of the game; technically, heavy RPG grinding is just another Japanese trope.

Elona does have a main story with associated "main" dungeons. The story is separated into dungeon stratas, but most players will end up bashing the first main quest related dungeon after a few days of heavy skill grind. Notable dungeons include the Puppy Cave - a randomized noob dungeon - and the dungeon of Lesimas which features the original Elona's main quest.

Random dungeons, hard-coded areas and cities are spread across the map. Player characters (PCs) can enter any area at any level, so there really is no clear restrictions on content difficulty. Having no restrictions offers a great amount of freedom and potential for exploitation by the player.

Warning: entering high level dungeon when you're low level is asking to be slaughtered by a tyrannosaurs or alien queen or something much, much worse.

Elona Cyber House
Dying mechanics work differently in Elona too. Many roguelikes feature permanent death, but in Elona you can choose to come back to life. Players are resurrected in their home albeit with a skill and attribute penalty. An ironman option exists that restricts saving and resurrection; resurrection and death penalties suffered on ironman are far greater than the standard game mode.

Elona breaks away from traditional roguelikes because of its permanence features: the lack of death means players can focus on and build a single character; the ability to build interactive houses, museums, ranches and shops; the ability to have large groups of companion "pets" that never permanently die; a weather and date system that shouldn't be ignored due to its mutagenic effects; and many more features too long to list. These lasting game elements means the player becomes a part of the world instead of a transient hero with a one way ticket usually ending in their short lives with permanent death.

Elona Character Attributes
Lack of a permanent death system means the gameplay tends to be much looser and swifter. Gameplay can be run step by step too, but players will usually end up running all over the map.

Elona Plus features a whole new post game continent for veteran Elona players to explore and, because Elona has a gene seeding system, starting a fresh game isn't even a total loss of time.

Weeaboos (Japan-o-philes), Otaku, anime and manga fans should feel right a home with the Japanese style references; truly it seems like Elona has been built specifically for these types of people. Other gamers may find the Japanese centric humor fly right over their heads, but enjoy the roguelike gameplay nonetheless.

Over the years I've played a lot of Japanese videogames and I've watched a large amount of anime too, and I hazard to guess that at least a quarter of Elona's references fly straight over my head. Elona is almost a Where's Waldo/Wally of Japaneseyness.

Elona Plus is free-to-play and comes with a stock English translation thanks to having a dedicated English speaking fan-base. The English fan-base maintains a number of tutorials and wikis regarding in depth facets of Elona's gameplay.

If you love Japanese RPGs, heavily modified roguelikes, and don't mind the 1001 Japanese memes you should be right at home. An average gamer could be looking at 100s of hours of play time fully exploring Elona.

You can download the latest Elona Plus here, click on Elona Plus Download and then follow the links to the dropbox or Axfc upload. The English wiki is here for Elona and here for Elona Plus they contain more information and links.

8/10 - 'Gene engineer a horse and a girl. Nothing wrong about that.'

*Beware Adult Themes and Japaneseyness.

Friday, 31 July 2015

Review: Monster Hunter 4 Ultimate (3DS)




Monster Hunter 4: Ultimate Review (3DS)
MH4U Review

Short History lesson start:

Around seven years ago I picked up a copy of Monster Hunter for the venerable PS2 console. I heard amazing things about MH's action, graphics and open-ended gameplay. Playing Monster Hunter solo made for a difficult introduction into the series, but I slowly learned the art of smashing large, dino-like creatures into submission with a giant hammer. The trick was learning a monster's attack patterns and exploiting its openings.

Fast forward a few years later, Monster Hunter Freedom Unite (MHFU) is released for the PSP. Probably considered the PSP's most successful title, it sold millions of units and helped sales of the PSP platform the world over. MHFU amalgamated monsters and gameplay elements from previous games, namely MH:Freedom and MH:Freedom 2. It was very popular, especially in Japan where it became a national obsession.

While playing MHFU, I switched weapons to the great-sword and finally had a taste of Monster Hunter's multiplayer. Monster Hunter was definitely made for the multiplayer experience.

MHFU is one of my most favorite games on the PSP,  next to Tactics Ogre: LUCT.

Short history lesson over.

Monster Hunter 4 Ultimate is another amalgamation title, this time for the Nintendo 3DS handheld, bringing monsters from previous titles into one grandiose game. It also introduces two new weapons: the insect glaive and charge blade. A new monster mounting feature has also been added to the gameplay. Hunters can now ride monsters and topple them over; just like some people do on a Saturday night.

The core Monster Hunter gameplay hasn't deviated much over the years, which is good. If you have a winning formula, why would you change it? You start the game as a new hunter charging headfirst into the monster hunting world. After the opening scene is played through, the player is then given the option of every class of weapon, allowing players not to be hedged into the same starting weapon.

I chose to use the hammer again for some MH PS2-style nostalgia hunting.

Weapon choice is a major decision in this game, as it will effect your play style, how aggressive you can be (or rather should be), and how easily you mount monsters. Weapons are split between blademaster(close quarters) and gunner(distance) weapons; they are then further split into faster and slower weapons. Slower weapons often doing more damage per hit and faster weapons having a higher DPS with faster evasion.

Armor skills help you fight

Most players (I can't speak for all of them) generally end up "main-ing" a weapon. That is to mean, to become an expert or master of one type of weapon. Every weapon type has a distinct attack move set, distancing, evasion, monster weak points and applicable matched skills. Later in the game, some players might start learning another weapon, but beginners should probably focus on one weapon until they become familiar with the game. Choosing a weapon to fit your personality is the first test of the new hunter.

New weapons, the charge blade and insect glaive, offer a fresh choice for new and veteran hunters. The insect glaive is unique because it seems to be made for exploiting the new mounting mechanic. The charge blade seems to mix the defense of the sword-and-shield with the power of a much larger weapon. I've been mostly playing hammer, so I can't really go into depth or comparison with the new weapons. They both seem powerful and fun, they're also really popular, with many guides on the net discussing their features. Most weapons have been revamped from previous Monster Hunter games.

Matching with your weapon will be your armor set. Made out of monster parts, armors have unique skills to help you during hunts, providing many useful abilities such as earplugs or better evasion. Armor sets often turn into a mixed bag affair, wearing gloves from one monster and the chest piece of another is not uncommon. Hunters generally tailor their armor skills to fit their weapon, or to counter monster specific abilities such as wind pressure, ground tremor or poison.

Hi, Tiggy.

Mounting monsters is the new gameplay mechanic introduced in MH4U. Hunters can jump off ledges or use their weapons to jump onto the backs of monsters and deliver blows to topple it. As mentioned above, some weapons seem purposely designed to enable easier monster mounting. When mounted, a player must perform a QTE to topple the monster, while the monster roars and writhes to try to dislodge the hunter from its back. The toppling effect is similar to knocking a monster out in the older MH games.

As in older titles, hunts take place inside a map that is further split into small areas. Forests, volcanoes, glaciers, swamps, sand dunes and arenas are some of the biomes hunts take place within. Most of the areas have different density of ledges which can be exploited for good effect on monsters. The game is very pretty and there is a lot of attention to detail. There's also a fair amount of destructible terrain too, so hunters are never safe just climbing up and waiting on a high ledge.

Here's a tip: If a monster sets you on fire, roll through some water on the ground to put it out quickly.

Maps are littered with resources such as: insects, ore, plants, mushrooms and even monster dung. Most items can be used or combined to provide benefits to hunters. Items include healing potions, traps, bombs, power ups and much more. Learning about items, their effects and when to utilize them is a process in itself. Mastering items early on will help you when things get more serious during longer missions later in the game.

MH4U's quest system is split into single player caravan quests and multiplayer guild hall quests. Guild hall quests can be tackled alone, so if you hate people, or need to test a strategy, you can do it without bothering other players. There are also special arena and event quests, event quests are special missions for challenge and fun which may unlock unique armors or items too. New to MH4U are expeditions, these missions require hunters to fight monsters for caravan points that can be later redeemed for items. Generally expeditions are best exploited later in the game, as the early game rewards aren't really worth the time investment.

Hammer time!
Now we come to the crux of MH4U - the grind. You'll grind for armor, you'll grind for weapons, you'll grind for pretty much everything. Some people like grinding games, as it takes a long time to have the best of everything, and gratifying when you finally do get something. But grind also artificially inflates playing times, as you end up killing the same monster for the 30th time for that 1-3% chance rare item.

Japanese gamers don't seem to mind grindy games and instant gratification is not something Monster Hunter easily gives out. Although some multiplayer quests can be very done quickly with a powerful and experienced team or a highly coordinated team. Young millennial gamers may find this style of game intimidating or at worst overwhelming, and may not have enough dedication to reach higher levels.

To ease the plight of new gamers into the series players may now have up to two active felyne (cat NPC) companions. Your felyne buddies will take some of the monster's attention away, allowing for a chance to recover or some time to learn a new monster attack pattern. Felynes are a much larger part of the game than ever before, having their own island, mini-games and storyline. However, if you truly want to go solo, you can also turn off felyne companions, making monster movement even more predictable for pro-hunters.

Multiplayer is a huge part of the game experience and it's where MH4U really shines. Grab you buds, grab your girlfriend, grab your dog, your uncle and that bum down the street, and get your monster hunting on. Ad-hoc local multiplayer and online multiplayer are used to join other players and friends on a hunt. Unfortunately online seems to be region locked and doesn't seem set to change. PUGs (pick-up groups) are the meat of the multiplayer experience, with up to 4 players able to join a mission, difficulty scales as more players are added into the party.

At the end of the day, wrecking and being wrecked by monsters is what the game is all about. Hitting the monster until it dies is simplistic but actually sums up the game very well. There really is only one difficulty - hard - but when you learn the game mechanics - normal - and once you learn a monster's patterns - easy. Gamers can easily pour hundreds of hours of their time into MH4U and many in Japan already have. Personally, I have sunk over 400 hours playing this game and I still haven't seen or done everything that's available.

Did I mention the game is slightly addicting too? At its heart MH4U is a learning game, attached to a learning curve that puts most western games in the last 10 years to shame.

MH4U is probably the best in the Monster Hunter series so far, having more monsters, more weapons and even greater depth - helping propel it higher than all other MH games to date. I recommend playing with friends and/or strangers to enjoy MH4U to its fullest.

10/10
-If you like grindy games.

8/10
-If you hate grind, you'll probably end up dropping MH4U after 80-100 hours.

Thursday, 30 July 2015

Hi Everyone! I'm back, let the game reviews begin!

Hi Gamers,

Stuart (Me) was working at the start of the year and didn't have time to review games. I have been playing a bunch of games in my spare time though. Recently this has included Monster Hunter 4 Ultimate and Fire Emblem: Awakening on the DS; and Xenonauts, Jagged Alliance 1.13 and Shogun 2:FotS on the PC.

The first review will be Monster Hunter 4 Utlimate, followed up by Xenonauts, hopefully.

Edit:

Blogger is telling me I need to have warning message for people in EU regarding cookies.


EUROPEANS - WARNING!

Google/Blogger uses cookies to track your web movement, details and activity. This does have privacy implications! This is a warning! Beware! Danger, Will Robinson, Danger!