Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
9. November 2011

 

According to ZDNet Adobe just took Flash for mobile out to the pasture and put a bullet in it.

 

Our future work with Flash on mobile devices will be focused on enabling Flash developers to package native apps with Adobe AIR for all the major app stores. We will no longer adapt Flash Player for mobile devices to new browser, OS version or device configurations. Some of our source code licensees may opt to continue working on and releasing their own implementations. We will continue to support the current Android and PlayBook configurations with critical bug fixes and security updates.

 

I am no fan of Flash, but frankly HTML5 isn’t even close to be a valid replacement yet.  This move seems ill advised at best and downright stupid at worst.  I know hands down my Asus Transformer tablet gets far more usage than my iPad simply because it supports Flash.  If there was a valid rich media alternative to products like Flash and Silverlight, I would be all over it, but that technology sure as heck isn’t HTML5!

 

 

I don’t really have any stakes in this game at all, but I do think it was an ill advised play by Adobe.  So they are basically going to become a pure tools provider going forward?  This is a bit odd, as I’ve understood it, AIR was a bit of a flop?  Regardless, a move focusing more on AIR and away from Flash, is a move into being fully a development tool provider and out of being a platform provider.  One of the biggest sales bullets for desktop flash, it’s ubiquity, just went away.

Totally Off Topic


2. November 2011

 

 

 

If you have left a comment recently and it appears to be gone, or if you get notification of a comment that when you check it doesn’t appear to exist, don’t worry you are not alone!   Something screwy is going on and sadly it is outside of my control as comments are handled offsite by disqus.  For some reason it isn’t consistently showing new comments, although old comments appear to be working fine.  Hopefully it will be resolved soon.

 

In the meanwhile, rest assured I can see all of the comments are in fact intact on disqus.com, so hopefully this is just a brief interruption.  If you want to contact me and comments remain down, you can email mike [@] gamefromscratch [dot] com.   Can you tell I’m sick of spambots? Winking smile

 

Hopefully this is a very short blip.

 

EDIT:  They appear to be back…. for now.

 

EDIT2: 11/6/2011, it's happening again.  Pay no attention to the comment totals at the top of a post, click into the post to see if there are comments.  IF you made a comment and it disappeared, do not worry, it's still there... somewhere.  I think I have erased two comments total since starting GFS, one was a racist diatribe and the other was a spam bot, so don't worry, I didn't erase it.

Totally Off Topic


4. July 2011

 

As is the joy of being a PC user, you are on occasion going to encounter Gremlins.  I’ve been doing this way too long and recently encountered a problem that I simply could not solve.  When rendering some video in Blender recently, I started getting out of memory errors, then my computer would crash completely.

 

I spent many days trying to figure out what the hell was going on.  After countless Google searches and the like I found absolutely no solutions and in the end, I decided to re-install completely.  Then much to my chagrin, after installing and running all the various service packs, the problems came right back again.

 

In the end, it ended up being the Broadcom Wireless Tray application that was leaking memory.  Worst part was, it never showed up in PERFMON, or Task Manager, which made debugging a nightmare.  The memory was being leaked at such a low level, none of the monitoring tools tracked it… a proverbial needle in a haystack.

 

Then I happened upon this:

 

… that’s a lot of Page Faults, and thus my first indicator.  Page Faults sadly aren’t shown in Task Manager by default and thus I overlooked this issue.  In the end, removing BCMWLTRY.exe and presto, leak is gone.

 

Totally off topic, but this problem is why I haven’t updated more here.  Hopefully just one person comes across this problem and I help them in some way, as when I googled, there was nothing.

Totally Off Topic


30. May 2011

 

So, until this point I have been using Microsoft’s Expressions Encoder to do video capture for tutorials on this site.  I am an MSDN subscriber and already had the Expression Studio installed, so even though I was really (…….. really ) pushing the bounds of my license I went ahead and used it.  Then I ran into a pretty big snag, see the encoder that ships with my Expression Ultimate version is the “free” version, which you can download here.  It is an impressive product, that makes for very small file sizes that are surprisingly detailed.  That is, until you hit the 10 minute mark.  That… is a sizable gotcha.

 

So, I started looking into alternatives.  Camtasia Studio is easily the big player in this space, but with a pretty severe 350$ price tag.  The before mentioned Expressions Encoder can be had for a more modest but still too high 200$.  The I found Cam Studio which is a free and open source alternative, but it really wasn’t a viable option.  My first test was 15 seconds long and a little over a GB in size!  Plus frankly, it looked awful.  I just don’t think Cam Studio is set up to do HD video.  I played around with various codecs and settings but frankly never got anything that approached usable. 

 

I was really starting to fret that I would have to put out a couple hundred bucks to simply capture video and frankly me and my money are rather tight friends and don’t want to part so easily.  Then a moment of serendipity occurred… I came across a shareware product called FastStone Capture which effortlessly recorded my screen, at > 15FPS directly to WMV.  After a minute of recording at 1080p I was well under 20MB!  What is so serendipitous about that you ask?  Ironically enough, I had already purchased this product a couple years back for helping me with screenshots!  SCORE.

 

