New Kohana module: Kohana-CoffeeScript

No Comments



So I sort of fell in love with the elegance of CoffeeScript the other day, but the issues surrounding actually using it were preventing me from really giving it a go. Primarily, I was having problems with the whole “you have to compile it into javascript before you can use it, meaning every time you make a CoffeeScript change, you have to manually run a compilation on it” issue.

However, I’ve already written a module for Kohana to minify and combine Javascript files – this is an area I already have experience in!

A short while later, and blammo! A CoffeeScript compiler module for Kohana was born. (Yep, module births make the “blammo” noise. I’ve heard human births sound different, but let’s not go there.)

There’s instructions on how to use it at the link above, but basically, you just install it, enable the module, and pass your CoffeeScript files to the module’s compile() function in an array. It’ll either spit back a script tag or the script URL, whichever you need.

Hopefully this makes it a little easier for Kohana folk to get into CoffeeScript.

On Being Lucky

1 Comment

There’s an old joke about being lucky that I just love:

Every night for thirty years, Earl got down on his knees before bedtime and prayed to God:

“God,” says Earl each night. “Please, please, please! Please let me win the lottery tomorrow.”

Finally, on Christmas Eve after thirty years, God speaks to Earl. “Earl, I’m going to grant your wish. Tomorrow you will win the lottery.”

Earl, on hearing the news, is overjoyed and starts jumping and clapping and shouting Hallelujahs.

“But Earl,” says God. “First do me one thing – this one thing that you so far have never done for me.”

“Anything!” says Earl. “Lord, I’ll do anything to win the lottery!”

“Earl,” says God. “Earl. For crying out loud, go buy a ticket.”

The punchline is the same line that the Ontario Gaming and Lottery Commission used to use for its ads: “If You Wanna Win, You Gotta Play”. Now, far from advocating that you should play the lottery (a losing bet, if there ever was one) – the point is that if you want to live a lucky life, you have to Do More Stuff.

Seriously, it’s that simple.

I consider myself pretty lucky, honestly. My new job? A HUGE longshot. I applied to a position in a city I’ve never been to, admittedly fairly weak on one of the areas the job posting stressed was critical. If I’d never applied, I wouldn’t have gotten it.

During my trip to PAX Prime last year, I made an excellent group of friends on the Tri-wizard Drinking Tour. I could have stayed in the hotel that night and gotten extra sleep for an early start to PAX, but instead I went out and Did Stuff and met some great people.

Or even how about my move to Ottawa four years ago? That put my career ahead light-years more than anything I could have accomplished by staying in Kingston. I caught a bunch of lucky breaks in jobs up there. And none of them would have happened if I hadn’t have gone out and tried.

Think about it in terms of physics: A thin sheet of ice will melt way faster than an ice cube of equivalent mass. Why is that? The sheet of ice has a greater surface area, thus more heat can enter it in the same period of time. It’s the same thing for luck. If you go out more, talk to more people, engage in more competitions, or apply for more jobs than someone else with the equivalent qualifications, you’ll simply be more “lucky” than them.

Sure, you’ll strike out as often as you get lucky. Hell, probably more often, honestly. But you’ll get lucky WAY more often than if you’d just stayed home and leveled another alt to 85, I guarantee you that, and you’ll come to forget about the times when things didn’t go right. Catch a couple big breaks – and you will, if you’re persistent – and the little misses will stop stinging.

And then you too will be lucky.

The “Decline of WoW”

No Comments

First, go read this.

Now, since none of you did, here’s the tl;dr version – Warcraft is turning into an online game, not an online world, because that’s where the huge playerbase and money is.

I’m actually not too upset about this. I’ve been feeling it for quite some time – since Wrath, basically – and even BC had a hint of it. I’m just not that invested in Warcraft any more, so it doesn’t hit me so hard.

What does bother me though is the relative non-popularity of virtual worlds these days. I always felt there was such great promise in VW-style games, and it saddens me to see that they’re not as popular or common-place as I’d hoped.

That said, maybe it’s for the best? I mean, it’s still very possible to create a laser-focused VW that targets a specific playerbase and be profitable, if not wildly so. With a less-broad customer base you can focus on tailoring the game to their expectations specifically and not spread yourself too thinly.

For example, you’ll never see dungeon finders and instanced dungeron-style play come to Eve, which is nice. More money and dev time spent on making market improvements or letting players set up cooler bases, etc.

Plus, this gives smaller studios a chance to really shine – you don’t have to worry about competing with World of Warcraft any more – it’s in an entirely different genre.

I really hope this ends up being the case – I’d love to live in a world where there’s hundreds or thousands of virtual worlds to go hang out in, each focused on a very specific theme or gameplay element.

Social Game Review – The Oregon Trail

No Comments

A note about format

The weekly thing isn’t really working for me, so these updates – like everything else on my blog – will be sporadic. The problem with trying to do one game a week is that some games just aren’t good enough to stick with for a full week, and thus a long time may go by before I’ve given a full week’s worth of attention to a game. Basically, when the game runs out and all that remains is the retention mechanics, I lose all interest.

A note about FarmVille

My next review was going to be FarmVille – the big granddaddy of social games. But I couldn’t even get an hour into that stinker. It’s nothing but retention mechanics!

From the vapid, insipid smile of the main character, to the tinny, tedious music, to the thirty-second intro that ends with a “Come back tomorow!” – the whole short experience was negative. There’s no game here at all, just a bunch of barely disguised ploys to get people to keep coming back.

It’s actually refreshing to see how far Zynga has come. FarmVille is obviously a naked grab for attention and cash, while CityVille was an enjoyable little game (even if it got mired down in requiring viral participation and silly retention mechanics). With the resources and talent they have available, I’m looking forward to their future entries into this space.

