• Blogs
Tuesday, May 16, 2006
08:55 am UTC @Creator MightyE CSS Three-Column Layouts
Hits: 9169636
Wow, a MightyE blog!

Those of you who aren't currently, or have no plans to be a web developer, this brief entry doesn't apply to you. Those of you who strive to be better web developers, read on!

Anyone who's fooled around with doing pure-CSS layouts knows that the common 3-column layout can be pretty tricky (a design layout we take for granted in a table-based layout). Someone's compiled a list of other people's common layout techniques here, with a brief summary of the merits of each:
Three Column Layouts

-e

MightyE

Tuesday, October 18, 2005
08:12 am UTC @Creator MightyE Gabe & Tycho are my heros
Hits: 9172561
Those guys donated $10,000 in the name of Jack Thompson when he rescinded his offer of $10,000 to charity, claiming it was a joke.

The long and short of the story is this: Jack Thompson is a lawyer who likes to sue game companies for making games that aren't intended for kids. Now I have my own thoughts on these matters, and they don't totally align with a lot of the gamer community, but I'm not here to talk about that just at the moment. Suffice it to say that parents have a responsibility to control access to such things if it would negatively impact their child, and I agree with making tools available to parents to facilitate this.

Jack's offer was this: He'd give $10,000 to a charity if someone made a violent video game that he proposed, wherein the main character took bloody revenge on game company execs, and game store clerks when the character's son was copycat-murdered from a game.

He was presumably trying to make game companies feel the heat of their actions; where actions is production of adult level games. The guys at Penny-Arcade predicted that any successful creation of such a game would be deemed insufficient, and indeed it was. Only after someone actually created a mod to an existing game, which fully met the requirements put forth by Jack, did he claim the original offer was only sattire; rhetoric if you will. Most sattire I've encountered includes laughable values, not realistic ones. If it were sattire, wouldn't the figure have been $10,000,000,000, not $10,000? If it were sattire, would it not have included ludicrous requirements such as counting score in the number of innocents slain?

I think it's plain to even "all of [us] gamers on drugs" that this is back pedaling of olympic proportions. Hang in there Jack, maybe in the next olympics you'll medal in this new talent.

Anyhow, Gabe & Tycho ponied up to the rescinded offer, and put up Jack's money for him. Read some of the community responseOne
Two

MightyE

Wednesday, October 05, 2005
09:31 am UTC @Creator MightyE /me dusts off the blog machine to talk about Serenity.
Hits: 9173270
My Sci-Fi Background
I'm a very minor Sci-Fi fanatic; by which I mean I'm a soft core fanatic, not preferring some of the old cheesy (or "classic" depending on your perspective) Sci-Fi works out there. I recognize them for their greatness to the time they were written, but unlike fine wines and cheeses, Sci-Fi doesn't get better with age.

Now that I've alienated you hard core Sci-Fi fans, I'll go another step further. Despite many encouragements from friends to get into Battlestar Galactica, I just haven't really been able to appreciate the show. This could largely be because I've been unable to watch its consecutive showings, which I know can ruin the experience of an otherwise really good show. I never appreciated Star Trek: Deep Space Nine until I was able to watch it on DVD in the order it was written. Turns out there's a whole lot of sub plots and over plots to that series which you'll never get a feel for if you don't watch them the way they were meant to be watched. Now I'm a really big fan of the series.

Despite the fact that some hard core Trekkies will probably lynch me for the statement, my favorite Star Trek series was Voyager, and I didn't care at all for Enterprise.

I own a number of Sci-Fi movies and series on DVD, including all of Next Generation, Deep Space Nine, and Voyager. I'm currently working my way through Farscape, and enjoying its freshness.

All of this I basically put forth to establish: I'm a nerd who's spent a fair amount of money on Sci-Fi.

Firefly
I had honestly never heard of a Sci-Fi series called Firefly while it was still on the air. Maybe it's because it got the Futurama treatment by Fox, which is to say, bad and inconsistent time slots, little advertising, small budget, and even airing the episodes out of order from their episodic chronology (the same treatment that caused me to not care for Deep Space Nine when I self-inflicted it on that series).

