Update: D'oh: Rage is also by Bethesda :)
soon have Mouse locking in HTML. This means First person shooter control will probably be possible soon in browsers.
just announced the upcoming release of Flash Player 11, which is the one with real, hardware accelerated 3D, code name 'Molehill', now named 'Stage3D'. The demos on the CopperCube website will also soon be replaced with newer, nicer ones, using Stage 3D, and thus, will no longer run on old Flash Players. So it is necessary to add some flash player version detection. I'm not a fan of this, because in a lot of cases, something goes wrong with this detection and although your user would be able to view your content, you are only showing him a 'Update your Flash Player!' message box instead. So instead of doing this, I wanted to simply display a small warning message and then still try to load the content. Like I did here:
Turns out that the famous SWFObject script has a method to detect the version, nice. We only need to call swfobject.getFlashPlayerVersion(), take a look at the major version number of the item returned, and then display or not display the warning. In case you also want to do the same, here is the full code I used to do this:
BTW: Why isn't there a good up-to-date unreal tournament? Like in the good old 2004 times?
So I set down for an hour and wrote a nice little PHP script to manage all these. The result is this:
With the next update of the Ambiera website, this script will manage all the demos, and as you can see on the screenshot above, it will even know if there are multiple versions of a demo and ask the user which one to show.
Not a big change for visitors to the website, but certainly a big help for me personally. It's definately worth knowing a bit of HTML and PHP from time to time.
Starcraft 2. There are many quite fascinating aspects of this game which I like: For example the now huge international Starcraft 2 scene with all the tournaments and pro gamers. Every day it's possible to watch new, interesting commentated games between professional gamers, and interestingly, that's much more entertaining than watching for example a plain old sports event like football.
From a programmers view, SC2 also has some interesting technical features, like how the multiplayer and replay functionality works. Behind the scenes, it's obviously a simple deterministic state machine running the game, and only key and mouse input events are sent between players, making the multiplayer game work on even slow internet connections. Replays are saved in the same way. I always wondered if it is possible to play replays of old versions of SC2 at all, and how the programmers manage to let the state machine work with those old files when they changed lots of mechanisms and values in new versions. Yesterday I noticed that they don't: When you replay an old game, Starcraft will then launch the old binary .exe of your game, to play it back.
The only thing I don't like about this game is that I'm absolutely horrible at it. I'm quite ok when playing with other people (I'm platin in 3v3), but in normal, 1v1 matches, I absolutely suck. After playing it a few hours every week for one year, I'm still in the silver league. I know a few nice builds which work, I am able to macro up (I play zerg) and what unit compositions are useful against what kind of enemies. But I fail very often. Interestingly, this is what lets me keep playing the game, and try getting better.
I wonder what the reasons are for my failure. Being 32, I think maybe I'm maybe to old, and too slow for this game. Also, I've noticed that the strength of my opponents are different based on the day in the week and the time of day. On weekends, my opponents are usually unstoppable, although playing silver. When I play a match in the evening during the week, I have no problem defeating even gold or sometimes platin players. Maybe I'm playing at the wrong time. Or maybe I simply suck. :)
Anyway, it's a fun game, and I can recommend trying it out. Now back to programming. That's what I'm a bit better at.