We love you, but we're not IN love with you

Category: Uncategorized Page 8 of 9

Why I Still Make Games in Flash/AS3 (for now)

As I look ahead to this year, I have several posts planned around game development in ActionScript 3 (Flash). So, I thought I should post a brief explanation about why I’m STILL developing games in AS3. After all, isn’t Flash dead? Aren’t we all living in a brave, new HTML5 world? Here are a few of the reasons why I’m developing in AS3:

actionscript vs javascriptAs of this post, HTML5 <canvas> support is still inconsistent across major browsers. Admittedly, the main issue is Internet Explorer, but they still have a HUGE market share and can’t be completely ignored. For most of our <canvas> projects at work, we still end up building a Flash backup. If you’re targeting desktop devices for your games, publishing to Flash gives you a bigger market share than HTML5 <canvas>.

HTML5 <audio> support is pitiful. In some browsers (*cough* Mobile Safari *cough*), it barely works at all. Then there are issues with preloading sounds so they are actually available when you need them.

SOLVED: WordPress pages 404 Error on new server

I ran into this problem recently when moving a client’s WordPress site to a new server. On the old server, all of the pages had permalinks set up and they worked great. After moving the site, none of the pages were working, except the home page. All of the other pages gave me a 404 error. The admin pages worked fine.

When diagnosing this issue, you need to check a few things. First, check that your admin panel is still working when you log in. If not, you may have a problem with your base urls in the database. To check this, log into your phpmyadmin panel and check the wp_options table in the database. There are 2 entries that contain the site url. Make sure that they are correct.

Assuming that your admin panel is working, the issue is probably a server setting causing a problem with the Permalinks. To check this, go to the Settings>Permalinks page and change the setting to Default. Now, go back to your homepage and see if your pages are working. The permalinks will NOT work, but you should be able to click around using the navigation.

If your pages now work, then the problem is that mod_rewrite is not enabled correctly on the new server. If you want to check this, simply create a new htaccess file with the following code:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^test\.html http://www.google.com [QSA,L]
</IfModule>

*note that your RewriteBase will be different than mine.

Now, go to your WordPress site and try to navigate to test.html. It should redirect you to the Google. If not, then mod_rewrite is definitely not working and you need to have your server admin or hosting company fix it.

I found a lot of people with the same issue when I was trying to fix this, but no one seemed to have a solution. Hopefully, this will help.

Flash AS3: Track SWF memory usage and framerate with SWFProfiler

This is just a quick post to let you know about another essential AS3 class you should download right now. It’s called SWFProfiler and it adds this slick memory usage and framerate monitor to your SWF:

SWFProfiler Shane McCartney

Shane McCartney has built this clever component and released it for free. It is completely self-contained in it’s own class file. So, using it only requires 2 lines of code:

import com.lia.utils.SWFProfiler;
SWFProfiler.init(stage, this);

I should also mention that it is automatically added to the context menu of your SWF, so you just right-click to show it or hide it.

To see the SWFProfiler in action, go to Shane’s blog.

You can download the most recent version of the SWFProfiler class from google code. Shane has a few other goodies there as well.

Why HTML5 is not going to kill Flash anytime soon.

html5_vs_flashEver since Steve Jobs announced that Flash will NEVER be allowed on the iPhone or iPad, there has been a lot of talk about HTML5 – how it is going to kill Flash once and for all. Let’s just ignore the fact that Apple, Adobe, Microsoft, and Google all have a large financial stake in the outcome of this argument. What about the technical feasibility of replacing Flash with HTML5? Well, HTML5 has some pretty cool features, but it is not going to kill Flash anytime soon. Here’s why:

Reason #1: The browser support isn’t there yet.
There is a lot of talk about how “all the modern browsers already support HTML5.” Well, that may be true, if you ignore Internet Explorer in your list of modern browsers. Somewhere between 30% and 50% of people on the web use Internet Explorer. At least 8% of people are still using IE6, which is a decade old and doesn’t even fully support HTML4! And what about all of the people using outdated versions of Firefox? The modern browsers may already support HTML5, but modern browser market penetration is probably somewhere around 50% and it will be years before it reaches a level necessary for most people to adopt it as the standard. As a developer, I can tell you that most developers will be stuck programming in HTML4 for the next 5 years or more, because it’s hard to explain to clients why their mother can’t look at their fancy new website. Flash has a 98% market penetration. HTML5 won’t be able to compete with that for a long time.