However, after the death of the series, I started hearing a lot about the show. It almost immediately established a cult following of dedicated fans. That by itself doesn't mean much to me, there's cult followings like this for shows like Enterprise, which I think betray the rest of the franchise. However, after repeated encouragement by friends and sources which I generally trust on such matters, I finally decided to buy a used copy of the DVD's. Hey, $25 is less than it costs to take a group of friends out to dinner, and I was pretty sure that if I ended up wasting the money on a bad series, my friends would end up owing that much to me.

Wow, my reservations on this front were poorly placed. This series is a fully cut and polished diamond in the cesspit of modern television. I was hooked after the first episode, and I've never been so mournful to reach the end of a box of DVD's as I was when I got to the final disc in Firefly. Like Futurama, this show failed in spite of its quality. Who knows how Fox executive minds work, or what secret grudge they had against Joss Whedon (creator of Buffy, which I never cared for that much, but which my sister-in-law loves, and I do consider her tastes to be more refined than mine, so my guess is I never really gave Buffy a chance).

Anyhow, I strongly recommend you get yourself a copy of Firefly. It's currently my most favorite Sci-Fi series, by a long shot (sorry Gene Roddenberry). You can get it new or used from Amazon.

Firefly the series is currently canceled, after 1 season aired, and without even all of those episodes broadcast. However there are a lot of people hoping it'll get restarted because of the hoped-for success of the new movie based on that series (not a blockbuster so far, but expectations are that it'll have real staying power in the theater, and exceptional DVD sales).

Serenity
Serenity is the name of the movie which came out this past weekend based on the Firefly series. I went to see it with friends (all also fans of the series) this past Saturday. Every one of us walked out of that theater absolutely stunned (in a positive way).

I'm not exaggerating when I say it's been the most significant movie experience of my life. Non-fans of the series will probably not feel this way, but largely because they don't know and care about the characters like series fans do.

The movie has one of those "Luke, I am your father" moments in it. Which is to say, it was very hard to fight the urge to discuss the happenings of the movie as you're walking out of the theater, past the others who haven't gone in to see the movie yet. It's something that could easily ruin the movie for another fan, but it is so hard not to talk about it before they've seen the movie.

I've babbled enough about this for now though. I recommend you watch the series before you see the movie, because although I feel as if the movie does a good job of catering to the non-series-fan as well as the series-fan, I guarantee you'll miss some of the jokes, and the overall events and purpose of the movie will mean a lot less to you. If you don't want to watch the series first, well, it should still be a good movie. Just be careful about what reviews you read, because I've heard a few give away the ending, and that's akin to walking out of Star Wars, saying, "Man, I can't believe Darth Vader is Luke's father," thus ruining the experience for others.

In closing, I've only ever watched one other movie more than once in the theater, and that was the The Matrix (original), which I saw 3 times. I've already got plans to see it in the theater at least once more, and perhaps twice more. Go watch this series, then go watch this movie, you won't be sorry.

