Archive for the 'Left-Brain' Category

Shameless plug: www.docusync.com

September 21st, 2007 | Category: Products, Left-Brain, Daily, Personal

Hey folks. I just wanted to plug a business that’s owned by a friend of mine that provides online document storage and management, DocuSync. Their feature set and pricing is pretty damned outstanding compared to the other services I’ve tried and I whole-heartedly recommend them to folks in need of such a solution. Which, in reality, is just about all of us with USB thumb drives being notoriously unreliable and the need for high integrity off-site backups being a fact of life.

They offer terrific personal and enterprise plans and even provide licensing opportunities for the application itself.

They’re currently running a free 30-day trial, and you don’t even need a credit card for the trial, so there’s nothing at all to lose.

Go ahead and take a look at www.docusync.com!

LB

P.S. Disclosure: Both Right-Brain and myself do work for these folks now and again, but this wasn’t a paid ad. I’m sincere in my belief that they offer a terrific service.

No comments

Status: AS3.0 game programming tutorials

September 19th, 2007 | Category: Actionscript 3.0, Game Programming, Tutorial, Flash, Left-Brain, Daily

I had a query regarding the game programming tutorials I’ve been working on. The query is “Where the heck are they?”

Here’s a quick status. I would like to have the game completed before I posted the rest of the tutorials. However, due to some unforeseen circumstances the actual game itself is held up (it’s 94% finished, just hung up getting some animations done).

I’m a little split on if I should go ahead and continue the tutorials with the game as-is, or if I should go ahead and wait for a polished product to deliver to you guys.

What would you guys prefer?

LB

3 comments

D&D Humor: Too funny to pass up!

September 19th, 2007 | Category: Humor, Fantasy, Gaming, Left-Brain, Daily

My wife sent me this link while ago. Found myself damned near on the floor. I’ve never been a major D&D player (pretty much right with the author and his experience), but this stuff is a great read.

http://www.headinjurytheater.com/article73.htm

Enjoy!

LB

2 comments

Another Tricky Flex 2 Error

September 14th, 2007 | Category: Actionscript 3.0, Flex 2.0, Flash, Left-Brain, Solution, Daily

Ran into another Flex 2 error the other day that’s again not crystal clear about what it’s trying to tell you. This one is:

Invalid Embed directive in stylesheet - can’t resolve source ‘Embed(source = “assets/my_picture.png”)’

Here’s the source:

1
2
3
4
5
6
       <mx:style>
		.customVideoTree
		{
			defaultLeafIcon:Embed(source="assets/ds-qhv-film-icon.png");
		}
	</mx:style>

This one is pretty clear in hindsight, but care to guess what that error up there means to say? My initial thinking was that it was a syntax error with the Embed directive, but nope, the $25,000 answer is. . .

file not found

Now you know what can’t resolve source means, which of course makes perfect sense now. . .but sure tripped my up on the spot.

LB

1 comment

Flex 2 Strange Error

September 08th, 2007 | Category: Actionscript 3.0, Flex 2.0, Flash, Left-Brain, Solution, Daily

I ran into an error while working on a Flex2 application this morning. The error made zero sense in the context, and I wasn’t able to find anything that explained it (reasonably) via google. So, here’s what I found the hard way :

The error was:

