I've been using Flash and ActionScript (never forgetting JAVA, PYTHON, and all my other favorite languages of course) since late this summer, and I've been surprised as to how quickly I've learned it. It's a great feeling, knowing that you can achieve something without having to have someone hold your hand all the way through. Fortunately, ActionScript is a lot like JAVA, so having some experience there made AS3 a lot less difficult to learn(I actually find AS3 more convenient than JAVA). There are three books that gave me the Flash know-how:
1) ActionScript 3.0 Game Programming University by Gary Rosenzweig:
Good reference book, though this would not be the book I recommend for a completely new programmer. Most of the book is just a collection of tutorials, making it a bit harder for the new guy to grasp all of the core concepts 1st. However, there is some great depth to this book and it touches on some fantastically deep topics like 3D racing, mapping, and so on.
2) Game design with Flash by Rex van der Spuy:
This is the 2nd Flash book I read, and I really wish it was the first. It is perfect for beginners, and the first 5 chapters laid out the basics of ActionScript really nicely. The rest of the book was still a good read, and touched on topics that other books missed like using trigonometry to find the angle of an object and use it to fire bullets, missiles, or glowing smiley faces.
3) Creating a Web Site with Flash CS4 by David Morris:
A good primer with Flash, this book is a fun, short, and easy read that a ferret could understand*. However, this book lacks the code power needed to run a truly good Flash site. For instance, Morris shows the reader how to make a form by dragging text boxes out from the side bar** and place them on the design. However, he ends the section abruptly saying, "To function properly and transfer data as intended, a form requires advanced ActionScript programming and connection to a database- complexity that is beyond the scope of this book." (122) Which is a really fancy way of saying, "I have no idea how to do this, but I can teach you how to draw a text box!"
Regardless, this book is sufficient for the beginning Flash designer, and I still got a lot out of it.
Footnotes:
*: Why hire people to build Flash sites anyway? Timone and Pumba will do it for half the cost.
**: Hey, don't laugh. Clicking and dragging is an art.
Friday, October 9, 2009
Teaching yourself ActionScript: Books I recommend
Posted by Brennon at 7:51 PM 0 comments
Labels: books, computer science, misc.
Thursday, October 8, 2009
Theoretical Thursday: My Thoughts On Free Software
Imagine this:
Radio frequencies are scattered with the ever popular band Survivor, suspenders are still in style, and computer code is just waiting to be written. You explore the world of code and watch the debut of the internet as a way for scientists to share data and evolve from there. You consider a new way to communicate from computer to computer, like writing digital letters. What will you call it? Amail? Qmail? How about... Email? You figure your career is set, and millions will pay to use your low cost communication service. Then, 1996 rolls around and some guy from Stanford named Larry Page has an idea to create something called Google. You think "no big deal" and publish your Email program to the world.
It's no big deal.
However, soon Google creates their Email service, Gmail, and gives it away to everyone for free.
13 years later you're teaching hordes of rowdy high school gamers Java, reminiscing about the "good ol' days" as you tighten your suspenders and select "Eye of the Tiger" on your Walkman.
While this scenario is purely fictional, there is some truth to the idea behind it. Software is becoming completely free, namely thanks to Google. While the goals of the Free Software Foundation are noble, they tend to make life a bit harder for independent developers. As free software becomes more available, people expect everything to be free. Just look at the iTunes App store, reviewers seem angry and any developer who dares charge more than $0.99 for his months of coding. Worse yet, consumers become critical of free software. Look at the reviews on my first game ever with ActionScript 3.0. The user is getting the software for literally nothing, and yet yet they often are angry at the developer if it does not meet their standards.
While free software makes it nearly impossible for developers to take advantage of the consumer (no, only big companies are allowed to charge their users $999.99 for software. *cough* *cough* Adobe) it also makes it hard for the developer to earn enough to support himself.
I fear the day when everything is free, and the only money circulating through software is via advertising or worse, only goes to Microsoft, Apple, or Adobe.*
Footnotes:
*: Don't get me wrong, these are three great companies, they just make the indie developer's life a bit more interesting.
Posted by Brennon at 9:29 PM 4 comments
Labels: computer science, Theoretical Thursday
Wednesday, October 7, 2009
Robotic Cars: Taking over the world (right after they can move 20 ft without crashing)
Today, while driving home from school, I saw a car with some sort of spinning sensor on the top. I recognized the design from a NOVA episode I saw in 2007 about the yearly robot car races. From what I remember, the rotating block on top most likely uses sonar to rapidly send out sonar pings as the module rotates. The sonar waves bounce off of objects and return to the sensor. The elapsed time since the ping was sent out is calculated and determines the distance of the object. And of course, there is an on-board computer that gets the car from point A to point B.
The NOVA episode was quite entertaining as most cars had extreme difficulty moving around stacks of hay, much less driving on the open road. Kudos to the engineers who finally got one of these things to work.
I assume this isn't just a Halloween prank because it appeared that no one was touching a steering wheel (cruise control?). The sensor on top is pretty high-end. There were two extremely nerdy looking guys* in the front seats and only Target advertises for Halloween this early in the month.
And of course I was able to snap a couple pics of it before we passed them.**
It's only a matter of time before it becomes self-aware... and enslaves us all.
This is one of the big pluses to living in the Bay Area. Only in San Francisco will you see a robot driving people home.
Footnotes:
*: I mean this in the kindest of regards, meaning they're Not Even Remotely Dorky.
*: The robots may take our freedom, but they'll never take our highway!
Posted by Brennon at 8:25 PM 0 comments
Labels: misc., science news
Tuesday, October 6, 2009
Flash development for the iPhone?!
Today is one of days I am overjoyed that I read the MAKE Blog, as I found an incredible bit of news today. As I scrolled down MAKE's page I found an article that nearly made me explode with excitement (Not literally... that'd be pretty weird). Adobe recently announced that Flash and ActionScript 3 developers (like me) will soon be able to deploy their applications on the iPhone. Yes, the iPhone. You may now take a moment to wear a black turtleneck and hold your hands up in the air like Steve Jobs and declare "All this.... coming to the iPhone!" and get roars of approval from fans who have no idea what you're saying and will later dig through your trash to find a half-eaten banana with your precious DNA on it.
Worship me!!!
Is this too good to be true? Will Flash developers finally stretch beyond the limits of your PC's (or Mac's, make Steve Jobs proud) browser? Can I go right now and code for the iPhone to my heart's desire? Yes, yes, and NO.
As far as I know this isn't too good to be true, because there's a catch. Though yes, Flash developers will be able to bust their way out of your monitor's confines and leap onto your iPhone, it ain't gonna happen any time soon. Of course, typical Adobe, we have to wait and buy the Flash CS5 upgrade to build iPhone Apps, until then only the special developers will be able to build iPhone apps with Flash.
[or watch this video on youtube]
The beta test will be released this year (hopefully sooner than later), and will be (promptly?) followed by the actual release of CS5. Unfortunately, I doubt I'll be a Beta Tester, as there are about 5 million* other developers slobbering over their keyboards trying to become one of the first to use it. Not to mention I haven't really made a name for myself in the Flash community other than my one sub-par game.
I personally think that to make things truly fair Adobe should put all 5 million of us Flash developers into one giant pit and have us fight for a single Beta copy of Flash CS5.
Footnotes:
*: I made up this number all by myself.
Posted by Brennon at 8:39 PM 0 comments
Labels: computer science, science news
Monday, October 5, 2009
The Marshmallow Test
Today I stumbled upon this fantastic video of a psychology experiment called The Marshmallow Test, where kids had to decide if they would eat a marshmallow immediately or wait for a few minutes. In return for waiting, the kids would get a second marshmallow along with the first.
This experiment has several applications to the real world like the stock market and religion, but rather than go into it now let's just enjoy the video.
[or watch the Marshmallow Test on Youtube]
I found it interesting how kids would deviously pick off small pieces of the marshmallow after being told not to, and then lying about it to the woman afterwards. A book was published a little while ago (can't remember the title now unfortunately) where the author asked kids under age 10 questions like "what is marriage?" and "What is love?". The author's rational was that kids under age 10 could not lie. Apparently the author never thought to temp the all-knowing toddlers with a marshmallow.
Posted by Brennon at 9:30 PM 0 comments
Labels: misc., science news
Sunday, October 4, 2009
Sunday Status: Water on the moon? and ActionScript Development Continues
Today marks the first ever Sunday Status post on BW Science Labs, with many to hopefully follow. In a Sunday Status I'll talk about science news on a global scale, and then a micro* scale at BW Science Labs.
Global
The other day I got an email from NASA that boasted new discoveries on water on the moon. I figured that it was probably another "on August 27th Mars will be as big as the moon!" hoax**, so I disregarded the message. However, sure enough word of water on the moon spread and turned out to actually have merit. The Apollo mission 40 years ago brought moon rocks back to earth for study, and though trace amounts of water were found researchers assumed that it was from contamination in the cargo crate.
One way water is detected on other planets or moons is by looking at the light that reflects off of one's surface. By looking at the wavelengths of the reflected light there were indications that hydrogen and oxygen had bonded, meaning either water or hydroxyl.
In actuality the craft that picked up the traces of water, Deep Impact, was the 3rd craft to have detected water/hydroxyl, the first being Chandrayaan-1 and later Cassini. Now that 3 separate crafts have detected water on the moon NASA scientists were sure that there was water.***
Micro
I've begun development of a new game that's being programmed in ActionScript 3.0 (a programming language similar to Java) featuring a little robot that has to save its base from armies of other robots. This may not be an award winning concept, but its proving to be a great learning experience. As of now I've only had a chance to work on it 20 minutes here and there, so I've only written a bit over 500 lines of code for it.
Above is some of the code I wrote for the built in store where the player can buy upgrades, health, and other fun stuff using the currency earned after defeating robots.
As of now the world is not yet ready for my terrible drawing skills, so I'm trying to convince someone else to do the game art, until then the place holder images look like they've been drawn by a three year old.
Footnotes:
*: and I do mean "micro". All of the BW Science Labs employee(s?) can attest to that.
**: I was so excited. Such as shame as I stood freezing outside on August 27th hopefully staring up at the empty night sky.
***: Apparently the first two times they detected it they forgot to email me. Oh yeah, and tell the rest of the country too.
Posted by Brennon at 4:28 PM 0 comments
Labels: science news, sunday status
Saturday, October 3, 2009
Final Thoughts on Linux
I've been using computers for a while now, but always running Mac OSX or Windows. However, recently I've tested the Linux waters. I installed both OpenSolaris and Ubuntu to see what all the Linux hype was all about*.
OpenSolaris
Open Solaris is pretty cool looking. It has neatly structured top and bottom bars that are simple and avoid clutter. The workspaces are useful as the user can easily switch between 4 desktops. I especially like the idea of having a built-in software catalog which can be used to find all kinds of programs to download.
I have a strict policy on free things: never complain about something that costs you nothing. This is something that seems to have slipped the minds of a lot of free software users**. That said, OpenSolaris is not without flaws. When I was entering my information into the computer after I first turned it on OpenSolaris asked me for a username and password, which the computer said were optional. I decided to enter in a password later, so I left the text fields blank. Later when the computer restarted there was a prompt for a username and password, which did not exist. I reinstalled Open Solaris from a disk that I fortunately had on hand. When my computer was fully operational several errors popped up on the screen saying that it could not connect to the wireless network I had. I used Sun's tech support forum at opensolaris.org and this is the response I got:
Do you have security enabled on your wireless network (ie router or access-point)? Your driver may not be capable of security like I just found out with the iwh0 driver....
Alternatively are you using DHCP or static as you would need to turn off nwam if using static.
Or if go to console and su to root, then use ifconfig coupled with wificonfig to create a profile and setup auto-dhcp or plain dhcp for your adapter - that may help!
Just a few thoughts anyway :-)
Rather than go through all of the "coupling" and "ifconfiging" I decided to try out Ubuntu next.***
For the record, it seems that my case was an isolated incident as I found very few other reports with the same errors, all in all OpenSolaris isn't a bad Operating system.
Ubuntu
When I installed Ubuntu it connected to my wireless network with ease, and Firefox was neatly tucked in the top bar. The username and password prompt screen looked really cool, I almost felt like I was in 24****. For some reason my sound was not working on Ubuntu while it worked on other Operating Systems I tested. However, like OpenSolaris it has an easy to use software installer built in which I liked using, along with a built in internet radio and some kind of iTunes-like music software. Ubuntu is fun to use and very aesthetically pleasing, especially all of the super cool 3D sleep mode animations.
Linux is fantastic as it is free, and there are all kinds of open source variations out there. I'm glad to see that there are options extending beyond the world of Steve Jobs and Bill Gates.
Footnotes:
*: Seriously, have you seen these Linux guys wearing their "Hacking is not a crime" T-Shirts?
**: Just look at all of the less-than-constructive criticism new game programmers get on the App Store and on Flash portals.
***: You may be chuckling at my wifi ignorance, but to me most of that message was like spanish to me (ask my spanish teacher and you'll know what that means).
****: Minus the dramatic sound effects and spinny chairs (I have to keep dreaming about a chair that can rotate a full 360 degrees).
Posted by Brennon at 10:10 PM 0 comments
Labels: computer science