If you won't take my word for it, then take Orson Scott Card's word for it (author of Ender's Game -- best Sci-Fi book ever). In his words, "
I jealously protected the movie rights to Ender's Game so that it would not be filmed until it could be done right... If Ender's Game can't be this kind of movie, and this good a movie, then I want it never to be made." High praise indeed.
MightyE

Thursday, December 16, 2004
08:30 am UTC @Creator MightyE Child's Play
Hits: 9217140
Thanks to you guys, LoGD sent a grand total of $2043.23 to Child's Play. This is an initial donation of $500 in early November, plus the money you guys donated throughout the month (minus our operating costs).

Thanks so much guys, you've really made a difference in the lives of some sick kids!

Here's my email exchange with Penny-Arcade:


As promised, we folks over at http://lotgd.net ran a fund drive for
November, with the proceeds (past our operational expenses) going to
Child's Play. At the end of our month, our net income was $1,543.23,
so that's the amount of the donation we just sent. This is in
addition to our early November out-of-pocket donation of $500, for
$2043.23 total for the year. That's about 13.6 standard game units I
believe!

Thanks for running the charity!

-Eric Stevens
http://lotgd.net


Mike Fehlauer to me
Eric--thanks so much! Robert was tabulating CP donations this morning and exclaimed "Whoa! Our Paypal account just jumped!" With this contribution you definitely are going to make a real difference in the lives of sick kids.

Thank you so much!

-Mike
MightyE

Saturday, August 28, 2004
12:51 pm UTC @Creator MightyE The Inn
Hits: 9219040
By now most of you are almost certainly aware of the changes that were put in the Inn on bribing Cedrik. You folks can move on to the next paragraph. For everyone else, there was a bug in bribing Cedrik where the middle tier of the 3 options guaranteed you a successful bribe. This bug has been in place for a long, long time; probably over a year.

This really was a bug, and was definitely not intentional. I'm not sure when exactly it got introduced, but until today, I was not aware of it at all (for real life reasons, the short of which is that I only have a few hours a week worth of time that I can use for myself). It should be obvious to most people that this was a bug -- otherwise why offer three tiers of bribery if the second tier always was successful?

I'm astonished at myself that I left such a hideous bug go unaddressed for so long, but I'm also astonished that it went unreported for so long. I really would have thought that *someone* would have realized this was a bug, and brought it up.

Well, I'm sincerely sorry that this was left in place so long. I now understand why so many people believed the inn was such a dangerous place to be. I'm also sorry that we're 'nerfing' it, but a bug is a bug, regardless of how long it's been in place. Our decision to fix bugs doesn't include any consideration for how long they've been there, but only for whether they were intended to be there in the first place.

MightyE
Sunday, June 13, 2004
08:43 pm UTC @Creator MightyE The Washington D.C. World War II Memorial
Hits: 9220714
My wife and I took a bus trip with her parents yesterday down to Washington D.C. We hit the Air & Space museum, Washington Monument, Lincoln Monument, and the Natural History museum. Of course one day is not enough time to do all of those things and give them sufficient attention.

The other thing we did, and about which I would like to talk today, is visit the new World War II memorial. I've never been in a war, and I hope never to be. I cannot fathom what this experience must be like to have lived through something like this; it's somewhat like water understanding what it's like to be oil. They share many of the same characteristics, and can even look enough alike that it might be difficult at times to tell them apart, but when you mix them, there is a certain quality that causes the oil to rise above the water, and a barrier that will always separate them from each other, even if they do live at times side by side. The price for owning this quality is far more than any person should be expected to pay, and never previously has that been more dramatically demonstrated to me than when I was standing in the midst of a crowd of people, many of whom were standing, mouths open in silent awe, in the WWII memorial.

There is this wall of bronze stars above a reflecting pool. Each star represents 100 people who died. I wouldn't have been able to hope to count them all with out resorting to my calculator to multiply the rows by the columns, and even then, it'd have taken no small amount of time to count the rows and columns. In the distance behind these stars is the half-mile long reflecting pool, and at the far side of that is the Lincoln monument. Standing in front of the stars with your back to them, you'll see the Washington monument staring down on you.

It is a truly humbling experience. If for even a moment, standing in here, you feel anything but humble, you should turn and allow the crowd to part for a moment, just long enough to glimpse a single star on the wall, and when you see it, realize that every single person you are close to, as well as many if not all of your acquaintances and relatives do not collectively represent the price that that tiny bronze star represents, sitting nondescript among so many thousands of other stars.

As impressed as I was with this memorial, I took 53 pictures. At one point, I had a perfect shot lined up in my view finder of a great stone bench engraved with "To Restore Freedom and To End Tyrany," above which rises a bronze pillar and a U.S. flag at half staff. I'd been waiting several minutes for the crowd to part long enough to get a good shot of it, when just as they did so, this old guy walks on to the scene and sits down on the bench. Not thinking, I lower my camera and grumble to my wife about my ruined shot. "I think he earned it," she says quietly. Ashamed, I had to agree.

This memorial is positively beautiful. If you are ever in the area of Washington, go and see it. I attached a couple of images here.

Standing under the "Pacific" entrance, looking over the crowd.
Looking up at the Pennsylvania pylon, a rose perched in the lower right.
The field of brass stars.
Old man on the bench.

Those pictures are at 800x600 resolution. If any would like a higher res version, I have 2560x1920 images (should be bigger than your desktop no matter how high your resolution, hehe). Just send me a yom with your email address. The files are each about 1 meg just so you know what you'd be in for.

MightyE
Sunday, June 06, 2004
07:39 pm UTC @Creator MightyE Gotta love TiVo
Hits: 9221194
As I mentioned in a previous blog, I've recently switched to DirecTV. DirecTV is cheaper than Comcast for our area, and when you sign up, you can elect to get a TiVo for $99 (other than that there's no sign up or setup charges). Let me tell you what. I love that little guy. The only complaint I have is that he's silver, while the rest of our TV and associated equipment is black. My wife, (Crazy) Audrey won't let me get near it with that can of black spray paint I bought either.