Reason #2: There is still no video standard for HTML5.
This is a related issue to Reason #1. There are currently at least 3 video standards competing for dominance in HTML5. MostĀ  browsers support only one of the 3 formats. It’s a bit like the recent Blu-ray vs. HD DVD war. Eventually, one will be the winner, but in the meantime, no standard means hassles for developers. It is simply easier for developers (and clients) to build things to a standard that most people can view, so most of them will probably stick with Flash video for now (remember the 98% market penetration from reason #1).

Reason#3: No DRM on HTML5 video.
HTML can deliver video directly through your browser with no plug-in. That’s great. The other great thing about HTML5 video is that you can right-click the video and save it to your desktop. Well, it’s great for consumers, but the idea of putting video on the web with no DRM (Digital Rights Management) makes studio execs panic. There is NO WAY that movie and TV studios are going to put all of their content out there to be downloaded and stored on your hard drive. Many large video sites like hulu.com have already said that they will not be switching over to HTML5 until the DRM issue is resolved.

Reason #4: Developers can’t protect their intellectual property.
As a developer, I can tell you that programming games and rich web applications isn’t easy. It takes hundreds of hours to program a cool Flash game. Even if I could do it in HTML5 and Javascript, I’m not going to to do it. The reason is simple: HTML5 code is visible to anyone who visits my web page. If I’ve spent all that time creating a cool game, I don’t want to expose all of my code to everyone in the world. If I did that, there would be crappy clones of my game popping up all over the web within a week or two. Flash allows me to protect my intellectual property in a way that HTML5 doesn’t.

Reason #5: Coding for multiple browsers is easier in Flash.
Not only does Flash protect my code from prying eyes, it provides me with a single set of rules to follow for coding across multiple platforms (Windows, Mac) and multiple browsers (IE, Firefox, Safari, Chrome, etc). To create something cool in HTML5, I would need to use Javascript. The simple fact is: Javascript sucks. It behaves differently in different browsers and you spend more time tracking down weird, browser-specific bugs than you do actually creating awesome web apps. Flash just makes development easier (and ultimately cheaper for clients).

Reason #5: HTML5 simply can’t compete with Flash in providing a rich media experience.
HTML5 has some animation capabilities built in to it, but Flash is way ahead of it in this regard. Flash provides a Graphical interface that a designer can use to create incredible animations and graphics. HTML5 requires a programmer to create cool animations. Flash is more powerful and easier for people to work with. I’m not saying that HTML5 and Javascript won’t catch up to Flash, but it won’t happen for a long time.

Reason #6: HTML5 is slower than Flash.
Ever since Apple’s announcement, people have assumed that what Steve Jobs said was true – Flash is too slow for the iPhone. Well, a number of clever people have actually run speed comparisons between Flash and HTML and have found that HTML5 is generally SLOWER and MORE RESOURCE INTENSIVE than Flash. Ouch. That doesn’t sound like progress to me.

Reason #7: Nobody really cares.
Frankly, most people don’t care how they get their content, as long as they get it. Despite what Steve Jobs thinks, no oneĀ  really cares what technology is used to allow them to watch videos on YouTube. Even the Apple fankids who are applauding the decision not to put Flash on the iPhone probably don’t really care – most of them had never heard of HTML5 before this announcement and most of them still don’t really know what Jobs is talking about . It’s all about delivering the content. If Apple can’t give people the content they want, then people will use a different technology.

Obviously, I make my living as a Flash developer, so you may be inclined to think that I’m biased towards Flash. That may be true, but I am really just a developer – I will use whatever tools are best for the job. Right now, Flash is the best tool for creating a rich web experience . It has the best combination of capabilities and market penetration. HTML5 simply can’t compete with it right now.

Need more info? Here are some links I’ve found that are great resources for HTML5 development:

A video discussing the HTML5 vs Flash debate from a developer’s perspective

A good explanation of HTML5 video and how to properly implement it for best cross-browser support

Latest news and articles about HTML5 video

Page 8 of 9

Powered by WordPress & Theme by Anders Norén