Friday, 27 February 2015

Elder Scrolls

I've been playing Skyrim this week. So basically this game is incredible. Sure, powering up is a little too weighted around smithing, but I rarely mind broken systems in single player games when you can just up the difficulty or choose not to use them.

I was doing some reading about Elder Scrolls VI that rumours say may be coming out next March. Of course I think that would be the console version and the PC port might be a little while after that. I'm very bored with most games these days, and feel like it's a long time to wait.

I've been contemplating checking out Elder Scrolls Online recently. I've just read that they are moving away from subscriptions to a buy-to-play model next month, so my parental leave might be the perfect time to give it a whirl.

I'm sure I'm not the only person who wishes that Elder Scrolls Online was Elder Scrolls VI instead, perhaps including those at Bethesda. Last I heard Elder Scrolls Online actually had a large number of subscribers - more than half a million - so I'm sure it wasn't a total bust, but I don't know if it lived up to their expectations or not, especially if they are continuing to sink development resources into it.

The reason I might want to try to Elder Scrolls Online is that I would really like another game to just play around in and level up a character in. The reason I might not want to try it is that there will be other people playing too.

Skyrim and Oblivion have been my antidotes for other people in gaming. The worlds of those games were so much richer than any MMO world I have experienced, and that was because there wasn't anyone else around to mess things up. I haven't played Morrowind, but the way everyone talks about it, it sounds like it was as good or better.

In the meantime, if anyone knows a great RPG with a huge open world to explore that I could play instead of replaying Skyrim, I'd be interested.

Tuesday, 24 February 2015

All In!

Ads in the subway say that I can now buy lottery products from my government online! Woo hoo!.

Lotteries are awful and more generally general government revenue from gambling is a sickness. No one would think that a tax that charged random amounts to random members of the population with a specific emphasis on the poor and the uneducated was a good idea, and government-run gambling is indistinguishable from that.

But what I want to talk about is the ads themselves. A happy looking man stands in the middle of a variety of gambling paraphernalia like playing cards, dice and poker chips. The cards are fanned out around him like a streamer, the dice are rolling on all sides, he is having a good time.

Now, it appears to be an entire deck of cards, maybe several, in random order. But as the streamer goes around him, of course, some of it is directly in front of him. The first time I looked at the ad, my brain parsed five of the cards as "his hand" because of their placement in the image. Sure, there are other cards nearby, but those ones just jumped out at me as the five cards that were laid out in front of him.

And what are those cards? A two, a four, a five, a seven and an eight of a variety of suits.

I honestly don't think this could possibly have been on purpose. I'm not even sure if other people would have the same reaction as I did and pick those cards out of the image as his cards. If everyone does have that reaction, and if it was intentional, then the image designer is some kind of mad genius of manipulation.

I think that maybe it's because I don't think it was intentional that I find it so tragicomic. Somewhere out there some morons who can't get their head around the idea that a dollar is a dollar, who can't imagine what's wrong with governments creating incentives for people to harm themselves, also don't realize they've inadvertently created an iconic image of a problem gambler - a man who is thrilled to have a gutshot straight.

Monday, 23 February 2015

Hearthstone Over-the-top Aggression

Reading about Hearthstone on Ziggyny's blog has gotten me interested in Hearthstone again. I mostly want to build my collection, so my goal in playing constructed is just to complete quests. The best way to do that is to play really fast games. Even if my win percentage is a little lower, it's much better to be winning and losing games on turn six or seven than winning or losing them on turns 13 or 14. If your goal is to get your quest gold and stop playing.

I try to swap out my quests for higher gold ones which means targeting the win five games with a particular class quests. Recently I had to win five games with a warrior or a rogue.

I started by putting together the most aggressive rogue deck I could figure out. The deck didn't work out very well. I had one fantastic turn where my opponent had just cast a Muster for Battle removing the last three durability from his Sword of Justice and killed a minion of mine leaving me with a 1/2 Anub'ar Ambusher. I got to cast two Knife Jugglers, then a Defias Ringleader, then attack into one of his 2/1 guys with the ambusher, bouncing the Ringleader and replaying it, for a total of 9 triggers, killing all of his guys and leaving me with 5 minions. But that was the only game I won, and that was a tight game.

So I decided to make the most aggressive warrior deck I could and started playing with it.

Something I learned while playing this deck is that if you are low in the rankings, nearly everyone is playing aggressive decks. What's more, nearly everything thinks that they are the beatdown. Probably whatever website they got their decklist from told them to always go for the face. I've seen that advice myself.

But obviously that advice has to be qualified. Some cards, like Raging Worgen are warning signs that you need to stop and rethink who wants to be in a race. You need trade off your 3/2 for it, not attack their face. You don't want to take 18 on your opponent's third turn. Frothing Berserker is another one that should give you pause, it can get to seven or eight power in a hurry.

I have an aggressive warlock deck that probably wins more games than my warrior deck, but the warrior deck is definitely my favourite. I don't even have all the cards I should for it, but it doesn't really matter. Laying on that beating is such a nice feeling. I've won a few games on turn five, and that's blisteringly fast.

Friday, 20 February 2015