TiVo watches what you watch. That's a concept that fundamentally bothered Audrey at first, since it reports your viewing habits to the TiVo central brain in a fashion that we're assured is anonymous. Personally, I'm all for this. The Nielsen group didn't elect me as one of those people who get free television in exchange for letting them watch my viewing habits so that I can shape what the networks put out there, so TiVo is the next best thing. I like the idea that a company watches what I watch. Maybe then they'll get the hint that I always pause TV (a feature of TiVo) when certain commercials come on which I find offensive, annoying, or are for products which I'm personally boycotting, then fast forward once enough time has elapsed that the commercial should be over. Maybe I'll also have some small say ultimately in what goes on TV. I hope that network execs pay attention to the TiVo stats; this is much more real than the smaller Nielsen sample base of people who are actively aware that their viewing habits are being used to shape the future of television. As an aside, I always wondered if such people were ever approached by show producers, and offered sums of money to watch a show that might otherwise get canceled, or to artificially inflate ratings to drive advertising dollars.

Anyhow, TiVo watches what you watch, and it learns what you like. There's little green and red thumbs up and thumbs down (respectively) buttons. If you see a show that you don't like, give it 1, 2, or 3 thumbs down. If you see a show that you do like, give it 1, 2, or 3 thumbs up. Eventually TiVo gets a good idea of what you do and don't like, and takes it upon himself to record things he thinks you'll like in his spare disk space. So you come home from work and find nothing on the TV, you can check out what TiVo recorded, and chances are good you'll see something you want to watch there.

You can also tell TiVo that you want to automatically record certain shows using a feature called "Season Pass." You can set it to record each showing, or just first-runs. It's also smart enough to not record two copies of the same episode (it knows what each episode is). TiVo takes care of disk management on his own, automatically erasing the oldest stuff (unless you mark something as a keeper) to make room for new stuff.

Enough about TiVo. I enjoy my DirecTV service in general, we've not had any reception problems even in a hail and wind storm, and the picture is more clear than our regular cable was. There's a broader channel choice (especially if you're in to sports, which I'm not), There are 5, count them, five Discovery channels. And the on-screen interactive guide to what's on and what's coming up is golden. You can see little synopsises of each upcoming show, then just push the Record button if you want to record a specific show that'll not be on until another day.

