LENSFLARE GAMESLLC
About Us Games Blog Support Help
 

Optimize Prime

So, the game has a name now: Elexi. It's not impossible that it will change, but I like the sound of it, so for now, Elexi it is.

Anyway, since our last exciting installment of this blog that one other person reads (not counting our cats), I've been pretty heads-down working on the tutorial[1] and letter sets/word lists for the various languages I want to support. The tutorial and letters/words go together, of course, since (assuming I actually do make the game international) the tutorial has to work for everything, not just English.

Setup Screen
options

This also led to vast amounts of optimization work.

I primarily discovered this through testing the intro on our old 512MB iPad mini test hardware — the first pass at the tutorial was just too slow, largely because the method I was using to check to see if strings were words was incredibly slow (or rather, the method plus the way I was storing the word data). So, did so some optimization there to speed it up (first just fixing some somewhat poor design choices — at least for the final use case under stress — then trading space for time, as you do[2]). Got things a few orders of magnitude faster, which I'd need later (although I'd have to trade some of that space back, too).

This is why you test.

And then I started working on the word lists. Which didn't go well.

Originally I grabbed some basic word lists intended for spellchecking, but these were kind of crap. They were inconsistent about capitalization and inflection (among other problems). I ended up grabbing whatever free dictionaries/word lists I could find and combining the data and comparing it with the other lists I had (and then doing some manual massaging) and finally ended up with something that (probably) has a decent set of inflections and such. Which is great for English, but for Romance languages in particular, you end up with millions of different word forms with any significant base vocabulary. And, uh, of course the base vocabularies were full of questionable words. So... Well, loading those crashed the iPad when it (inevitably) ran out of memory. It turns out that memory is thing. Well, this isn't exactly a surprise to anyone that's done any work with Apple devices — memory is always a thing on iOS, really.[3]

This, again, is why you test, even if the results aren't much of a surprise.

Still, I didn't want to give up on inflected forms (or the idea of international support in general), and with various optimizations of the word lists and the way I was using them (as well as making changes to the way the letters match, i.e., changing how I deal with diacritics and the like — particularly sticky questions when dealing with languages like French or Portuguese which are just full of phonemic diacritics), I finally managed to get things pretty much under control. The word lists still aren't really... Great. Well, the English list is pretty good (I did a fair bit of manual cleanup there[4], though even then I had to make some compromises — hello, UK readers!), but the others have some issues I'd like to deal with if and when I can. Some of the issues are more intractable than others there, to be honest, but the most important thing is that I have something I can work with for now.

And here we are. The iPad mini doesn't crash anymore, at least.

[1] which is called the "intro" in the game. It's short, but covers the main points, and that's how it should be.

[2] incidentally, this is the time to do your hard-core optimization — when mechanics have settled down. Usually, anyway, it's possible to do it too late and end up with something that just can't be fixed, but it's also not a great idea to spend a lot of time doing it early when there's a good chance you'll just be throwing stuff out.

[3] garbage collection is a thing in C# and Unity, too, but that's a whole other post.

[4] for one, nth is just not a word, or at least, not a useful one. Nobody looks at a board and says, "oh, hey, I can spell 'nth' with that."

 

Tags: alpha testing, elexi, ios, memory management, optimization, word game

<< first < prev next > last >>
 

These are Doug's bloggish thoughts on game development, specifically on the games he's writing for Lensflare, or on Lensflare-related topics more generally. Or whatever he wants to write here, really, but those are the sorts of things to expect. Doug has strong opinions (loosely held) about many things — he could claim that he doesn't speak for Lensflare Games, but that'd be silly considering that (for all practical purposes) he is Lensflare Games. Still (for what little it matters) he's not always wearing that hat here. And yes, this is an actual picture of Doug (okay, not really, but the story behind it is too long to go into right now).

This blog doesn't currently support comments (mainly because most of the people reading this are probably spammers and/or close friends and/or indulgent family members), so if you'd like to comment on anything here, send Doug a note via email or ping him on twitter. He's always happy to hear from people, especially when they want to talk about games.

 
Previous Entries:

 

Tags:

 

RSS feed

@doubt72

doubt@lensflare.com