First Frozen, now This?

I was perusing one of my regular sites for news when I came across a headline about the Bachelor. First of all, I don't watch the Bachelor. Secondly, it's embarrassing to admit that I read a website that would publish an article about the Bachelor. To be honest, I sort of wish I was saying, "The Bachelor, what's that?" But the reality is that summaries of the most recent episode of the Bachelor are found on many major news sites.

Now normally I would just skip by such an article, but this one had a curious detail. Apparently on the most recent episode of the Bachelor the woman who was kicked off was a Playboy model. I scanned the article to see if she was kicked off because she was a Playboy model, and it seems that there was a lot of reassurance that this was not the reason - reassurance of the kind that makes you think it was definitely the reason.

First of all, the idea that a person wouldn't want to be with someone because that someone is currently employed as a sex worker or porn actor seems like something that I can understand. That's not to say I agree with that decision, but I can imagine, especially on a first or second date, that person might decline to continue such a relationship for a variety of reasons that don't say super-awful things about the person doing the declining. If nothing else, it might be asking them to transgress existing boundaries they have about monogamy when it is just too early in the relationship for them to commit that much.

But let's dial it back a bit here. This was not sex worker or a porn star, this is someone who posed for Playboy. I'm not even sure if it seems right to call Playboy pornography anymore, it's just nudes. You can probably see racier stuff at any art gallery. Women appear nude in photos in fashion and style magazines. At this point, if someone is reading Playboy, it is almost certainly for the articles, because actual sex can be watched on the ubiquitous internet.

I've never dated someone who had posed naked for photos to be published. I did once go on a date with someone who was planning on dancing in lingerie in a shop window in exchange for store credit the following morning. I certainly didn't say, "Well, I guess there's no future for us."

And to put all of that aside, the fundamental question that arises from this is: How could posing nude for Playboy possibly be a more embarrassing fact about your past than being on the Bachelor? It's possible that just talking about the Bachelor is more embarrassing than a nude photo shoot could ever be. Remind me to delete this post when my children are old enough to read.

Thursday, 19 February 2015

Hand of Fate

I got swindled into buying Hand of Fate, the deck-building rogue-like action RPG on Steam. Saying I was swindled probably makes it sound like I think the game is terrible, or that I was horribly overcharged for it. I don't really think any of those things.

Actually the game has some great things going for it. It starts off kind of slow and easy and doesn't show you it's potential for a little bit, but once you get into it the difficulty ramps up pretty quickly and the deck-building aspect of it starts to become interesting.

In the game you build a deck of equipment cards and a deck of encounter cards. Depending on which scenario you pick the dealer adds some extra encounter cards to your deck. The encounters are shuffled up and dealt out to form a board that you move your piece around. Each board has an exit that brings you to a new board where you continue through your deck. Eventually you'll get to the end of the game and the board will have a boss on it.

Many encounters are resolved by making choices and drawing randomly between 'Success' or 'Failure' cards, but combats are resolved in isomorphic action where you run around and beat things up with your sword, axe, or mace as appropriate.

In addition to trying to find and kill the boss to win the game, many of the cards have a token. If you go through the encounter in a certain way you get the token. Tokens are how you earn additional cards. Some tokens expand in a logical fashion. Successfully weathering a sandstorm encounter unlocks a new desert encounter. Unlocking the token of the lord who is putting a together an army to fight ratmen allows you to remove the ratmen encounters from your deck.

On the downside the game is a little bit capricious, especially with food. Every step you take on the board costs a food. If you run out of food you start losing health instead. Sometimes the way the cards fall is just going to mean you can't keep up and you run out of food and die. I tried to put more cards that will give me food in my deck, but I only have so many.

I also find the transitions between scenes and the time it takes to move cards around to be a little slow for my liking. Finally, the combat isn't exactly inspiring - mostly a lot of dive-rolling around the field and waiting until you can get a couple of hits in - but it's better than Diablo 3.

What I'm really worried about is that I'll basically be able to beat the game and unlock everything in about 15-20 hours of play. That wouldn't be so egregious, but compared to Isaac it's not a very good investment. Of course if you want to count cost per hour of gameplay you are going to have a hard time competing with Isaac, so that's not really fair.

Hand of Fate seems neat, but I'd probably avoid the hook and watch a youtube video before buying it. I might still have bought it. I don't know.

Wednesday, 18 February 2015

Movie Review?

This post contains spoilers for Disney's Frozen. Yeah, that's what I said.

Last Friday, if you asked me what I thought of Disney's Frozen, I would have said that I didn't have any opinion. I knew the plot, vaguely, but I'd never seen it. Apparently people really like it.

Now that I've seen it five times, I have some definitely opinions.


First of all, it's by far the most plot-intensive Disney movie I've ever seen. A lot happens in the movie, a lot more than, for example, Beauty and the Beast. If I wanted to summarize the plot of the Lion King or Sleeping Beauty it would take me two or three sentences and require me to name two or three characters. To summarize the plot of Frozen would probably require two paragraphs and require me to name at least four characters, I might have to mention a fifth to make sense of part of it.

