February 1GAM Recap

Last week I completed my February 1GAM game called It’s a Roguelike. It is a simple one-level puzzle with roguelike movement and gameplay. I used create.js again, branching off from some of the foundation I established with my January game Pongball. In this post I’ll briefly go over what I set out to do, what I accomplished, and some lessons learned. Continue reading

One Game A Month Devlog #2

For my January game, I initially set out to learn Melon.js and implement a simple pong-style game using it. I was initially drawn to Melon.js after seeing a Ludum Dare 25 game called The Brink successfully implement a 2d brawler using it. I like how nicely Melon.js integrates with Tiled, and several things (gamestates, screens, menus) were built into the engine and straightforward to implement. It also performs fairly well, and it could handle reasonable amounts of objects on screen and full screen scrolling without breaking a sweat. After going through the tutorial, I still felt pretty confident I could accomplish what I wanted with it. Continue reading

One Game A Month Devlog #1

I joined the One Game A Month site on a whim when I saw Christer Kaitila’s post about it. At the time, I was attempting to plan a large RPG project, and I wasn’t really serious about committing to the challenge. However, as the scope of my RPG project and my own indecisiveness grew, I realized I needed to get a few more small projects under my belt before I could undertake a large project. Continue reading

System.Image Overflow Error

While I was building a simple tool to slice apart an image into an array of tiles, I ran into a strange error.

When doing this:

using (FileStream fs = new FileStream(InputImage, FileMode.Open, FileAccess.Read))
{
    OriginalImage = Image.FromStream(fs);
}

This happened:

System.OverflowException: Overflow Error.
 at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
 at TileMaker.Program.LoadImage() in C:\Users\kmfitzgerald\Documents\Visual Studio 2010\Projects\TileMaker\Program.cs:line 140
 at TileMaker.Program.ProcessImage() in C:\Users\kmfitzgerald\Documents\Visual Studio 2010\Projects\TileMaker\Program.cs:line 98
 at TileMaker.Program.Main(String[] args) in C:\Users\kmfitzgerald\Documents\Visual Studio 2010\Projects\TileMaker\Program.cs:line 77
 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
 at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Threading.ThreadHelper.ThreadStart()

The image I was attempting to load, is a 47.2MB PNG file generated by a Linux server. It’s 49,738 x 24,666 pixels. In otherwords, it’s freaking huge.

After a good amount of Googling, I couldn’t find any similar cases of this occurring. I started to think that the image is damaged or just plain to big for .NET to load, however I started playing with the overloaded FromStream methods:

public static Image FromStream(
	Stream stream,
	bool useEmbeddedColorManagement,
	bool validateImageData
)

First, I tried to forget about the embedded color management:

Image.FromStream(fs, false, true)

No dice. Same Error.

Then I tried disabling the validation of the image data:

Image.FromStream(fs, true, false)

Success! The image loaded and was able to be used. For whatever reason, the system fails to validate the image due to the overflow error. Perhaps the image is simply too large to be validated? Not sure, but maybe someone out there knows a bit more about it.

Google Is Not (so) Evil

I’m not sure what all the panic is about Google terms of service in relation to Google’s shiny new Google Drive product. The blogosphere is abuzz with “GOOGLE IS EVIL” and “GOOGLE WILL STEAL YOUR IP”.

Let me be clear: this is totally and completely false.

Here’s the offending section pulled straight from Google’s Terms of Service (emphasis mine).

Your Content in our Services

Some of our Services allow you to submit content. You retain ownership of any intellectual property rights that you hold in that content. In short, what belongs to you stays yours.

When you upload or otherwise submit content to our Services, you give Google (and those we work with) a worldwide license to use, host, store, reproduce, modify, create derivative works (such as those resulting from translations, adaptations or other changes we make so that your content works better with our Services), communicate, publish, publicly perform, publicly display and distribute such content. The rights you grant in this license are for the limited purpose of operating, promoting, and improving our Services, and to develop new ones. This license continues even if you stop using our Services (for example, for a business listing you have added to Google Maps). Some Services may offer you ways to access and remove content that has been provided to that Service. Also, in some of our Services, there are terms or settings that narrow the scope of our use of the content submitted in those Services. Make sure you have the necessary rights to grant us this license for any content that you submit to our Services.

You can find more information about how Google uses and stores content in the privacy policy or additional terms for particular Services. If you submit feedback or suggestions about our Services, we may use your feedback or suggestions without obligation to you.

Now, the clause that is causing a stir is this, “you give Google (and those we work with) a worldwide license to use, host, store, reproduce, modify, create derivative works (such as those resulting from translations, adaptations or other changes we make so that your content works better with our Services), communicate, publish, publicly perform, publicly display and distribute such content.”. Taken out of context, this sounds very bad. Now, continue reading, and you’ll see this: “The rights you grant in this license are for the limited purpose of operating, promoting, and improving our Services, and to develop new ones”.

It’s clear that Google must require these rights in order to format and manipulate your content on the web. For example, when you want to translate a document you uploaded to Google Docs, or now Google Drive, Google needs the ability to look at, interpret, and change your document for the new language. There is no malicious intent here.

Simply stated, Google needs the ability to manipulate your stuff because you’re using their web-based service. Your web client is not manipulating the documents, their servers are. This should be common sense.

Remember, Google at heart is an advertising company, so anything you have on their system (Email, docs, social networking posts, photos, etc) give Google a much clearer picture of what to show you in terms of advertisements. They’re scary good at it, too.

Google is not personally identifying you, and they’re not going to steal your new flying car prototype you uploaded to your Google Drive. Worst case, they’ll grok the drawing and try to sell you vendors for that flux capacitor your drawing calls for.