Toe 的个人资料Stuff that won't get you...日志列表 工具 帮助
8月25日

Flash Games and frameRate

Browsers, browsers and more browsers. If you're a flash game developer, you've probably been upset about the performance from browser to browser. I used to crank up the ol'FPS in my FLA's and hope they would run smooth in all browsers. Besides that being a horible practice and usually making the problem worse, it hasn't been much of a problem with actionscript 3. 
 
If you work with animators, they can be quite peculiar about how their work is presented, and as they should be. There's no silver bullet frame rate that you can set your movies too( action games primarily), since it's dependant on the browser.  
 
If you create an swf where it's framerate is set to 24 and you play it back in Firefox 3, your fps will be 24( windows ) and just about every other browser will do 20 - 22fps. That's really not that big of a deal you say, but  the animators you work with will grumble and call you names till the end of time or atleast until you can make their work display as intended.
 
So here is a little hack I use when showing previews of games/applications when animation is under scrutiny.
if( ExternalInterface.available )
{
	var js:String = "function(){ return navigator.userAgent; }";
	var browser:String;
	try{
		browser= String(ExternalInterface.call(js)).toLowerCase(); 
	}catch(e:Error){}
	
	if( browser.indexOf("firefox") != -1 ){
		stage.frameRate = 24;
	}
	else if( browser.indexOf("safari") != -1 ){
		stage.frameRate = 30;
	}
	else if( browser.indexOf("msie") != -1 ){
		stage.frameRate = 30;
	}
}

This works pretty well, it just adjusts the frame rate ever so slightly to get the playback to always be 24fps in the browser.
Now, this little hack also makes some asumptions as well. It assumes the allowScriptAccess is set to "samedomain" or "always" and people are using the latest & greatest browser of their choice.

Not sure if this will help anyone, but I felt it was way too long since I posted something. In the coming weeks I'll be posting some samples of how I work with FlexBuilder and Flash CS3 when developing games.

-T
 
 
8月26日

AirPort Extreme

Well, I've just purchased the new Airport Extreme. First off I'd like to say what a nice piece of hardware. I know that it is sligtly overpriced, but hey.... I love apple products. Although, there are 3 things that could have been better about this little devil.
 
  • Forwarding of port 53 to allow me to stealth my network, this is not a big deal since I run a webserver anyways but would be nice in the future when I don't.
  • USB Disk sharing - when you turn off wan but have local access, I would hope that it would it would allow you stealth those ports as well.
  • USB transfer rates are a little slow.
Over all I love it. It's super easy to configure and the log graphs are cute too! I hope apple will release a firmware update to allow for some of these shortcomings.
8月23日

Game Development with Flex3 and FlashCS3

Pre-FlexBuilder3 Woes
 
Before Flex3 beta, I'd been developing and exploring ways for concurrent game development to be more efficent. For most this is not an issue as the scope of the projects are small or the team is a single person. But for those that have worked with more than 2 or more people on a project with tight timelines, know all too well that Flash really sucks for this. 
 
3 reasons why I dislike pre-Flex Builder 3 concurrent game development.
 
  • Fla's   - I simply detest seeing large amounts of code in them. Doing binary diff's isn't really what I call an option when someone destroys your code or hasn't been faithfully working with source control.
  • Fonts  - You have to make sure that everyone working on the project has them installed ( the PC or MAC equivialant).
  • Audio - Any time you complile your app these are re-exported, depending on the project the waiting can turn you insane.

So you may say to yourself that those don't sound so bad and you know what, they aren't for the most part. I loath waiting for things over and over again, especially when there is a better way. There are workarounds for those issues, but are either convoluted, unreliable or require some 3rd party tool. Where I work I am primarily coding the game and for about 80% of the project I don't give a crap about the audio or if a particular font is showing up right or having to chase someone down to submit files to the depot. I just want to be able to test my code quickly and get back to rest of features that need implementing, so finding that PC/Mac Equivalent font or waiting and 10-30 seconds everytime I compile just sucks.

Well enough ranting.. that never does anybody any good and I'm sure for anyone reading this would prefer I get to the point of all of this.

Enter Flex Builder3 and Flash CS3:

 
Right when you thought that the actionscript 3 overhaul was blessing from cosmic overlords, Adobe was so kind as to take it a step further. Now being a noob to Flex Builder these may have exisited before in some fashion, but being able to export your Fla contents to SWC and access them as "First Class Citizens" in flex is truly awsome!
 
All those nasty little things I mentioned before are now gone! Game development with Flex Builder3 and FlashCS3 is truly awesome. You now have a good debugger, profiling, great source control support, and finally excellent code and content seperation.
 
Now if Adobe were to add OpenGL, this would give XNA a run for it's money( even though it's free :P ) with AIR applications on the PC/MAC homebrew scene. Don't get me wrong I love XNA as well, but it lacks good artist tools like the Flex & Flash combo. Perhaps Microsoft will add native support in XNA to interperete Silverlight files? Oh man.. I could go on about that for a while but let's save that for another day.
 
 
8月19日

Sunday

Is it the end or the beginning of the week? Anyways..
 

Stuff that won't get you chicks

Xbox Live 玩家卡

Niboowin
Xbox Live 玩家卡
声望:
5/5 星
得分:
5510
区域:
Recreation
Assassin's Creed IIModern Warfare® 2Geometry Wars Evolved²Guitar Hero IIIGuitar Hero II
作者 
作者