I don't yet have experience with their billing department, but that's about the only thing that still has much chance of disappointing me about DirecTV. If you're thinking of switching over, I'd recommend it. DirecTV is cheaper than cable, and if you have cable Internet, you can switch to DSL (Verizon offers CHEAP access if they're your phone provider, much cheaper than Cable Internet), which is more secure, and just as fast unless you elect the uber-cheapo-I-don't-want-good-net-access plan. You'll have higher quality service on each front, and you'll be stepping on the toes of Comcast, who I personally believe is chaired by an evil entity of firey origin.

MightyE
Friday, May 21, 2004
07:16 pm UTC @Creator MightyE Urk
Hits: 9223598
Urk, what a couple of weeks. I want to formally apologize to all you loyal players (you unloyal ones get only an informal apology) for not being more present the past two weeks. No one sent any GuildWars reviews, so I wasn't able to grace you with the editorial prowess of any other players on this subject. I apologize for that also. I did however get an unsolicited review of LoGD. I got a few emails from players who tinkered with GuildWars while it was available, but nothing in sufficient depth to merit a post here (nor were they intended for such).

You'll notice the server has sped up some recently. This is thanks to the server side optimization of Turck MMCache. For you technocrats, this is a caching engine that intercepts the post-compile PHP scripts, crams them in RAM, and re-serves these next time the same script is requested. The result is that the server is spared the torment of repeatedly reinterpreting and revalidating each PHP script on every page hit. We typically see anywhere from 3-4 hits per second to 10-12 hits per second, depending on the time of day, so although this represents a small amount of work for any given page hit, it represents a significant overall savings on a busy site.

Thanks to JT for picking up the slack on working on the code while I've been busy. But someone please find out where he came up with the name Degolburg =).

Anyhow, I'm going to go have dinner with my wife, and enjoy her company. It helps reduce the random shoulder-launched kitten attacks from her Scratch of Fury 2000 brand kittens. Given the expense of such late model kittenry, it's cheaper just to take her to dinner and satisfy her physical hunger than it is to to satiate her appetite for kittens of mass destruction.

Update by: Crazy Audrey
The Scratch of Fury reference is a PvP Online reference. The story arc begins here and the specific reference comes from somewhere about here. I recommend you read the whole thing and not just go from link to link.

MightyE
Wednesday, May 12, 2004
12:31 pm UTC @Creator MightyE Guild Wars Monthly Fee
Hits: 9223797
It should be noted that Guild Wars is the first MMO (to my knowledge) that comes with out any monthly fees. This to me is a highly attractive feature.
MightyE
09:08 am UTC @Creator MightyE Guild Wars Preview
Hits: 9223809
For those who didn't know, the Guild Wars E3 for Everyone event went live a day early, so those eagerly awaiting a taste of the up coming MMO had an extra day to try it out (it was not supposed to go live until today). This event runs until Friday some time, and allows you to get a preview of the game some time before the beta starts, for free.

I played this for a couple of hours last night, and had quite a bit of fun with it. I have all kinds of good things to say about this game; it, like City of Heroes, plays much like a single player game, though they also provide significant incentive to take on missions that require a full group, in that these missions are only accessible if you have a group, ala EverQuest's Lost Dungeons expansion. The missions I experienced are more clever and make better use of strategy than the missions in EQ's Lost Dungeons.

The graphics are positively beautiful. They are the best graphics I've personally experienced first-hand in any MMO, and they are as rich for the modern gaming age as the original Unreal's graphics were for that age when it came out. If you do nothing else, find some water. I'm blown away by the water.

The interface is fairly polished for how early the game is in development, and it's certainly very usable, though it could still use improvement. It's better than I expected for the developmental stage the game is in though.

Everyone starts at level 15, and is locked at level 15, just for the sake of this event. You also are born with a set of equipment and skills appropriate for a level 15 character.

My experience in the game was very pleasurable, but I don't have time today to go in to a lengthy play by play of this game like I have done with others. Given the short nature of the E3 for Everyone event, I'd like to solicit reviews from any of you who've played it, and are inclined to write a review about it. Any reviews I feel are insightful and appropriate, I'll post up here for the general enjoyment of the LoGD players.

Update: Send your reviews to [t][r][a][s][h][@][m][i][g][h][t][y][e][.][o][r][g] (minus the []'s)

MightyE
Monday, May 10, 2004
10:54 am UTC @Creator MightyE Mein E
Hits: 9224236
Yet more proof that LoGD is overthrowing the world:
Crazy Audrey making an appearance in Joy of Tech.

MightyE
Friday, May 07, 2004
06:52 pm UTC @Creator MightyE Delinquent Bills
Hits: 9231426
When I complained last month about Verizon's billing department having some screwy policies, I got a lot of very positive feedback. Little did I know when I wrote that, that many of you are also frustrated by companies who get so big that they can no longer bother to accurately account for their billing with us individuals.

Today I received a letter in the mail from Comcast. It's printed on a nice mint green paper, and says in bold letters at the top, "DISCONNECT WARNING." Dear customer, it says, our records show you have no idea how to pay a bill, and are late paying your current ones. Our billing department is infallible, and so you should send us lots of money for services for which you've already paid.

I'm no stranger to this particular letter. I've gotten it before, also from Comcast. The last 3 times though, it was printed on a pinkish-red paper rather than the nice mint green that it came in this time. Whereas before I felt like a bull in the streets of Madrid, this minty green paper makes me feel as though I'm skiing down the slopes of some famous skiing mountain, eating a peppermint patty. Well, so I assume, I've never really skied on any famous mountains with any sort of confection.

The last time I got one of these letters was about a month ago, which came at the tail end of a month and a half of effort working toward a resolution, and 3 similar letters before that one. At the time, Comcast stated I was delinquent on at least two bills some time between November and March; which months they couldn't say, but they were certain. Not just delinquent, they asserted that I never paid them at all, and certain enough that they were paying some other company to call me and harass me at work. I don't want to bore you with the gruesome details of this quest, but let me assure you, my coworkers had the radio off for the better part of a month as I talked to numerous different people within Comcast, each of which assured me they really had this thing solved this time. I knew I wasn't late on any bills, and that they'd all been paid, because I used my bank's automatic payment system, which sends the payment without my interaction on a schedule and amount that I specify. I had complete records showing I (or rather my bank) paid each bill on time, and these payments even happened entirely electronically so there was no check to lose.

I finally really honestly did get this all straightened out. A director of the billing department (who's apparently a level above a supervisor of the billing department, who's above a senior billing analyst, who's above a traditional billing analyst, who's above what ever company they pay to harass their customers) and I were on a first name basis, inquiring about each others kids and the like, and finishing phone conversations with, "Talk to you tomorrow." This latter part is rather an exaggeration, but not by much; I don't have kids.

So I was pretty surprised when I got yet another notice that my account is delinquent from a company which had all but offered a formal public apology for the inconvenience they'd caused.

I'll let you all know how I like DirecTV. Turns out you get a TiVO for cheap when you sign up.

MightyE
04:06 pm UTC @Creator MightyE So what's all this with the new translation system?
Hits: 9231457
I've already described in the previous blog how the old translation system works, and how it's not especially efficient. The difference between that system and the system I have partially deployed now is that the new system was based on a fundamentally different design concept. It's important to let people play the game in a non-English language, and I should alter my programming style to accommodate it. I don't have much time to describe it, but I'll do so briefly.

The new translation engine employs the sprtinf() function in PHP, which operates the same way that the one in C does. Those of you who have done some C development will recognize the sprintf() function, and can skip this brief description of it, picking up on the next paragraph. If I want to output that Farmboy Joe has 7 gems, and I'm using sprintf(), I do this: sprintf("~#%s~3 has ~^%d~3 gems.",$session['user']['name'],$session['user']['gems']). What this does is replace %s with the value found in $session['user']['name'] and %d with the value found in $session['user']['gems']. So if we're translating to German, we can change "~#%s~3 has ~^%d~3 gems." to "~#%s~3 hat ~^%d~3 Edelsteine." For more information on sprintf() under PHP, check out the PHP documentation.

If we need to change the order that the words appear in, we can do that also, by using this instead: "~^
%2$d~3 Edelsteine hat ~#%1$s~3." (I hilighted the parts that are significant). This is an important difference between the old translation system and the new one, where we can change the order of variables in the output under this system, while we couldn't before. Another important difference is that we can now be sure that we only replace entire strings of data, rather than having to look for partial replacements within the data.

Looking up an entire string can be accomplished much more quickly than having to look within a string. As this is something that happens very rapidly, we wanted to take advantage of a hard coded lookup procedure, and conveniently PHP's associative arrays provide us this opportunity, while also being very easy to implement. PHP uses strings as the index to their arrays and does lookups on them using an ordered map. Those familiar with the data structure called a hash table are already familiar with the map data structure, as hash tables are an implementation of maps. In the end, what this comes down to is that you can locate a given string in a giant pile of strings, with out having to compare against each string in the pile until you find a match. Instead you use cleverness to eliminate the majority of possibilities within the haystack, and are left with only a small handful of hay through which you have to look for your needle.

Now all we have to do is populate a PHP array with From => To pairs, and we can efficiently look up translation pairs. It is still a little hairy to have to dig through code and locate all the output strings though, so each time text goes through the translator now, those who have the translator tool turned on will see a tiny T appear. The T will be red for those spots that no translation pair is found in their current language, and blue for any that were found. Clicking the T brings up a window that shows the the text that went through the translator at that point and allows them to specify a translation, establishing the pair.

The system will also collect previously unseen translation calls, and allow the translating player to pour over a list of untranslated text, providing translations for them.

As you may have guessed, translation pairs are being stored in the database, that's the only feasible and universally functional way to store data that's being updated dynamically like this. It's not a good idea however to load the text for the entire game each page hit, when only portions of the text are going to be needed on any given hit. So we introduced the idea of namespaces. When the engine enters a new translation namespace, it loads the pairs for that namespace if it hasn't already, and translation pairs that weren't defined in that namespace aren't examined. This lets us put, for example, all the buff output messages in the "buffs" namespace, and then no matter what page they're called from, the text will display properly, while not having to load text from the inn while we're in the forest. The namespaces operate as a stack, so if while in a forest fight, we do something with buffs, we would push "buffs" on the stack, and when we're done with the buffs, we pop "buffs" off the stack, and the translation namespace returns to whatever it was before we started working with buffs.

We automatically set a number of namespaces. For example, all page hits default to the script name as the name space. Any time we're executing code within a module, we're in a namespace tied to that module's name. We don't have to worry about that. The only times we need to worry about setting a namespace is when certain text appears in more than one place, such as with the buffs, or the Vital Info in your nav over there. Buffs, as I mentioned, go in the "Buffs" namespace, and vital info goes in the "global" namespace (reserved for those texts which appear on every page, eg, "MoTD," "Ye Olde Mail: %d new, %d old," and "Petition for Help".

If a multi lingual admin installs a module, changes a buff, or does something else which leaves some text untranslated, they have only to click the T and provide a translation, and they're fixed. No need to dig in code at all, and we could grant rights to anyone we want to provide a translation in any language they know.

In the future, we may be taking applications for translators, but we're not just now; no need to barrage me with requests to be a translator just yet =). The reason for this is that the system isn't totally done and it's not yet ready for public consumption.

I hope this satiated the sick curiosity a number of you have demonstrated in to how we are running the translator =). I'm fairly flattered that so many are so curious as to how I structure things, though I can't take credit on all that structural stuff, JT spends many an hour telling me why I'm an idiot for structuring things a certain way (I've spent a few reciprocating that, but not as many).

Thanks for those who were interested, and for those who weren't, why are you still reading by this point in the blog? You're crazy!

MightyE
07:39 am UTC @Creator MightyE Boring stuff about the translation engine
Hits: 9231502
Seems not a few of you are curious about this translation engine thing I mentioned before. So here's the gory details.

To appreciate the new translation system, a bit of understanding about the old translation system is in order. A design principle I took when approaching the old translation system was, "I speak the language this game was written in, so I don't really get much out of a translation engine, thus it shouldn't really affect the way I approach my main code." Toward that end, I built it in such a way that it was compatible with all the back code I'd done at the time.

In order to specify a translation on a given line of code, the person translating would open translator_XX.php (where XX is the language code) and find the section in that file that indicates the page they're working on. If they were going to translate the sentence "Mary has a little lamb" they'd add this to that section:
"Mary has a little lamb"=>"Mary hat ein kleines Lamm"
and whenever "Mary has a little lamb" on the page in question was output, this would be replaced with the translated version. As soon as the engine located a valid translation pair, it stopped looking for others for that bit of output for efficiency reasons. That works ok, except where I include variables inline with the rest of the output.

If I was going to output how many gems the current player has, I'd do this:
output("~#{$session['user']['name']}~3 has ~^{$session['user']['gems']}~3 gems.");
where I'm using the ~ instead of the backtick (or grave to you frenchies) since there's no way to represent one in a blog with out it thinking it's a color code =). The output of that would look like this:
Farmboy Joe has 7 gems.
Now this represents a problem, because the variables are put in place by the PHP engine, and by the time it reaches the translator, "Farmboy Joe" and the "7" are already there. You obviously don't want to do translation pairs for every combination of player names and how many gems they might have. So I made it so that any one line could have multiple replacements done on the same line. To do this, the translating party simply specified an array of possibilities:
array("has"=>"hat","gems"=>"Edelsteine"),
as one line in the translation script. If the engine got to this line and saw a "has" it would do all the replacements in the array, and stop looking for other translations. This successfully translates the gems line, but you have to be careful about the ordering of this. Because "has" is a common word, you need to put it low down in the listing so that another line doesn't get translated by this pair first.

It was functional if a little difficult to tweak, reorganizing lines here and there if a translation happened out of order. But it was hugely inefficient. Each output that went through the translation engine required one substring replacement for each translation pair. Well, not exactly, since it stops for the first successful pair that it finds. So the growth order of this algorithm is somewhere about O = n log(n). The log(n) is the searching for translation pairs, and the n is the length of the string we're searching through. That's not a superb growth order, we'd prefer to see something like O = n, or O = log(n), but at least it's not O = n^2. What all that fancy talk means is simply that the more data we put in this thing, the less efficient it gets. Once you get an entire game pushed in to the translator, it comes to a crawl. This is something I didn't see when developing it in the first place because I only translated bits and pieces just as a technical (not scalar) test of the system. Honestly it wasn't important enough to me to pursue it in more depth than that.

Well, the new translation system should be much closer to a log(n) growth, which means that if you're doing almost no translation, you see a higher price paid for this system over the old one, but as you begin to grow the translation or the output that you're doing, it surpasses most other translation systems by far. Unfortunately I ran out of time just now to talk about how that works, I've got to go to work. I'll try to toss an entry on that up here later today =).

