Matt Greene's profileI found that thing I los...PhotosBlogListsMore Tools Help

I found that thing I lost...

Flex, Flash, Silverlight, .Net, Games, Computers!
May 15

ScribeFire

Trying out this new blogging assistant called ScribeFire. It is an in-browser (Firefox) blogger app that can publish to a lot of popular blog systems.
May 16

Pixel Bender - Spotlight Shader

Toyed around with it a bit today, I really love being able to run things on the GPU now. Here is a simple spotlight shader.

<languageVersion: 1.0;>
 
kernel lighting
<   namespace : "mg";
    vendor : "Matt Greene";
    version : 1;
    description : "Simple spotlight shader."; >
{
    input image4 src;
    output float4 dst;
    
    parameter float lightIntensity
    <
        minValue: float(1.0);
        maxValue: float(4.0);
        defaultValue: float(2.0);
    >;
    parameter float2 lightPosition
    <
        minValue: float2(0.0, 0.0);
        maxValue: float2(350.0, 550.0);
        defaultValue: float2(0.0, 0.0);
    >;
    parameter float lightRadius
    <
        minValue: float(0.1);
        maxValue: float(2000.0);
        defaultValue: float(200.0);
    >;
    parameter float lightSize
    <
        minValue: float(0.1);
        maxValue: float(100.0);
        defaultValue: float(5.0);
    >;
    parameter float4 lightColor
    <
        minValue: float4(0.1, 0.1, 0.1, 0.1);
        maxValue: float4(2.0, 2.0, 2.0, 2.0);
        defaultValue: float4(1.0, 1.0, 1.0, 1.0);
    >;
 
    void evaluatePixel()
    {
        float2 position = outCoord();
        float dist = length(position - lightPosition);
        float shadePercent;
        
        if (dist < lightSize)
        {
            shadePercent = lightIntensity;
        }
        else
        {
            shadePercent = lightIntensity - ((dist - lightSize) / lightRadius);
        }
        
        float4 shade = lightColor * shadePercent;
        shade.a = 1.0;
        
        dst = shade * sampleNearest(src, position);
    }
}
 

Adobe Pixel Bender (previously Hydra)

Hardware accelerated Flash is finally here! Adobe released the beta of Flash Player 10 recently, and with it came the Pixel Bender (formerly codename Hydra) toolkit. This application allows you to build shaders that run on your computer's GPU (with fallbacks to the CPU incase your card is not supported). The language used is quite similar to GLSL, and basically gives you full access to a pixel shader, sorry no Vertex/Geometry shaders... yet? But, that is not much of an issue, because having access to the pixel shader alleviates a massive amount of processing off of the CPU.

If you can't tell from my first paragraph, I am extremely excited about this. I plan to put out some samples of some fun shaders here soon, maybe this weekend!

April 09

Flash, Distribution, Wooohaaa!

Yesterday about 5:00 PM EST I decided to check out how the little flash game my team made was doing online. I was pleasantly surprised to see that it had finally hit the distribution channels. I saw 50 new plays and thought, awesome! Then I refreshed the page about a minute later and saw it went up by about 15, and thought "woah were on a hot streak"... then refreshed it again a few minutes later and it shot up another 20. My first thought was, "is this really happening?" And it was, our game finally was being distributed to partners. From 5 PM EST to midnight we raked in about 2400 unique plays. And today we already have another 600 from this morning alone. This is all quite encouraging to see that our work has gotten such visibility. We spent about a week in a rush job trying to make the game and enter it into a contest. Now, our next games will have more time and more insight into the process, the possibilities are limitless! World domination plans! *snicker*

Anyway, if you want to check out our game, head on over to http://www.devend.com/buggleBubbles/

April 07

Failure of Modern MMO's

Ok, here is the big secret ladies and gentlemen, this is how you interest and keep an active player base. REWARD YOUR PLAYERS CONSTANTLY!

There is a plethora of ways to reward your players, many of which really have no consequence or effect to the game whatsoever. A good example of a better rewards system is in Lord of the Rings Online. There is a constantly evolving Title rewards system in place. I love this aspect, it helps so much to alleviate the "grind" you experience in EVERY MMO that is out there.

Here is one of my favored moments in MMO gaming, I am invading a base of monsters, killing them left and right, simultaneous achieving a quest to slaughter X number of monsters, another quest to kill their leader, and also I am gaining points towards my title of "MonsterType" Slayer.

If I am playing a game, I want to feel like I am accomplishing multiple things by doing something. When I finish a quest and realize I inadvertently accomplished something else, I am ecstatic, I love the feeling!