Anyway, despite being much more complex, it is about the same length as other Disney movies. It also has about the same amount of time devoted to comic relief. That means that the plot comes at you pretty fast. If you leave the room to change a diaper you may actually miss something, which is not something I could say for pretty much any other Disney movie. For example, another adult asked, "Are their parents dead? When did that happen?" ten or fifteen minutes after the death of their parents.

I'm not going to say that's a bad thing. The movie expects a little more of the children who watch it than earlier Disney movies, but that's a general trend in movies and TV shows over time - to expect more and more from their audiences in terms of being able to handle many characters with complex relationships. Given the response, it seems that kids can handle the more complex plot.

It does make some of the decisions in the movie feel a little odd, though. The comic relief character gets a song shortly after showing up that has absolutely nothing to do with the plot and that isn't really one of the big selling points for the soundtrack. When I contrast with Hukana Matata - another vehicle to give the comic relief characters screen time - it seems striking how little Olaf's solo has to do with anything. Hakuna Matata formed the foundation of why Simba stayed away from lion society for so many years, choosing to live a carefree life in the wilds instead. That goes by in a flash on the screen, but in the story he is gone for a long, long time, and that bears some explanation. Olaf's song - "In Summer" - from Frozen doesn't do anything except reveal a little big of the character of Olaf, when his character has already been revealed completely by his introductory scene that reveals he is comic relief. I suppose someone could wonder why a snowman is so eager to end the endless winter, but that would take one sentence to deal with.

But speaking of songs that don't really advance the plot, perhaps the most bizarre thing about the movie is that "Let it Go" is another example of this. The centrepiece of the whole movie is about how Elsa feels when she runs away from her life of enforced seclusion to a new life of voluntary seclusion. I get that she has strong feelings about that, but when Anna comes to find her, those feelings don't factor much into what happens at all. The scene with Anna and Elsa in the ice castle is driven primarily by Elsa's desire not to hurt anyone with her magic, which is the same thing that was motivating her since the beginning of the movie. The change she undergoes during "Let it go" isn't really a change at all. Now, unlike "In Summer," "Let it Go" is pretty much the big selling point of the movie. My three-year-old who doesn't know any of the words except "Let it Go" and who probably doesn't understand the theme of the song at all has been walking about singing it endlessly. My older nieces love it too. It's probably the reason the movie was a hit. It just really jumps out at me how unrelated it is to the plot.


These days I'd never pronounce something as not sexist, but I feel like Frozen does a pretty good job. Anna - who is, actually, the protagonist - is extremely determined and confident. She's very wrapped up in the idea of parties, dancing and finding love, but that's actually a logical part of her character who is, after all, a teenage girl who has lived a life of seclusion. Clearly Elsa got the majority of her parent's attention as the child with the big problem, so Anna is attention starved, and dreams of having a normal - for a princess - life when she doesn't really know what that means. Also, the ending scene where Anna and Kristoff kiss is awfully respectful. I'd wager few first kisses are preceded by explicit requests for consent, but it's not a bad model.

Elsa, by contast, shows no interest in romance at all. The very idea of having a sympathetic leading female character in a Disney movie who isn't all about finding love is actually sort of a breakthrough. Not only does she not spend the movie seeking love, romantic love doesn't fall into her lap either. She spends the movie seeking to be herself, and rather than seeking other people.

Family Dynamics

Something I find interesting is that every little girl I know wants to be Elsa, not Anna. It seems very unusual that the character who gets the most screen time isn't the most popular. Now part of this is clearly the fantastic ice powers, which are a big draw, but I recall kids playing Alladin and Jasmine, not Genie and Carpet. I recall kids playing Ariel and the Prince, maybe Ariel and Flounder, not the King and Ursula. My little sister wanted to be Cinderella, not the Fairy Godmother, as far as I recall. I'm sure a big part of this is just "Let it Go" but I think maybe it's a lot easier to understand Elsa's motivations. It's easy to imagine yourself as the one who has to hide, and, I think, much harder to imagine the effect that has on the one who doesn't have to hide. The movie attempts to show what it's like for Anna to be isolated from Elsa, but doesn't really address the issue of what Anna's life is like otherwise. Her parents spend all of their time worrying about Elsa. Anna knows there is a secret reason why Elsa shuts herself away, but doesn't know what it is. Imagine knowing your entire life is being shaped by a secret that you aren't even in on.

Which brings me to my signifiant criticism of Anna and Elsa's parents. Of course Elsa grows up to have no control over her powers, the only message she's gotten her whole life is to hide. "Conceal, don't feel," is not a working message for a child. It's fine to put on a show for social reasons on a case-by-case basis, but you can't live your whole life putting on a show. It should have been obvious that Elsa's powers went off when she was upset, so she needed to learn to deal with negative emotions constructively. She needed mindfulness training, not emotional suppression. Elsa realizes at the end of the movie that while negative emotions make her powers go haywire, love is the secret to keeping them under control. They play that up a bit, but it seems like if being afraid makes you lose control of your powers, you need to learn to not be a afraid all the time, which is the exact opposite of how Elsa was raised.


