Posts Tagged ‘update’

Avatars

Sunday, April 6th, 2008

I’m trying out a new change - player avatars are now loaded from the Steam site once, and then cached on 4fite, as opposed to telling your browser to load them from Valve’s servers.

This should mean that old profiles that don’t get updated will continue to have valid avatars even when the source profile’s avatar is changed on the Steam site. Also, it paves the way for some future additions to the site. If this doesn’t put too much of a strain on the storage and bandwidth costs, the change will be optimised, kept in place and applied to group avatars, too.

There’s a handful of invalid profile avatars that cropped up during the transition, but they should be fixed up automatically by future updates.

In other news, I took a trip to Valve last week for a job interview… a major excursion considering I live in Australia. Unfortunately I didn’t get the job, for reasons of experience. Most of my experience so far is in tiny agencies working on small - medium websites. I’d like to thank Valve for the hospitality and opportunity anyway. We should be keeping in touch for future prospects, and working together to improve both of our web offerings.

Player Search - Improved

Friday, February 15th, 2008

I’ve written a search that runs independently of the database. I can’t pin it down exactly, it’s either the hosting company’s servers or MySQL itself (or even PHP’s interface to MySQL), but a ” LIKE ‘%whatever%’ ” sometimes draws out to 60+ seconds when checking approximately 40,000 records.

All I know, for now, is that my flat-file index of player names is searched in under 1 second. Not fast by any means, or optimised at all, but this is opposed to a search for the same term direct on the database using phpMyAdmin resulting in a 112 second wait.

My indexes are fine. The same query on my Windows desktop’s MySQL server runs under 300ms, with a database exported from 4fite.com and imported untouched.

According to the MySQL documentation, any LIKE comparison where the argument starts with a wildcard character “does not use indexes”, so that could be the killer, but when I run the same query on my development server there’s no sign of any troubles.

As they are intended to index structured sentences with real words, using FULL TEXT solutions was out of the question. Player names certainly do not fit that profile, and a simply substring search is all that’s needed.

Unfortunately I’m fairly new to debugging a MySQL process in a remote / shared / high volume environment, so I’ll have to do some digging around to find some answers. For now though, my workaround will suffice.

Flip Out And Kill My Countries

Wednesday, January 30th, 2008

Valve added little country flags to their steamcommunity.com profile pages, similar to the ones on 4fite.com, which temporarily broke my processing of your country > province > city selection. All fixed now though.

If anyone reading this knows where I can grab the set of flag graphics that sites tend to use, chime in please. I’ve been making my own from larger flag graphics but I’m sure there’s a premade and coded set floating around, I just couldn’t locate it when I searched.

I could link to the new ones on steamcommunity but I try to limit that to avatars only.

Update: After a little searching using more sensible keywords, I tracked down the apparent home of the flag set. Sweet. They should make their way onto my site soon.

Minor Update

Wednesday, January 30th, 2008

Welcome to the Whirlpool and OCAU people jumping on to the site in the last few days.

I added an extra table to the individual player profile pages which details some of the historical data that’s now being recorded. There’s still only a couple of days recorded, so not much will show at the moment, but give it a few more days and you’ll start seeing weekly numbers in your profile.

You’ll notice that, in addition to how many hours you’ve played over a certain period, you can also tell how many points you’ve earned, and by extrapolation what your PPH for that period was. This is a bit more reflective of how you currently play when compared to your all-time PPH.

Well I think it’s neat ;)

In other news, a new PC for me! Should arrive either Friday or Monday (c’mon Friday, weekend is 4 fite!). Maybe I’ll actually play TF2 now that I’ll get more than 15 - 25 fps during fights. It’s an E6750 with 4gb ram and a 512mb 8800GTS. Yeah, end-of-line CPU… intended to be replaced with a Q9450 when they arrive assuming quad core is worth it by then.

Two Bugs, One Change

Sunday, January 27th, 2008

There was a bug in my profile processing code that prevented adding new groups. This caused an error when adding or updating profiles for players with groups that my system didn’t know about yet. The “add profile” feature of the site would have been affected by this too, and probably explained the handful of people that had joined the 4fite steam group but not added their profile to the site. I’ve fixed that one, and added the leftover profiles myself.

Second up was an error when I seeded everyone’s historical data for the first time. I wanted to fix it before it became an issue down the track, but doing so made me flush out everyone’s historicals for the last (and first) 24 hours or so.

Lastly I’ve added a very basic PPH up/down display to player profiles. It will show underneath the “points per hour” on your own player page. Right now, nothing shows there because of me flushing the historical data, but check again in 24 hours or so and you’ll see it. Periods that get compared are one day, week and month.

In the near future I’ll be adding more statistics that are based on recent numbers only (think Steam’s playtime in last two weeks, but more).

Unfortunately I don’t need to create my own stats site to tell me I’ve played zero hours in the past two weeks :(

Have a History?

Saturday, January 26th, 2008

Historical data tracking is now in. Key values from each profile update are now time-stamped and archived away for later use, which means at some point in the future I’ll be able to create pretty - ooh, shiny! even - graphs of your PPH and other things as they rise and… well, PPH is the only value that can actually fall, unless I start recording two-week play time.

Only people that add their profile for regular updates will get any benefit from this though since, due to the numbers involved, it could be weeks, or months before the system updates the other crawled profiles again.

In other historical news, apparently it was Australia Day yesterday. Lucky me, that legitimises the day off I was going to take today anyway. Australia Day commemorates the foundation of a British penis colon at Sydney Cunt, according to the Wikipedia article update I was about to make. I would have used it as an excuse to drink all weekend, but that suggests we need an excuse to begin with.

~raw

First Things First

Saturday, January 26th, 2008

A minor update, just starting to fill in the holes I left behind. Group search is up and running. The sad thing is, the hamster for this has been in all along, I just didn’t have a page to display the results.

Oh, hamster? Apart from being a rodent, it’s also the name I use for procedures in the backend that are called via ajax, or whatever term you want to use for async / xmlhttp requests.

So when you click something and it says “please wait”, just imagine a hamster toiling away on it’s wheel getting your results ready.

You don’t want to know what happened when it says “error”.

~raw