Anyways, if you are looking to do video/screen capture on a Windows machine, I highly recommend you check out FastStone.  Comes with a fully featured trial and is only 20$ if you register it.  Keep in mind, it is NOT a video editor and isn’t even in the same league as Expressions Encoder or Camtasia for features, but if you want to just capture the screen in a high quality but small size, this is the best product I’ve seen.  Actually as I am using Blender for NLE and not Expressions, my work flow just became a heck of a lot faster, as I lost an encoding step!

Totally Off Topic


26. April 2011

So today, after 6 days of downtime I get word from Sony that apparently mine and 75 million other accounts have been compromised, including pretty much all of my personal information. Worst of all, this information included my password and possibly my credit card information.

 

This is an unforgiveable sin on many levels, but more than anything I have to say this… if you are storing sensitive information in your game, encrypt the hell out of it!  Really, it’s not that hard.  Actually here is how you do it…  this is code I have used in another project, but sadly I forget exactly where I got it from for proper crediting.  So, if you are the author, let me know and I will give proper accreditation.

using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;

namespace ConfigurationLibrary
{
    public sealed class CryptoString
    {
        private CryptoString() { }
        private static byte[] savedKey = ASCIIEncoding.UTF8.GetBytes("YOURVALHERE");
        private static byte[] savedIV = ASCIIEncoding.UTF8.GetBytes("YOURVALHEREASWELL");
        public static byte[] Key
        {
            get { return savedKey; }
            set { savedKey = value; }
        }
        public static byte[] IV
        {
            get { return savedIV; }
            set { savedIV = value; }
        }
        private static void RdGenerateSecretKey(RijndaelManaged rdProvider)
        {
            if(savedKey == null)
            {
                rdProvider.KeySize = 256;
                rdProvider.GenerateKey();
                savedKey = rdProvider.Key;
            }
        }
        private static void RdGenerateSecretInitVector(RijndaelManaged rdProvider)
        {
            if(savedIV == null)
            {
                rdProvider.GenerateIV();
                savedIV = rdProvider.IV;
            }
        }
        public static string Encrypt(string originalStr)
        {
            // Encode data string to be stored in memory.
            byte[] originalStrAsBytes = Encoding.ASCII.GetBytes(originalStr);
            byte[] originalBytes = { };
            // Create MemoryStream to contain output.
            using(MemoryStream memStream = new
                     MemoryStream(originalStrAsBytes.Length))
            {
                using(RijndaelManaged rijndael = new RijndaelManaged())
                {
                    // Generate and save secret key and init vector.
                    RdGenerateSecretKey(rijndael);
                    RdGenerateSecretInitVector(rijndael);
                    if(savedKey == null || savedIV == null)
                    {
                        throw (new NullReferenceException(
                                "savedKey and savedIV must be non-null."));
                    }
                    // Create encryptor and stream objects.
                    using(ICryptoTransform rdTransform =
                           rijndael.CreateEncryptor((byte[])savedKey.
                           Clone(), (byte[])savedIV.Clone()))
                    {
                        using(CryptoStream cryptoStream = new CryptoStream(memStream,
                              rdTransform, CryptoStreamMode.Write))
                        {
                            // Write encrypted data to the MemoryStream.
                            cryptoStream.Write(originalStrAsBytes, 0,
                                       originalStrAsBytes.Length);
                            cryptoStream.FlushFinalBlock();
                            originalBytes = memStream.ToArray();
                        }
                    }
                }
            }
            // Convert encrypted string.
            string encryptedStr = Convert.ToBase64String(originalBytes);
            return (encryptedStr);
        }
        public static string Decrypt(string encryptedStr)
        {
            // Unconvert encrypted string.
            byte[] encryptedStrAsBytes = Convert.FromBase64String(encryptedStr);
            byte[] initialText = new Byte[encryptedStrAsBytes.Length];
            using(RijndaelManaged rijndael = new RijndaelManaged())
            {
                using(MemoryStream memStream = new MemoryStream(encryptedStrAsBytes))
                {
                    if(savedKey == null || savedIV == null)
                    {
                        throw (new NullReferenceException(
                                "savedKey and savedIV must be non-null."));
                    }
                    // Create decryptor and stream objects.
                    using(ICryptoTransform rdTransform =
                         rijndael.CreateDecryptor((byte[])savedKey.
                         Clone(), (byte[])savedIV.Clone()))
                    {
                        using(CryptoStream cryptoStream = new CryptoStream(memStream,
                         rdTransform, CryptoStreamMode.Read))
                        {
                            // Read in decrypted string as a byte[].
                            cryptoStream.Read(initialText, 0, initialText.Length);
                        }
                    }
                }
            }
            // Convert byte[] to string.
            string decryptedStr = Encoding.ASCII.GetString(initialText);
            return (decryptedStr);
        }
    }
}

Now its as simple as calling ConfigurationLibrary.CryptoString.Encrypt(somestring);  and ConfigurationLibrary.CryptoString.Decrypt(somestring).

 

It is this easy to encrypt your info, compromising your users security is never justified!  Just be sure to protect your encryption keys as much as possible.

 

For the record, I don’t know if Sony encrypted this information or not, but they haven’t communicated that they did, which leads me to believe that they didn’t.  If they did, Sony has done a horrible job at PR.  If they didn’t, Sony made a mistake a first year CS student never should have!  Either way, Sony just screwed up really badly.

Programming Totally Off Topic


GFS On YouTube

See More Tutorials on DevGa.me!

Month List