[RPC Fault faultString=”Error #2070: Security sandbox violation: caller cannot access Stage owned by .” faultCode=”Client.CouldNotDecode” faultDetail=”null”]

Here’s some sample code that will replicate the error:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" width="800" height="600">
	initialize="e4xService.send()"&gt;
 
	<mx:script>
		<!--[CDATA[
			public function handleHttpResult(event:Event):void
			{
 
			}
		]]-->
	</mx:script>
 
	<mx:httpservice id="e4xService" url="assets/videos.xml" result="handleHttpResult(event)">
</mx:httpservice>
</mx:application>

And here’s some example XML for the “assets/videos.xml” file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
<applications>
	<application label="Web Application">
		<category label="Upload Manager Set Up">
		<category label="Basic File Operations">
			<subcategory label="Uploading">
			<subcategory label="Downloading">
			<subcategory label="Moving and Cut  Paste">
			<subcategory label="Deleting and Recovering">
			<subcategory label="Creating Folders">
			<subcategory label="Setting View Mode">
		</subcategory>
		<category label="Sharing">
			<subcategory label="Shared Folders">
			<subcategory label="Shared Files">
			<subcategory label="Temporary Passwords">
		</subcategory>
		<category label="Address Book">
		<category label="Billing">
		<category label="Sub-Accounts">
		<category label="Search">
		<category label="Web Import (Advanced)">
		<category label="Multimedia">
	</category>
	<application label="Desktop Application"></application>
		<category label="Desktop Application Install">
		<category label="Basic File Operations">
			<subcategory label="Uploading">
			<subcategory label="Downloading">
			<subcategory label="Moving and Cut  Paste">
			<subcategory label="Deleting and Recovering">
		</subcategory>
		<category label="Sharing">
			<subcategory label="Shared Folders">
			<subcategory label="Shared Files">
		</subcategory>
		<category label="Backups">
		<category label="Syncing">
	</category>
</category>
</subcategory></category></subcategory></subcategory></subcategory></category></category></category></category></category></category></category></subcategory></subcategory></category></subcategory></subcategory></subcategory></subcategory></subcategory></category></category></application></applications>

Line 25 had some poorly formatted XML; “<application label=”Desktop Application”/>” (Closing the tag while it had children). This was my problem.

So, the short answer is: If you see this problem and you’re remotely loading an xml file, go over your xml with a fine toothed comb. The text of the error doesn’t make a lot of sense in context.

Hope that helps!

LB

6 comments

Quick Status

August 30th, 2007 | Category: Left-Brain, Blog Business, Daily

Hey folks,  we’ve been quiet this week so I thought I’d drop you guys a note and let you know that we’re not gone.  It’s a hectic week from a personal and professional aspect and we just have our noses to the grindstone.

A little preview of stuff coming up:  Right-Brain has a bug to do a little tutorial on the iPhone and getting 3rd party native apps running there.  I’m still working on part 3 of the AS3 game programming tutorial, and I’ve also started pondering an article on rsync. . .love that nifty little tool.

Anyway, stay tuned, we’re still here and working on bringing you guys some (hopefully) useful info.

LB

P.S.  Oh, two quick things: 1) I’ve updated the vmware-server backup stuff again.  If you’ve been keeping track, take a look.  2) I’m PISSED. . .You can’t make calls to native applications (ie, exec) with Adobe’s AIR product.  That irritates the hell out of me!

No comments

Actionscript 3.0 Game Programming - Part 2 - The Tools

August 19th, 2007 | Category: Game Programming, Actionscript 3.0, Tutorial, Flash, Left-Brain

Welcome back. Today I’m going to give you a brief overview of the tools that I am using for developing a game in Actionscript 3.0. I’m also going to throw in a bonus paragraph or two and describe Quacker Whacker in more detail as I should have done in Part 1.

There are, of course, options for everything, but the tools I seem to have settled on are Flexbuilder 3.0 beta (free public beta until release, Flexbuilder 2 is fine also), Adobe Flash CS3, and Adobe Illustrator CS3 and Photoshop CS3(sort of, I’m very novice with the last 2).

Flexbuilder is my IDE, it’s based on Eclipse (my personal favorite) and does most of the nifty-cool things that an IDE should do; code highlighting, in-flight error checking, running the app, full debugger, etc. The one thing is doesn’t have, that I have been able to find is snippets - the ability to attach some tedious, often used bit of code to an expandable abbreviation. All of the Actionscript coding is done here, along with your frequent testing and debugging. It is NOT necessary to use Flexbuilder to create Flex or Actionscript applications, the Flex framework is free and contains command line compilers. However, the how-to on using the command line stuff is beyond the scope of this article and is covered heavily in other books and sites.

The 2nd piece of the puzzle is Flash itself. I know. . I know, in the intro article I said that is what I was trying to avoid. The reason I wanted to avoid it though is because it’s not designed for programmers to create large amounts of code. It was, however, created for animators and graphics geeks to do what they do best, and in that, it excels. So, yes, I do use Flash, but I’m only using it to create my animated assets which are then imported in the game as objects that I am free to instantiate and use as I see fit. It’s really very cool. I’ll be covering how to create an asset in Flash, export it to Actionscript, and using it in the game (from a very novice graphics standpoint).

The final tools mentioned are Adobe Illustrator CS3, and Adobe Photoshop CS3, and mentioning them is about all I’m going to do. If Mr. Right-Brain is interested in doing an article on them I would encourage that. But I’m very much a novice and would probably do you more harm than good ; ) They are being mentioned, however, as these tools, or tools like them, are very important in this process for making really super-duper graphics, especially when you start making games that you want the public at large to enjoy. Typically the base graphic assets would be created and tweaked with these applications before moving them into flash for animation.

So, those are the tools in a nutshell. Now for the bonus material. What is Quacker Whacker?

As I mentioned in the intro article, Quacker Whacker is a knock off of the old Galaga/Space Invader type games. There’s a formation of ducks that fly across the screen. While making this journey they have the potential to poo or to drop eggs. The hunter is at the bottom of the screen and is able to shoot the ducks with one of 3 types of rifle, semi-automatic, automatic, or shotgun. If the hunter is hit by a poo, splat, he loses a hat (life). If the hunter catches an egg, he is gifted with a bonus. . .score, new gun, ammo, extra hat (life), etc. When the flock goes off one side of the screen, the flock will drop down a bit, turn around and cross the screen in the other direction. The hunter gets bonus points when he shoots the entire flock. The earlier he does this, the higher the bonus. Finally, it’s not implemented yet, but there are plans for a Hawk that will dive at the hunter. The hunter must shoot the hawk or be got by it. There will be a large bonus for shooting the hawk. That’s the basics of the game.