Reward your players, in every way shape and form possible. You may think this will numb the players to the final rewards or the rewards that take more time to access... THEN MAKE THEM EVEN BIGGER REWARDS!

It is a trend that is finally starting to see some light. On XBox360 it is huge, in the form of achievements, which have no effect on the game itself but are rewarding to the player to unlock!

February 21

What has been up!

Aside from a big Flex project at work, that I will reveal once it goes live, I have been working on a new Game Library for ActionScript 3 and also playing a good bit of Titan Quest again.

The Game Library is currently nicknamed NoxLib and is coming along very nicely. I am steadily building in new features every few days or so and I am very happy with the results so far. I am taking a much more C# Game Engine style approach to it instead of your typical Flash/ActionScript kind of groove. I find it to more efficient and organized. One of my favorite tools in the lib so far is the ContentLoader, which manages all the loading of any data you need to include in your project, such as images, audio, and XML files. It is a queue based loader that is very simple to use and alleviates a lot of the pain of working with external assets. A lot of the components of the lib are tied in with the ContentLoader for a much easier experience of loading and utilization. I am sure I will post more about the library soon when I have more eye candy.

I originally played Titan Quest back when it released and was initially enthralled by it. I was really needing a good hack'n'slash RPG Diablo style and it filled the need quite nicely. That is until I got deeper into the game and realized how broken and overpowered the classes and abilities were. The game became little to no fun and really had no challenge to it at all. Well recently I have really been into using Steam and keeping my eye out for deals, and low and behold there was Titan Quest + Immortal Throne (the expansion) for only 20 bucks as the gold pack. I heard that the expansion and all the patches in between had fixed a lot of the issues and balanced out the classes so they are not so godly. So, I decided to give it another go. And thanks to Steam's tracking I realized I have spent over 15 hours so far in Titan Quest since I bought it, and I am still having a lot of fun. Which seems like a pretty dam good deal to me if you compare it to watching a movie at a theatre or even renting. I spent 20 bucks and got at minimum 15+ hours of enjoyment out of it, and I am still going. I love the historical areas that Titan Quest visits in the game, you go from Greece to China and all the lands in between and beyond. It is now a much more polished game if you ask me.

February 20

ActionScript 3 Game Programming Tips

1. Use "Number" type when doing math calculations, other types are slower.

2. Use "int" type when you are working with array indexes. A "uint" has problems with indexOf(). And a "Number" is much slower for iteration than an "int"

3. When storing a list of objects, instead of an "Array", use a "Dictionary" for strict equality and faster comparisons. (Note: Use wisely, in some circumstances an Array can outperform such as simple iteration, but a Dictionary gains in speed when accessing data stored inside of it.)

4. Use events programming (use weak references whenever possible), interfaces, and locators with error logging. Bubbling events can save you a ton of time, make use of it.

5. Keep in mind these three words... Modularity, Reusability, Robustness.

6. When using for() loops in Actionscript and iterating through to the length of the array, declare the length first outside of the loop and use it instead to set the max. Your iteration will perform nearly twice as fast.

var len:int = someArray.length;
for (var i:int = 0; i < len; i++)
{
    ...
}

7. Do not do lookups inside loops if you can avoid it, even for simple things like constants. Declare it as a local variable before your loop and use it. Lookups really slow down loops!

8. If you have to declare similar variable types inside of loops, declare them with a single "var" statement, it will save tons of execution time inside of loops.

// BAD
for (var i:int = 0; i < 100; i++)
{
    var v1:Number = 10;
    var v2:Number = 10;
    var v2:Number = 10;
}
 
// GOOD
for (var i:int = 0; i < 100; i++)
{
    var v1:Number = 10, v2:Number = 10, v2:Number = 10;
}

 

These are just a few things that I have ran across while traveling the web and working with my own code. This biggest thing is the loops, because most games use loops quite frequently this is very important. Following these guidelines, you can see a massive performance boost.

February 13

The AdvancedHBox Flex Component

This is something I created recently, thought I would share it since it has really become quite useful all around. I kept running into the issue that a simple HorizontalList just was not cutting it, there were limitations all around. So I came up with the AdvancedHBox instead. This components provides some better styling options and management of the component, along with allowing variable widths of items in the dataProvider. There are some other uses too that are quite nice. To explain it simply, it is an HBox with a dataProvider and an itemRenderer attached!