MightyE
Thursday, May 06, 2004
06:19 pm UTC @Creator MightyE Security Upgrades
Hits: 9226030
I mentioned in a MoTD that there was a password upgrade. For those who want to know, what we're doing now is utilizing a javascript based md5 algorithm to hash your password before it is sent to the server. This is then md5'd again server-side and compared against the hash in the database. If they match, your password is good and you get to sign in. If you don't have javascript enabled, the game picks up on the fact that your password was in fact *not* md5'd, and md5's it two times before comparing to the database. Ultimately the password stored in the database is a double md5 of your original password.

We don't md5 the password two times for a that being any harder to reverse than a single md5, but rather this way your password doesn't have to go across the network in plain text, so no one can sniff you, and even the hash that goes across the network is also not stored directly in the database. Not having the hash that you send across the network be the same one we store in the database means that if I wanted to look in the database and steal your password to log in to another LoGD site by forging the javascript, it won't do me any good. For the same reasons we md5 a password before storing it in the database, we md5 the hash you send us when you log in before storing that in the database. You're afforded two levels of protection, one against prying eyes, and one against prying admins.

The other upgrade we're doing security-wise is using a new module to control administrative access by IP address. With this module, should I go over to a friend's house, I'd not be able to perform most administrative tasks. Although that part's not particularly fantastic, what is fantastic is that if someone managed to figure out my password (or the password of another admin) the worst they'd be able to do would be to get that admin killed in the forest, and post some comments. All too often someone claims to have admin passwords, then I end up doing a bunch of detective work to find out they indeed don't. Now it won't matter so much even if they do get it because they won't be able to go crazygonuts on the game.

We already protect against password brute forcing on admin accounts, so this adds yet another level of protection.

Also this update brings us a new translation engine, but I doubt most of you really want to hear all the boring details of *that*. Sorry if any of the above didn't make sense, it's the end of the day, and I haven't had coffee for over 10 hours now. YoM me if you don't understand something and are curious, and I'll try to answer you =)

MightyE
Creative Commons License This work is licensed under a Creative Commons License.
Game Design and Code: Copyright © 2002-2008, Eric Stevens & JT Traub
Design: Jade Template © Josh Canning 2004 of HFS
View PHP Source
Version: 1.0.6+classic
(Page gen: 0.08s, Ave: 0.08s - 0.08/1)