A game with history

The original Oregon Trail was written in 1971, and has since then entertained generations of youngsters who would otherwise have been saddled with crappy “Math Blaster”-style games in their classrooms. It was a game of epic scope and challenge, and nearly infinitely replayable – you could choose different professions and loadouts when you began, and faced different challenges on the trail every time.

It was not a game to baby players or hide the ugly truths about history from them. Characters in your party – characters you often named after friends and family – could and did die from dysentery, snakebite, and drowning with a frightening frequency.

I’m happy to report that the modern Oregon Trail on Facebook brings forward all these classical elements while updating the game to be more palatable to modern players who expect better graphics and the ability to crow about their achievements to friends.

A game with problems

I have to get this out of the way first – when this game first launched, it was kind of terrible. For the first few critical days of its life, it was laggy as HELL. I mean the Flash, not the netcode, either. No matter what browser or computer you ran it on, you’d get framerates in the mid-single-digit, and not much better. Normal play was difficult, and one of the minigames was nearly impossible.

Thankfully, this all seems to have been fixed as of today with a new release of the Flash client, and everything is just as quick and smooth as you’d expect and demand. I wonder what they changed?

The game!

For those who somehow don’t know – Oregon Trail challenges you to take your family from Independance, MO across America to Oregon City – a journy of about 2000 miles. You choose your profession, customize your wagon, and choose from a variety of supplies before you leave, vastly changing the difficulty of the trail. Some selections are, of course, locked until you gain higher levels, which means you’ll have to make multiple attempts at the trail before you have access.

Along the way, you’ll encounter nuggets of gold you can pick up, rivers you have to ford or float across, bandits who will try to rob you, and a whole host of random events:

  • Sand storms or mud that will slow down your wagon,
  • Snakebites, fevers, and dysentery which can drain the health of your party,
  • Or even good things like having your oxen “spooked”, which makes your whole party travel faster.

It’s funny, though – normally the rest of my party is sick and injured, while I’m just fine. For reference, this is what most of my game looks like:

Everyone Sick But Me

“Come on! Why can’t y’all keep up?”

But, also in keeping to the original game’s roots, occasionally you’ll come across reminders of you or your friends’ previous trips:

The spot where Jacob Died.

I guess Jacob didn’t make it that time.

Mini-games

In addition to the main game of trying to deal with the little obstacles placed in your way, there’s a few mini-games used to represent some of the struggles faced by settlers along the trail.

  • Over time, your wagon takes damage, and you can play a sort of Tetris-like game:
    Repairing Minigame
    You place the blocks from the bottom into the slots up above, and the fewer you use, the more you repair your wagon. It remains fun, regardless of the number of times when I’ve needed One Specific Piece to finish my repair perfectly, and Something Freaking Else popped in at the last minute.
  • When you run out of food on the trail, you can go hunting for wild game:
    Hunting
    Click to move, click to shoot. You need to focus on the larger game – buffalo and bears – to take home any significant meat, which is nicely balanced, because they attack back.
  • Occasionally, you run across a river that has to be floated down, and you play a white-water rafting minigame:
    River Rafting
    Pick up coins and crates while avoiding the rocks. It’s a much faster way to travel than hoofing it, that’s for sure.

Monetization

This game is monetized beautifully – pretty much every bad thing that happens, you can buy your way out of for “Trail Notes”, the in-game paid currency. However, I never felt like I HAD to do this, which is a pretty sweet balance. In fact, the things I found I *did* pay for were unlocks. For example, you can’t access certain wagon parts or certain trails until you reach a certain level, OR you can pay Trail Notes to access it immediately.

I do wish I’d bothered to buy my way out of the recent flood I suffered. I’m playing a Banker who gets bonuses if he manages to drag trade goods all the way along the path, and the flood wipe out 5/6 of the trade goods I was carrying. That really hurts.

Also, you can pay Trail Notes to refill your Energy (used to play mini-games) or your Stamina (required to travel), though levelling up does the same thing and happens often enough to make paying rarely necessary.

Viral channels

In general, all the viral channels are in place, but I wish this aspect had been flushed out a little more. There are a few things I wish I could have bragged about to my feed that I found I couldn’t.

You can still tell your feed when you made it to Oregon, or when a party member died, or when everyone died anyway, which is the important part.

A good port, a good game

I really feel that The Oregon Trail is a faithful re-interpretation of the original game – it feels much like the original did, and passing by someone’s tombstone on the side of the trail still fills me with that same glee as before – “I’m making it further, yes!” It’s fun to play, there’s a real sense of accoplishment when you finally make it to the end, and even re-starting is neat because of all the profession and wagon unlocks you earn along the trail the time before.

Blue Fang did a bang-up job on this game, and they have every right to be proud of it.

Membase on Windows 7 – IP Address Fix!

2 Comments

Membase is truly an awesome piece of software – a really cool noSQL solution, if you’re looking for one.

Where it really shines (for me, anyhow), is that it’s the easiest way to install Memcache on Windows 7. Membase’s programming interface is the same as Memcache’s, and indeed it’ll even function directly as a Memcache server with no DB backup.

However, I kept running into one awkward problem – it bound itself to my external IP, and as soon as I swapped my laptop to another network where I was assigned a different IP address, it stopped working.

Thankfully, after copious Googling, I found the answer. Reproduced here, just in case the other link dies:

service_stop.bat
service_unregister.bat
service_register.bat ns_1@127.0.0.1
service_start.bat

Now Membase is bound to the loopback IP address and it doesn’t matter what network you’re on – it just works!