package
{
    import flash.display.DisplayObject;
    import mx.collections.ICollectionView;
    import mx.containers.HBox;
    import mx.controls.Label;
    import mx.core.ClassFactory;
    import mx.core.IFactory;
    import mx.events.CollectionEvent;
    
    public class AdvancedHBox extends HBox
    {
        private var _dataProvider:Object;
        public var itemRenderer:IFactory;
        
        public function AdvancedHBox()
        {
            if (itemRenderer == null) itemRenderer = new ClassFactory(Label);
        }
        
        [Bindable("collectionChange")]
        public function get dataProvider():Object
        {
            return _dataProvider;
        }
        
        public function set dataProvider(value:Object):void
        {
            if (!(value is Array || value is XMLList || value is ICollectionView))
            {
                _dataProvider = null;
                
                return;
            }        
            
            if (_dataProvider && _dataProvider is ICollectionView)
            {
                ICollectionView(_dataProvider).removeEventListener(CollectionEvent.COLLECTION_CHANGE, dataProviderChangeHandler);
            }
            
            _dataProvider = value;
 
            if (_dataProvider is ICollectionView)
            {
                ICollectionView(_dataProvider).addEventListener(CollectionEvent.COLLECTION_CHANGE, dataProviderChangeHandler, false, 0, true);
            }
            
            redrawChildren();
        } 
    
 
        // PRIVATE METHODS
        /**
         * Redraws children.
         */
        private function redrawChildren():void
        {
            removeAllChildren();
                
            if (dataProvider != null)
            {
                var child:Object;
                    
                for (var i:int = 0; i < dataProvider.length; i++)
                {
                    child = itemRenderer.newInstance();
                    child.data = dataProvider[i];
                    
                    if (child is Label) 
                    {
                        child.text = child.data.label;
                    }
    
                addChild(child as DisplayObject);
            }
                
                trace("[AdvancedHBox] dataProvider Update - Length: " + dataProvider.length);
            }
        }
        
        // EVENT HANDLERS
        /**
         * Redraws children on dataProvider change.
         */
        private function dataProviderChangeHandler(e:CollectionEvent):void
        {
            redrawChildren();
        }
    }
}

Massive Spores Effecting Snow

I decided to mangle the title of this post as much as possibly with the 3 topics I wanted to point out.

First off, as I expected, Mass Effect is coming out for PC, and as early as May '08 too. Now, I do have it for my 360 but I am interested in the new additions to the PC version, and also the possibility (though unconfirmed) of modding the game.

Second, they finally got around to setting a release date for one of the most overhyped games of all time, Spore. They wooed us with their fancy demos and videos during E3 but I am still skeptical, even though they took extra time to try and live up to the hype.

Finally, I hate snow... cold... messy... unless there is a lot of it, waste deep preferably... I like to build tunnels.

February 11

Integration Integrity

The days of web service providers fighting over whose proprietary platform is better needs to end, and it is ending slowly. Major players like Google and Microsoft have already begun the push needed to make the web a much more friendly place.

Google's platform needs to step up the integration more though, right now it is more like a complex portal system.

Microsoft has done much better with integration and the Live platform though. Live Messenger is growing and soon to support talking with other protocols such as AIM and GTalk, it already supports Yahoo. Microsoft has been using a universal account platform for some time also, most will remember it as a Passport account. This account ties into practically every service provided by Microsoft, including email, IM, blogging, photo management, and more. All of these utilities can practically talk to each and share information that you give each of them. If you wish to share photos or files, linking to or showing them in your blog is a simple step. Have an interesting conversation on Messenger you wish to publish into your blog? Easy as pie. With the coming Office integration we will see whole new ways businesses and operate in the online world. The Internet office is growing in popularity, and competitors better take notice that a simple office suite on your desktop won't be enough in the future. Direct publishing and sharing from application to web or application to application is going to be key.

I have been playing with the new Windows Live tools all day today, and I am in love with them. Although my favorite so far is the Windows Live Writer. I find it easier to blog with than dealing with a browser. And the customizability of the Windows Messenger really excites me, once I can use it to speak to AIM clients I will drop my current multi-protocol client all together. One very cool addition to Live Messenger that I am looking forward to using is the folder sharing. My friends and I have wished for something this simple for a long time now.

 

Xbox Live GamerCard

Deis Valya
Xbox Live GamerCard
Rep:
3/5 stars
Score:
2160
Zone:
Underground
Dead Space™Star Ocean: TLHSonic The Hedgehog 3DOOMDuke Nukem 3D
Thanks for visiting!
Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.

Matt Greene

Dread Rock
Teardrop
Slam
by 
Comfort Eagle
by 
by 
by 
by 
by 
More...