My sister told me that "Let it Go" is also a bit of an anthem for some queer communities, and that it is taken as a metaphor for being queer and/or trans. Now being trans isn't really the same thing as having magical ice powers, but basically it all comes down to the lines leading up to the first chorus: "Conceal, don't feel, don't let them know / Well now they know." I'm sure for many queer and trans youth who are keeping secrets about themselves, those secrets feel like they are life and death matters, and Elsa's realization that she has revealed her secret and is simply still alive is a pretty powerful message. Elsa transitions from keeping a dark secret, to leaving that life behind, to returning to find acceptance. It's a sorry commen that for many youth that is a fantasy, but probably for many it could become a reality if they were willing to chance it, so it's an empowering message. A point for Frozen there.

Further, baked into Elsa having no romantic interests in the movie is the fact that Elsa's sexuality is never revealed. Even if the makers of the movie were thinking in completely hetero-normatively and assuming she was straight, there's nothing in the movie that actually tells us that, and it would have been quite easy for them to imply it has they been interested in doing so.


Now clearly in time period pieces like this it's not unrealistic that everyone basically looks the same, I'm not going to criticize Disney for failing to making Arendelle a diverse metropolis. On the other hand, this is one of those things where you say - if people can be born ice powers then why are we being "realistic" about race? In a movie with just a few characters it's a hard thing to draw a line under. It's just something to keep in mind when you see movie after movie where all the humans are white.

Of course it's important to say that we are talking about the humans. Magical snowmen don't really count, but trolls are a completely distinct race of beings in the movie. While the relationship between trolls and humans seems pretty good, I increasingly have this nagging feeling about fantasy races and a sort of underlying racism that comes with them. The trolls of Frozen are little bit noble-savagey. I don't know how to get away from this - of course elves will be different than dwarves, who will be different than trolls, who will be different than satyrs. That's especially true when they live totally separately from one another. Still, I think about the relationship between humans and trolls, and about the trolls' deference to the king. Is he their king? Aren't they self-governing?


While moving away from sexism and hetero-normativity, Disney is holding on tight to the royalty-are-awesome trope. Everyone loves the king and queen. Everyone is super proud to be led by them. The trolls revere the king for a reason I can't quite get my head around. Anna and Elsa are clearly portrayed as deserving of the power they were born into.

What jumped out at me the most is that Anna talked a lot about never being around people when the castle has a large staff of servants. I mean, come on. I know that for the purposes of this movie, Anna's isolation is important, and the key is that she was isolated from people her own age, but where were her friendships with castle staff who she grew up around? Ultimately a beloved servant who practically raised Anna wouldn't fit into the movie, both for time reasons and because Anna needs to go up the mountain to find her sister alone but they really made the servants into objects and not people.

Extreme Power

Back to Elsa and feeling isolated, her secret is a life or death matter on a much greater scale than any secret anyone has in reality. Having basically hidden her powers and not practiced with them at all she builds a massive palace of ice in the course of a minute with a mere thought. She touches off an eternal winter in her kingdom by accident by just getting upset. She creates a living, sentient snow creature, again, completely by accident, then having found out she did that she almost immediately makes another living creature on purpose, one with thoughts and a personality that precisely suits her needs. If you had to rate Elsa's power as a magical being on a scale of one to ten she would easily be a nine, held back from being a ten because she is only an existential threat to life in the world she is in, and can't threaten other worlds or time periods. Disney has never posited a being of such extreme power. "Oops, I accidentally killed everyone in the nation, I guess I'll just have to replace them with sentient beings of my own creation," is a heck of a thing to be able to say.

It's true that at one point she is nearly killed two dorks with pointy things, but that just goes back to her never practicing with her powers and really not knowing what she is capable of, plus her desire not to actually hurt anyone. Given the power she displayed, I can think of a lot of ways she could neutralize that threat in both lethal and non-lethal manners.


The worst thing about Frozen is how it cheats you with Hans. As a friend of mine once said regarding a fairly popular movie that had a character who turned from sympathetic to unsympathetic: "Don't tell me how to feel." This movie plays a trick where it gives Anna and Hans a "We're in love" song and dance number and then it turns out they aren't in love. That's a bit of an exciting break from established rules, but it's also a little unfair. When Hans turns out to be downright evil, it's completely unfair. Sure, Anna was desperate for love and easily duped by Hans, but there is simply no foreshadowing of this at all. We are supposed to just sit back and say, "Oh well, I guess he fooled me." No, he didn't fool you, the makers of the film gave you nothing to go on.

I can think of two much more satisfying ways to have dealt with Hans. My preference would be that Hans does actually attempt to thaw Anna with a kiss, and then upon finding that it doesn't work, acts of out despair when he rushes off to avenge her by killing Elsa against Anna's protests. Instead of trying to escape and being rescued by Olaf, she just gives up until Olaf comes to encourage her - which basically doesn't change that scene at all. The twist at the end of Frozen, where the "act of true love" is an act of love for her sister instead of an act of romantic love, obscures what I feel is the real twist - that thawing the frozen heart required loving rather than being loved. It wasn't passively hoping that someone would kiss her in a Sleeping-Beauty-esque fashion that saved Anna, it was sacrificing herself to save her sister. It was her heart that needed to be thawed, so she needed to do something.