That’s it for this installment. Join me again next week when we will discuss the basics of creating a game. The various screens, game manager, game loop, etc. There will be code (finally)!!

See ya then!!

1 comment

Actionscript 3.0 Game Programming - Part 1 - Introduction

August 11th, 2007 | Category: Game Programming, Actionscript 3.0, Tutorial, Flash, Left-Brain

Adobe Flash content. . .it’s everywhere. Can’t hardly look at a web page without seeing some, and it makes up an astounding chunk of the casual games market. It’s installed on damned near every single individual’s machine, and it’s kept current by the Flash update mechanism. It’s been around forever, had very few problems (that I’m aware of), and is just about universally trusted as an interactive content delivery mechanism (as well as loathed as an ad delivery mechanism . . .who cares how many bananas I can peel for a free iPod? hehe, whatever!)

This, friends, is obviously the place to be if you want to create software in the casual games space. However, there is one BIG historical problem. Creating games in the Flash application, via the time-line concept, is not very intuitive for us “real” programmer types if not down right confusing*. It’s definitely something that’s easier for the designer types, and has provided them with incredible opportunities to break into that space. However, times are a-changin’. With the introduction of FlexBuilder 2.0, Actionscript 3.0, and Flash CS3, us software engineering types can finally get into the game with gusto. And let me tell you something. . .I, for one, am LOVING it!

So, I guess I’m going to try and share the love a bit. I’m just about finished writing a game called Quacker Whacker. It’s a loose and wholly silly take off of the Space Invaders/Galaga platform games and was conceived and created strictly as a learning project for this technology. The goal was to do it strictly as a coding (AS3.0) project, not a bunch of Flash, etc. I have deviated from this a bit and used Flash to develop my animated assets. Flash is NOT necessary, but I think it’s a very strong and complementary tool in this context. I think as we go on, you’ll probably agree.

In these tutorials I will cover a number of topics that are specifically related to this technology. It is not my plan to get into good game design (which this game doesn’t demonstrate anyway : b), coding practices, how to create the Flash assets (aside from what’s important with this specific set of tools), etc. This tutorial will not be a 0-100 walk-through of creating the game. However, I will be providing complete sources (code, and assets), and the game itself will be available to check out.

I think that pretty much wraps up the introduction. It is my intention to post a new section of the tutorial at least once a week for the next 3-4 weeks. The next section to come next week will look at the tools we’re going to be working with, including: FlexBuilder, Flash CS3, and Illustrator.

LB

P.S. If there’s something you are interested in seeing in the tutorial, let me know. I don’t have it completely developed yet so there’s room for additions and now is the time ; )

* I know I’m leaving out some technologies that allowed you to programatically build flash content. But I’m pretty much a stickler for standards personally. So I just never totally warmed up to them.

4 comments

vmware-server VM backups script updated

August 10th, 2007 | Category: Left-Brain, Solution, VMWare, Daily

If you’re interested in the vmware-server backup script, it’s been updated to include suggestions from you guys. Can see it here.

LB

No comments

vmware-server VM backups

August 06th, 2007 | Category: Left-Brain, Solution, VMWare, Daily

[Updated 08-30-2007: script updated to fix a typo where the deletion of files after x days wasn’t functioning. The single quotes should have been double quotes. . .apologies folks. -LB]

[Updated 08-10-2007: script updated based on feedback. Now allows for exemptions via the EXEMPTION_ARRAY and will create the backup directories if they’re not there. Also put in a little more documentation -LB]

Ok, I do love VMWare, an absolutely terrific series of products. They solve so many problems, and do it with ne’er a hiccup in my experience. However, this particular post is about a problem, and its solution.

For those that haven’t been keeping up, not so long ago VMWare took their GSX (low-end server) product, relabeled it vmware-server and released it for free (not open source, just freeware). It’s truly a great product, it allows you to create and run VMs in a server environment. It’s not particularly crippled, and that I can recall, I’ve had zero downtime related to vmware-server. If you’re running on the cheap, don’t want to mess with Xen, Microsoft Virtual Server, etc. this is the way that I would recommend going.

However, you notice that I qualified crippled up there. Backing up a vmware-server virtual machine without bringing it down is impossible (at least without a third party product). That being the case, the goal is to minimize your downtime while maximizing the viability of your backup.

With this criteria in place, you do not want to back up the live data. The vmware-server disk images are quite active, and if you were to just copy them live, you would certainly end up with, at best, corrupted data, and at the worst, a completely fubar’d disk image. Either way, it’s most likely a useless backup. So, that means that we need to find a way to back up the disk image while it is not actively in use.

Click “Read More” to see a few options, and the bash script created to solve this issue.

Read more

48 comments