In the aftermath, Hans would still be in love with Anna, but Anna tells him that she's learned that meeting someone exciting at a party isn't the same thing as really loving with someone, and that she could never love someone who would try to hurt her sister. I think this would do a better job of capping off the themes in the movie, and it would be neat because the movie would be without a real force of evil.

Alternatively, if you are going to go with Hans as a pure psychopath, I think a more fitting end would be for Elsa to freeze his heart and tell him that he'd better figure out how to perform an act of true love in the next day or so or he'll freeze solid. This ending is 100% inappropriate, but I'd like it better.

Other notes

Olaf's line, "This is the best day of my life, and quite possibly the last," should be "This is the best day of my life. I guess this is the only day of my life." He has been alive for less than 24 hours.

"For the first time in forever" is used to describe both things that haven't ever happened and things that haven't happened in a long time. That's just awful.

Friday, 13 February 2015

Kill Monsters - Get XP - Go Up Levels

Final Fantasy XIII has three leveling systems. You earn points at the end of each battle to spend in the Crystarium to increase your stats and learn new abilities, you find components that you use to increase the level of your items and to transform maximum level items into new items, and there is an element of story based progress.

Basically, you kill monsters, earn experience points, and go up levels, which increases your stats.

The Crystarium superficially resembles the Sphere Grid from FFX, but there are some very important differences. First of all, each character has their own fixed Crystarium - there is no overlap or crossing over to other people's areas of the grid. Second, while there are branching paths, they are extremely limited - there is one main path and the branches only go one or two nodes off of the main path. Third, as you go further on it requires more and more points to buy each node, a price which is fixed by the node, not by how many nodes you've already activated. Fourth, there is no cost to going back to a node you've been to.

If the cumulative effect of these changes isn't immediately apparent, I'll spell it out: This just a linear leveling system. Sure, if you are a little dumb you could keep going up instead of picking up the branching paths, or go up for one job when you could be spending points to max out your other jobs, but basically you'll just be spending more points to get the same stat bonuses. There is one correct way to get the most stats out of your points, and while I don't know exactly what that way is, it is easy to approximate.

The item leveling system is similar in its apparent complexity but actual simplicity. There are a whole bunch of different components you can use to level up your items, but really all they are is different experience values. Low experience value components, when used in large numbers, will add a bonus to future experience earned by the item and high values ones will take that bonus away. So it matters which order you use the components in, but ultimately getting higher level items just means grinding monsters to get components.

Story based progress is a concept I am extremely disdainful of. When its something like learning new summons it makes sense because encountering the summonable entity is a big event, but in FFXIII the Crystarium starts very small and expands only as you hit certain places in the story. The practical effect of this is extremely small as there is certainly no need to grind monsters to get through the early game. It may even be nice because it means that you don't start the game by looking up and down the whole grid like you did in FFX, but rather you max out each section before seeing the next for the first little while.

All of this is just a dressed up system of fighting for experience, getting levels, and spending gold to buy new weapons and armor. The dressing is a little bit annoying because it takes more button presses to achieve the same result. I think this is more than balanced out by the combat system that takes fewer button presses to achieve a similar result, but the unfortunate thing is that I don't think the game will have much replay value. Choice in leveling - well, and just being fun to play -is what makes games replayable. Ultimately there is very little of that.

Thursday, 12 February 2015

Fixed it

I fixed my circular definitions problem with a little trick. Part of the solution comes from the way I was storing the values in the first place. I had dealt earlier with the twin problems of:
  1. Sequencing modifiers to values
  2. Not having advance knowledge of what modifiers would be applied
Generally, if you have a value, such as a number of 2001-esque monoliths you generate per second, and you have different modifiers to that value, you don't want them to apply in a random order. If you look at the code for many idle games you'll see this was handled by putting all of the possible modifiers into a function. So you'd have a function that looks like this:

function monoliths_per_second () { 
     return (1 + game.has_upgrade('Early Hominid Exploration')) 
            * (1 + game.has_upgrade('HAL'))

I don't like this solution because it means that every time you add a new upgrade that affects monoliths per second you have to go change that code. In particular, when I was making my dungeon delving game this was never going to be a workable solution because I didn't know what would be upgrading any given stat.

On the other hand if you simply store the monoliths_per_second as a property of some object, then add one to it upon getting 'Early Hominid Exporation' and multiply it by two when you get 'HAL' then you end up with a different value depending on what order you bought those upgrades in.

Instead, what I'd done is taken every value that I mean to be able to modify from outside and defined it using a function I've written that accepts three variables: an object to put the property on, a name for the property, and an initial value, which is optional. The function added two properties to the object that was passed to it. One was named whatever name was passed to the function, the other was named name + '_handler'. The '_handler' part had three methods of it's own, one to add an 'atom', one to remove one and one to recalculate the value - the last one being called every time one of the first two is. Adding an atom required passing two things: one was a function, the other was an integer to order that function among any other atoms.

So first I'd run H.add_value(objectname, 'monoliths_per_second', 1) and then the upgrade named 'Early Hominid Exploration' would call

objectname.monoliths_per_second_handler.add_atom (function (x) {return x+1}, 400) 

and 'HAL' would call

objectname.monoliths_per_second_handler.add_atom(function (x) {return x*2}, 700)

The objectname.monoliths_per_second property, on the other hand, is a data accessor that gets the stored result of the last computation.

The problem was that if I declared HAL and gave it an "atoms" property which contained an array of objects like {target: objectname.monoliths_per_second_handler, func: function (x) {return x*2}, order: 700} that would be applied when HAL was purchased, I needed objectname to exist at the time HAL was declared because otherwise the declaration would be trying to access a property of an undefined variable.

All I did to fix my problems was that instead of adding 'monoliths_per_second_handler' to the object with monoliths_per_second, I added it to another object that holds all the handlers. That object gets created right away so HAL will see it at declaration time - even if monoliths_per_second is undefined, that's okay. Javascript interprets objectname.monoliths_per_second as a pointer to the property, not as the literal value, so as long as its defined by runtime it will find the right thing.

I've probably put way too much work into this underlying structure, because so far there isn't really a single value that is modified by more than one upgrade. Presumably they will come if I keep working on it, though.

Addendum: That didn't work because I was wrong about how javascript decides whether to pass a reference or a value. However, all the work gave me an easy way to describe what value I wanted to increase in two strings, so now it is really fixed.

Wednesday, 11 February 2015


An interesting but seemingly meaningless system in Final Fantasy XIII is the system of assigning you a score and a star ranking for each battle. I'm not sure if your score or the number of stars you earn actually affects the game at all, I'm also not sure I totally understand why you get a higher ranking or a lower one, but the dominant factor is how much time you take.

Each fight has a target time. If you beat that time you'll get three to five stars. If you don't you'll get zero to two stars. It tells you the target time and your time at the end of each battle, so you know how long they expected each fight to take. Some fights have target times in the four to five minute range, I think some bosses go to eleven or twelve.

Those are very long fights for a Final Fantasy series game. In most of the games you can end the fight in just a few actions and a typical random encounter would be under a minute. I don't mind longer fights, because longer fights are usually more interesting fights.

In Final Fantasy XIII you fight enemies by hitting attack over and over and over until they are dead.

What's strange, though, is that the combat system is probably one of the more deep and compelling RPG combat systems I've played. Each of your characters has a role in combat. There are two different attacker roles, a tank role, a healer, a debuffer and a buffer role. You can have up to six "paradigms" set up and change them between battles. Each paradigm assigns a role to each member. So you might have a paradigm where you have an attacker, a tank and a healer. Another where you have a buffer, a debuffer and a tank to start off tough battles. Another paradigm would be three attackers for the easy fights. You can swap between your paradigms at any time. You only control the actions of the lead character, the other one or two characters in the party act on AI.

So while in another Final Fantasy game I might say, "Wow, this boss is rough, I better cast Protect" I instead say "Wow, this boss is rough, I better swap to the tank, buffer, healer paradigm to get my buffs up, then go tank, attacker, healer". It's exactly what I'd be doing if I were controlling the characters myself, but with fewer inputs.

In fact, you can select the "auto-battle" option for the character you are controlling and relinquish control entirely aside from the paradigms. Unfortunately, this often isn't the right thing to do because your character will mix physical and magic attacks despite having a much higher strength than magic or vice versa. Therefore, you end up pressing attack over and over again as you direct your character to swing their stick.

I think the tactical element of battles in FFXIII combat are probably second only to Final Fantasy X, and having an exlicit timer that tells you whether you beat the time or not makes the tactics much better. I could just stay in attacker, tank, healer mode all the time and win everything but the hardest boss fights, but I want to get five stars so I need to push it a little. Start fights in all attacker mode and try to kill an enemy before having to swap someone to healing; deciding to burn out the last guy instead of tanking him when people are at low health, figuring I can make it; stuff like that. It's all the same tactical decisions I'd be making in other RPGs, but with less choosing things from menus.

Now the thing is that choosing things from menus is one of the big reasons I play this kind of game, so I don't think it's an entirely positive change. But I do think it's an improvement over the classic Final Fantasy ATB system where you feel forced to auto-attack because anything else is wasting too much time in menus.

Tuesday, 10 February 2015

Maybe I Should Have Studied CS

Well, I've hit a really awkward snag that I'm kludging my way through, but what I should have done to begin with is a mystery to me. It's difficult to even describe the problem I'm having.

Suppose I have two different upgrades you can buy, they various properties like a name and a cost and so forth. Each one is an object in the game. If upgrade A modifies how upgrade B works by modifying one or more of its properties, then it needs to be declared after object B in the code. If I declare A first then it looks for B.cost and returns an error - since B is undefined it has no properties.

But when I'm adding new things, I don't want to spend time figuring out what order they have to go in. What's more, I don't want to remove things from natural theme-related groupings to put them in logical order because that makes the code much harder to read and things much harder to find.

What I should be doing is not actually having any of these objects look at the others until run-time, but I think I've structured the whole thing in the wrong way to accomplish that. Essentially I'm left feeling that I need to define certain properties of each object as a function that runs to return the properties that I want them to be, then after defining all the objects, run those functions.

I don't like that idea much because it's really awkward and it is going to make the code look really strange, but I don't see a way around it right now. I can't even pass around a reference to B.cost until B is declared, I would have to pass around a function () {return B.cost}.

There is another way I can think of to do it, which is to have all of the functions that create these objects not create them, but instead add them to an array to be created, and to first run through the array and create all of the objects as empty objects before going through again to assign actual values to all of them. It doesn't matter if B.cost is undefined when I pass it in, as long as it is defined by the time the upgrade actually wants to do anything with it - which won't be until you buy the upgrade.

Anyway, for now I'm just kludging through by reordering things, but I think that's limiting me from doing certain things that I would be doing otherwise.

Monday, 9 February 2015

FFXIII was Half Price, I'll See You in a Month

This post contains FFX spoilers. Holy crap, have you not played FFX? What are you doing. Would you like it? Yeah, I think you'd like it. Maybe you should buy it. You should probably buy it. This post also contains spoilers of FFXIII, but I've only got about 30 minutes of gameplay past the last time they gave me a tutorial section, so it's a spoiler of the introduction.

Probably not exactly true, but when I got FFX at the beginning of January in my last term of university, I missed a midterm in mid-February.

Until Final Fantasy XI I played every Final Fantasy that came out. I didn't get some of the side games, many of which weren't available in English at the time. But I never played Final Fantasy XII or XIII. Twelve still isn't out on PC, but thirteen is, so I thought I should give it a go.

The story has me hooked. I mean, the actual story is sort of in who-knows land right now, but the basic idea of the world is amazing. It revolves around a pretty basic concept for a videogame - the characters live in a utopian/dystopian world where everything is peaceful and nice but fundamentally held together by fear. In this case, the fear is of the world below the hollow artificial moon that the game takes place in.

But like FFX, what I love about the story isn't so much the world or the people, because that all seems very run-of-the-mill fantasy to me. Instead it's the incomprehensible beings of immense power who drive everything. In FFX, which had a fantastic story, it was Sin - a collective dream of the millions of long-dead inhabitants of Zanarkand. In FFXIII it's the fal'Cie, beings of unimaginable power of a nature that I have not yet discovered.

It's totally unclear what fal'Cie can and cannot do, and how their power manifests itself, except for one part which is very clear and central to the plot of the game. Fal'Cie can curse humans, turning them into l'Cie. This marks the humans with a visible tattoo, allows them to use magic and summon eidolons, and also gives them a Focus, which is a quest they must complete. The l'Cie doesn't actually know what their quest is, but gets only a cryptic vision to guide them.

If a l'Cie fails to complete their Focus, they turn into a Cie'th, which is pretty much a zombie. If they succeed in completing their Focus they get to live forever by turning into crystal.

So becoming l'Cie sounds like a really good time. Of course all the main characters become l'Cie, because clearly main characters do two things: use magic and have epic quests. Not super eager to turn into shambling husks or into crystals, and not knowing what they are supposed to do anyway, leaves some of the characters a little conflicted, some of them suicidal, and some of them resolute in their goal to kill some bastards before they go down.

All that drama is fine, especially when played out with Australian-ish accents, but the story has me hooked because I just want to know more about the fal'Cie, what they are and why they do what they do. The part of the story I'm really into, as usual, is the part about the alien others. The human characters are mostly just vehicles to describe that.

That's why I'm a little conflicted between FFVI and FFX as my favourite all time Final Fantasy. FFVI had the greatest characters and the greatest human story, as well as the greatest endgame-you-have-airship gameplay. FFX had the greatest incomprehensible other and the greatest combat system.

Tuesday, 3 February 2015


I took some training today on preparing for and managing change. I filled out their survey and told them that the course was fine and aligned with everything I understood about how people think and behave, but it should be labelled as "neuronormative." That is to say, it assumes everyone is neurotypical and speaks of human beings as though minds come in one flavour.

"Neurotypical" is a word used by the autistic community to describe people who are not autistic. I am not autistic, but I think my brain works more like the brain of a person with autism spectrum disorder than like the brain of the majority of people out there.

You can see the DSM-V criteria for austism spectrum disorder on if you'd like to follow along. What's tricky is that diagnoses are behaviour based. There is no examination into what causes the behaviour. I do have deficits in social-emotional reciprocity. I have definitely abnormalities in eye-contact in conversations. I flip between hyper- and hyporeactivity to sensory inputs like a switch.

Eventually you get to "D" which tells you I certainly don't have a disorder:
D. Symptoms cause clinically significant impairment in social, occupational, or other important areas of current functioning.
As a wise person once said to me, "You have a drinking problem if your drinking is causing you problems." I have a job, a few friends and an engaged family. I manage.

But there is this sneaky "C" in there:
C. Symptoms must be present in the early developmental period (but may not become fully manifest until social demands exceed limited capacities, or may be masked by learned strategies in later life).
Not to sound obscenely boastful, but I don't really do "exceeds my capacity." I'm not the best at everything, and I certainly make a lot of mistakes, but I've never really been in a situation where I felt all that stretched except beyond very short term problems.

Part of this is engineered, of course. When I took the University of Waterloo's Descartes math test in my last year of highschool I answered enough questions to get 60 and then left because I didn't really want to do it in the first place. I got my 60. It's quite possible that if I had banged my head against those other questions for two-and-a-bit hours I had left to write the test there would have been some that I just couldn't solve. I certainly wouldn't have gotten 100 in any event.

When I raided in WoW I raiding with my friends who I enjoyed spending time with rather than raiding with the best guilds in the world. I don't think I would have actually been good enough to raid with the best guilds in the world, and I certainly couldn't put in the time commitments anyway, so it wasn't really an option. I never put myself in the position to fail at that, though.

So I've avoided doing tasks which would properly rank me among others in the top 1%.  I guess my ego doesn't want to be bruised by finding out that I'm really only 1-in-10,000 good at something rather than 1-in-1,000,000 good at something. I mask that with aloofness quite well.

But if I am 1-in-10,000 or 1-in-1,000,000 in affecting ordinary human emotions, or even just 1-in-10 that's pretty much good enough. Most of the time I have the brain cycles to consciously think about how often I am looking someone in the eye when I am talking to them and look away in a thoughtful manner at regular intervals. Most of the time I can remember to put on a happy or at least a serious-but-not-grim face when interacting with co-workers. Unless I want people to think I look sick, in which case they do - I'm honestly not sure what I even do to accomplish that.

My introduction to autism was through a friend who was reading Temple Grandin. Temple Grandin is kind of an autistic community leader, and one of the most articulate people in explaining what it is like to autistic to others. She is also a proponent of animal welfare and a professor of animal science, and she has a remarkable ability to tell what animals want and design improved ways of interacting with animals. This is not an uncommon trait among people who have autism, it is much easier to get along with animals than with humans.

Humans are animals, though. Sometimes I wonder if I essentially fit in with those one the autism spectrum, it's just that my affinity for animals extends to people. That appears to be the best description of my brain that I can muster at the time being - the name I can give to the thing which doesn't have a name.

Monday, 2 February 2015


I've been doing a lot of coding recently. For anyone who liked my little demo in the last fall, I have no idea if I will ever get back to it, but I've got something far more exciting going on now.

I haven't posted anything about the Kittens Game but I've been playing it for a while. It's a town management Idle game with a lot of complexity. Obviously anyone who reads this blog knows I'm a huge fan of Sandcastle Builder, but, as a recent IGN Article explains so well, the complexity of Sandcastle Builder is so outside of normal that it would be impossible and even foolish to try to replicate. Kittens Game is very complex but uses things like wood and minerals to build warehouses and ships, so it's easier to parse. It also doesn't go to infinity.

I wanted to get some of the Kittens Game things-make-sense with just a hint of the alien and the weird math that made Sandcastle Builder great. I have something that is working, probably with a day or two of gameplay before you'd really hit the wall in terms of things to do.

Of course at some point I stop developing and start working on making things work better. Recently it was saving. My save_game function was starting to get pretty clunky, about 100 lines. I rewrote it and did some other reworks, and here it is now:

H.save_game = function () {
    var save_file = {}, i;
    for (i in H.saveables) {
        save_file[H.saveables[i].call] = H.saveables[i].save()
    save_file = JSON.stringify(save_file);

    localStorage.humbabellas_horror = save_file;

That looks very nice, but at a glance it probably looks like I just took those 100 lines of code for saving and broke them off to the objects that want to be saved. That would still be a bit of an improvement, since I think it's much more convenient to have an object know how to save itself rather than having a function know how to do the saving for it, but it's even better than that. The "save" property of these objects is added by the "H.register_for_save" function which puts on a boilerplate "save" function:

Object.defineProperty(x, 'save', {value: function () {
    var i, r={};
    for (i in x.load_functions) {
        r[i] = x[i]
    return r;

Of course that code has to exist somewhere. Where it exists, obviously, is in the load_functions property of each object. In the load_functions property I put the handler for loading each property that is saved, each keyed to the name of the property. Adding new things to save is now totally streamlined.

It turns out I am foolishly in love with Object.defineProperty. This might be a terrible thing - and I know I have a blog reader who might show up to tell me what a terrible thing it is - but there are some things I just love about it so much. I love adding non-enumerable properties to objects so that I can still enumerate over the other properties. I particularly love adding properties to arrays, though I've moved away from that because it wasn't the best way to do what I was trying to do.

Right now I'm rewriting my number code. In most of the places in the game I don't actually store numbers for things, instead have an accessor property on the object that gets the result of a calculation of the value. If I want to increase the rate and which you gain a resource by 3 per second, I don't, for example, find the per_second value and add three. Instead I find the per_second value and add a H.new_bonus('add', 3) to it, which makes it recalculate the value of the thing and place that where the accessor will grab it. What I want to do is change that so instead of push on a function (x) that returns x+3. That might not sound very different, but it's pretty different for two reason, neither of which I'll put the time in to discuss here.

Hopefully, once I'm finished redoing the underlying number code, I'll implement it in the place I really need it right now, and then have something to release. I really need ideas for this thing.