Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
11. January 2012



No, you aren’t in a time machine and we didn’t just warp back to 1995. 


You may notice that I make use of animated gifs quite often for demonstrating things that require motion, or to illustrate my games in action.  Although the world has mostly left them behind, there are still some advantageous to using animated gifs, they can actually be quite small, work on a ton of environments including iOS ( where Flash obviously won’t ), they are faster for many browsers to load than videos and frankly they embed better.




Here is one such example animated gif, illustrating the use of Edge sliding in Wings 3D.



I’ve been asked a couple times how it is I create them, so I figured I would put together this quick tutorial on the subject.  True, it’s not really game development related, but hopefully you will find it useful or at least interesting.




Before getting started, you are going to need a few applications.  These applications are:



IrFan View



The Gimp is doing the heavy lifting, while IrFan is what we use to capture our images in the first place.



First load up IrFan, open the Options menu and select Capture, like such:





Set the capture settings up as follows.  Set it to Foreground Window, so it will only capture the currently focused application.  If you want to capture the entire screen or a sub-rectangle of the screen do it here.  Then under Capture method, set it to Automatic – timer delay and put how often you want to take a screenshot.  Too fast and your computer may have trouble keeping up, too slow you will not capture enough detail.  Finally set to Save captured image as file and pick a directory.  As soon as you press start, it will start taking screenshots.  To stop, you need to focus IrFan again, selections Options->Capture or press C.  This is what it should look like:






Now, once you’ve clicked start, go do whatever it is you want to capture, it will ding each time it saves an image.  Once done and you’ve turned capturing back off, go to your destination directory and you should have a series of screen captures, like this:





Each frame will compose one frame in our animation.  Delete any images you don’t want.  Often there will be a couple captures at the beginning and end that you won’t want as you were getting ready.



Now that we have our frames, load up The Gimp.


Select File->Open as Layers, like such:




Now select all of your images, then click Open ( either shift click each, or CTRL + A ) like such:




Now in the Gimp you will see your layers have been added, in chronological order, like so:




You can now delete frames if you wish, this is your last chance.  Now we are going to turn it into an animated gif.


Select File->Save As.  In the dialog that pops up, this part is very imported.  Make sure you specify your name as ending in .gif, like this:




So long as you ended your name with gif, when you press save, this dialog will pop up:




Make sure you have selected “Save as Animation”, then click Export.  Then one more dialog will pop up:





The two most important settings are “Loop Forever” and “Delay between frames when unspecified”.  Loop will cause the image created to start over once it stops playing ( or not ).  The delay is the default amount of time each image will be shown for.  At 100ms, we will playback at 10FPS.  Once done, click Save.  This part could take a few moments.



You will now have an animated gif, like this:





This is good, but has a few limitations.  First off, its probably GIGANTIC.  Second, it’s probably bigger ( dimensions ) than you wanted it to be.  Finally, it’s possible you don’t want all pictures shown at the same speed.


First, lets make it smaller in physical size, this change will actually help with the file size as well.  In the GIMP, simply select Image->Scale Image… from the menu.  Then the scale image dialog will pop up:





Pick your new dimensions and click Scale.



Now that your image has been scaled, lets make the file size smaller.  In the menu select Filters->Animation->Optimize (For GIF).  GIMP will chug away for a few seconds then create a new image for you ( your old image will still be open too, in a different GIMP window, you can close it if you like ).




In your newly created image, you will notice something interesting in the Layers window:




All of your layers have been renamed to include (100ms) in the name.  If you want an individual frame to display longer, such as making the first frame last for 1 second, right click the layer you want to display longer and select Edit Layer Attributes…  Then edit the name to represent the new time in ms that you want the image to last:





Do this for each layer you want to change the duration for.  Now that you are done, save your image like you did before ( specifying a gif extension ).


Presto, a new animated GIF





This one however, is 1/3rd the size, at 129KB.



And that, is how I create animated gifs.

General Totally Off Topic

15. December 2011




Ok, let me quickly start with this.


I am an idiot.


I am not denying it, I am currently paying the price for a very stupid action; I have no illusions as to who is primarily to blame, its 100% on me ( well… and Microsoft ).  Anyways….


Several months back I installed the Visual Studio 2011 developer preview, yeah not on a VM, but instead on my production machine(s).  Yeah that was plural, my idiocy is compounded.  Of course I know I shouldn’t have installed it in production, but simply put, its new and shiny!  Besides, they actually say it will install and work side by side with Visual Studio 2010, so I listened to them!


Then, as is the way of things, I started running out of space on that hard drive partition and since I wasn’t really using it I went ahead and uninstalled Visual Studio 2011.  So, Microsoft says it will *install* side by side with VS 2010, which is true… it just won’t uninstall!


After uninstalling the 2011 preview, I opened up a C++ tutorial project I am finishing off and:


C:\Projects\GameFromScratch\GFSCPP\Pang9\Pang.vcxproj : error  : MSBuild does not contain a value for the "VCTargetsPath" property.

Ahhh crap.


My Express install is also broken.  Joy. Sad smile


I think this can be fixed, apparently VCTargetsPath is a registry key setting, but once these kinds of things start cropping up, I get paranoid about my build environment.  Long story short, it looks like a re-install is in my future, and that sucks.


But yeah, I know I am the one to blame.



Anyways, time for the TL;DR section.

If you installed the VS 2011 preview on a production machine, DO NOT REMOVE THEM!


And shame on you, you should know better than to install pre-beta software on a production machine! Smile


7. December 2011



In case anyone was curious what exactly was coming up here at GameFromScratch, especially since I completely threw the original concept for this website out the window a few months back, this post is a summary of the current tasks I am looking at implementing.  Your feedback is greatly appreciated.



First of all I am going to finish off the GameFromScratch C++ with SFML tutorial.  It is getting close to done, and I have a couple more chapters worth of code written and nearly ready to go.



I am still trying to decide if that tutorial is or is not going to cover networking.  I am leaning towards not, as I don’t think it is a topic I can cover succinctly.  As you have seen from the rambling ( long ) nature of my posts, my definition of succinct is already way pushing the legal bounds of that word!  That said, it does seem to be one of those areas that is extremely under represented on the web, so I may visit it in a different post that builds off of Pang.



The rest of these ideas aren’t really in any particular order as I don’t really know what order I am tackling them in.  In fact I will probably continue to work on them in parallel, unless I find myself getting nothing done!




A simple RPG




This is one area I see people simply screaming out for help and there really isn’t much out there.  Of all the projects that new game developers want to jump into, Role Playing Games really do seem to be top of the list!  Sure, you could jump into the source code for one of the various open source Roguelike games but these aren’t exactly beginner friendly sources.  Not that I recommend against it, reading all of the source code you can is a good idea!  But, as a way to learn… not the best.  Hmmm, actually, I think I might put together a post about the various open source RPGs available…  ok, where was I?


Oh yeah, so there really isn’t a ton out there.  Even in book form, there isn’t a lot to go by.  There is RPG Programming with XNA Studio 3.0 and well, that’s about it.  I have access to this book so I may put a review together too at some point in the future.  There are a few older titles such as Programming Role Playing Games with Direct X which is now 8 years old and frankly is more about graphics than roleplaying.  I think a lot of the information you would be looking for is glossed over in this book. ( I’ve skim/read both and the XNA book is superior ).  Simply put, it is not an area with a lot of coverage tutorial-wise, and those are exactly the areas I intend to focus on.



At the same time, I am going to try to put together a bit of a glossary of resources on the subject, so if you have books or links related to RPG development that I don’t mention or cover, send them to me either via email or comments and I will include them!



My basic plan is to not focus on graphics, that you can learn just about anywhere.  Even creating tile-based games is covered by a few hundred different websites and books, so you are covered well in that regard ( again, I will link to these resources though, so if you have some, keep ‘em coming! ). Instead I will demonstrate the guts of an RPG.  Character systems, saving your game, inventory management, NPCs, random encounters, etc…  That seems to be the kind of information people are looking for and failing to find these days.



This project will actually be in two parts, the ( fairly simple ) role playing game, and the tool that goes into making that game.  In a project like an RPG, you will be shocked at how much of the magic is actually in the tools!  I will probably do all of this in C#. I am thinking of making the tool in in Mono/gtk#, so that it will run on Linux, Mac as well as Windows.  Also, frankly I have never done any cross platform C# work, the experience should be interesting.



I don’t really know how I will structure the tutorial/series.  It doesn’t really work as well linearly as the Pong tutorial did as there are more moving pieces and complexity.  I guess I will figure this out as I go.  I may actually used tagged posts initially then try to impose some kind of chapter specific structure on it later.  Again, suggestions are always appreciated!



So that’s one upcoming project to expect to see on  Another is:




The Mobile SDK roundup.




Basically I am going to be working on a game myself soon, that much I am certain of ( and much of that process will be documented as well! ).  What I need to do is pick a cross platform game framework and this is amazingly enough, a very difficult task.  There are dozens of players in this space, all with their own strengths and weaknesses!



So as a result I have started looking in to various cross platform game SDKs.  As I know there are many other people facing the same decision of what tool to go with, I am going to document the choosing process.



What I essentially plan to do is develop a base “Hello world” style game, some base template of what I want to implement with minimalist version of all the things I am going to need in my own game.  Then I am going to set out to implement that exact same game using each of the available devkits.  As a result, I can do as close as an apples to apples comparison of how well it worked, problems I encounter, the goods, the bads and the uglies encountered on the way.  I will also rate how long it took me to get up to speed, the costs involved, etc…  When I am done each evaluation, I will of course release all the assets and sources used along the way.  Keep in mind though, in many of these cases I may be completely new to the language in question ( such as Flash or Lua ), so don’t expect triple A quality code!



A few of the toolkits I am looking at evaluating are PlayN, Corona, Exen/Monogame, jMonkeyEngine (maybe), Ogre3D (maybe) Unity, UDK ( maybe? ), Marmalade, Flash ( maybe? ) and more.  I am favoring products that are free or have a free evaluation simply because… well, it’s an evaluation.  There is such a wealth of options out there and the majority of them have a free trial available, that its hard to justify an out of pocket purchase before you have made a decision.  This is why products like the Dragonfire SDK won’t be initially evaluated.  I am also still internally deciding if I am going to go 2D, 2.5D or 3D.  My mental game concept leans towards 2D so I think I am favoring that route.



I will put together a post with a bit more detail as I start fleshing out the list of SDKs I am going to evaluate.  As always, I look forward to your input, so if there is an SDK you would like to see evaluated as part of this process, LET ME KNOW!




Other Bits and Bobs




I don’t know if you’ve noticed or not, but I have this tendency to get more than a bit distracted at times.  That’s the joy of running your own blog, you can wander off on any particular tangent that hits your fancy at the time! Winking smile




So, in addition to the above, expect a bit of various coverage of random game development stuff.  I intend to document the process of creating the materials for my “Hello World” game, so expect a few posts on modeling in Wings3D or rendering game sprites using Blender.  I may also do one on animating in Blender, a point of much confusion… although truth told, I am far too impatient to create a good rig…  As I mentioned earlier, I may also look into doing an SFML networking tutorial or two!




I also will probably start doing a fair bit more reviews, especially when it comes to books.  There seem to be a handful of books that people are extremely curious about, so I will tend to focus on them.  I am a voracious reader of tech books, now I just need to learn to read them with an eye towards reviewing them!  If there are any specific books you are interested in learning more about, let me know.




Finally, this site is here for you, so I generally try to pick topics that I think you would be interested in ( and I would have fun explaining! Winking smile ).  Therefore, it is your feedback that directs me more than anything else.  So, if you have a suggestion or comment, fire away and I will see what I can do!



Finally… I really need to get on with my game soon… Smile


30. November 2011



Epic has released a new version of their UDK.  Updated features include:Unreal Development Kit


Upgraded to Scaleform 4



Unreal Landscape and Foliage

  • Landscape flatten tool tool is enhanced with a flatten to slope option
  • New Clay Brush makes sculpting of landscape vertex data much quicker and easier
  • Foliage scale axis locking allows for variable Z scale but uniform XY scale, plus z-offset settings
  • New reimport Heightmap / layer button for each layer
    • Updated Unreal Landscape documentation with info on new layer nodes
    • Updated foliage documentation with info on new features
    • Foliage now follows base component on copy/paste/move/rotate/move-to-level
    • Much improved brush painting behavior for both vertex and layers in regular (non-clay) mode. Repainting the same area no longer causes artifacts
    • Changed the regular paint tool behavior so that painting over the same area requires multiple brush strokes.  The functionality is now consistent with Zbrush and prevent artifacts



    • You can now export skeletal meshes and animations from the editor, enabling bi-directional cinematic workflow
    • Added the ability to adjust sound class volume levels from a matinee track
    • The content browser's 'Packages' view now returns to previously active view (hierarchical or flattened) when filter is cleared
    • Added support for turning off startup movies and toggling cinematic mode for matinee movie captures



    • High level Twitter UnrealScript-accessible support has been added
      • You can now show the iOS 5 Tweet UI and optionally attach a local .png image and/or a URL, making use of the single-sign-on Twitter account(s) in iOS 5
      • You can also submit a generic Twitter request (i.e., get the local user’s followers)
      • Implemented for iOS 5
    • Added ADPCM sound encoding support


    Mac OS X feature parity work

    • Additions and upgrades
      • Added support for "Maximize" button
      • Added full support for vertex texture fetch
      • Minor PhysX library update, addressing some rare crashes, and adding "quickload" extension support
      • Support for loops and secondary color attribute during shader generation
    • Fixed issues
      • Instanced drawing now on full parity with PC
      • Light shafts now render properly and have full visual parity with PC
      • Full-screen rendering and MSAA
      • Inconsistent lens flares compared to PC
      • Inconsistencies with anisotropic filtering between PC and Mac
      • Shadows from spotlight on dynamic / skeletal meshes


A fairly significant release, especially if you are on Mac OS X.  It is a 1.5 GB download.  You can get it here.



Of course, now that you read all of that, is it a bad time to mention they have a video version highlighting all the recent changes? Winking smile




I really have to look into it a bit closer.  I downloaded and installed the last release, played around a little bit with the default level in the editor ( while watching my computer cry under the strain ) but never got into it much deeper than that. 


It simply staggers my mind the wealth of affordable and professional tools available these days.  I still recall not that long ago where everyone had to create everything themselves and the first available engines cost in the hundred of thousands of dollars to license. Amazing how much things have changed!


29. November 2011



First off, the following link is purely conjecture, nothing in it has been confirmed by anyone at Microsoft, that said the conclusions it draws are logical to say the least, and dire.  Microsoft seems to be exiting DirectX/XNA development.  Now, that’s not quite as bad as it sounds, DX and possibly XNA will continue to exist, but they won’t receive nearly the level of emphasis that they currently do.


The blog post was from Promit a moderator at, a DirectX/XNA MVP and the primary lead on the popular SlimDX library.  Simply put, the man is no idiot.


Here is a snippet:


Let’s start with the DirectX SDK, which you may have noticed was last updated in June of 2010. That’s about a year and a half now, which is a bit of a lag for a product which has — sorry, had — scheduled quarterly releases. Unless of course that product is canceled, and it is. You heard me right: there is no more DirectX SDK. Its various useful components have been spun out into a hodge-podge of other places, and some pieces are simply discontinued. Everything outside DirectX Graphics is of course gone, and has been for several years now. That should not be a surprise. The graphics pieces and documentation, though, are being folded into the Windows SDK. D3DX is entirely gone. The math library was released as XNA Math (essentially a port from Xbox), then renamed to DirectXMath. It was a separate download for a while but I think it might be part of Windows SDK from Windows 8 also. I haven’t checked. The FX compiler has been spun off/abandoned as an open source block of code that is in the June 2010 SDK. There are no official patches for a wide range of known bugs, and I’m not aware of a central location for indie patches. Most of the remaining bits and pieces live on Chuck Walbourn’s blog. Yeah, I know.


In case it’s not obvious, this means that the DirectX release schedule is now the same as the Windows SDK, which always corresponds with major OS updates (service packs and full new versions). Don’t hold your breath on bug fixes. Last I heard, there’s only one person still working on the HLSL compiler. Maybe they’ve hired someone, or I assume they have a job opening on that ‘team’ at least. What I do know is that for all practical purposes, DirectX has been demoted to a standard, uninteresting Windows API just like all the others. I imagine there won’t be a lot more samples coming from Microsoft, especially big cool ones like the SDK used to have. Probably have to rely on AMD and NVIDIA for that stuff moving forward.


That covers the native side. What about managed? Well the Windows API Code Pack hasn’t been updated in a year and a half so we won’t worry about that. On the XNA front, two things are becoming very clear:
* XNA is not invited to Windows 8.
* XBLIG is not a serious effort.
The point about XBLIG has been known by most of us MVP guys for a while now. Microsoft promised a lot of interesting news out of this past //BUILD/ conference, which I suppose was true. However you may have noticed that XNA was not mentioned at any point. That’s because XNA isn’t invited. All of that fancy new Metro stuff? None of it will work with XNA, at all, in any fashion.


I highly recommend you read the entire post it is an interesting read to say the least.



Say what you will about the conclusions he has drawn and you will realize this is actually just the tip of the iceberg. 



First off, I think its clear to just about anyone watching that the executive team at Microsoft don’t know their head from their….  Anyways, look at the recent attempts to purchase Yahoo for a hundred, trillion billion dollars, followed by an 8! billion dollar acquisition of Skype and it is pretty clear they don’t have a bloody clue what they are doing.  Fortunately for them Office and Windows make so much money they can weather a storm of stupidity.


But more core to the problem is the recent internal civil war between J Allard and Steven Sinofsky ( more details here ).  J Allard for those that don’t know is the guy behind Xbox ( and frankly a number of failures too ) at Microsoft while Steven Sinofsky is the guy that runs the Windows team at Microsoft and saved it from the debacle of Vista.  Both were highly regarded, both were stars on the rise at Microsoft and they went head to head on the future of tablet computing ( and to a lesser degree Microsoft itself ).  Steven won, Allard is gone.  Thing is, it seems Steven’s win is more far reaching and the future of the OS/Win 8 seems to be calling all the shots, no matter how ill advised they are.


So, the deprecation of DirectX to simply another SDK in the platform makes sense when viewed through the lens that the guy calling the shots is *in charge of the platform!*.  Sadly, DirectX, Courier and XNA don’t seem to be the only causalities in this story.  Silverlight also appears to be a dead end technology now, either killed by a political blunder by Bob Muglia or in fact on the way out, in support of HTML5/Javascript.  Developer support has always been the corner stone of Microsoft’s success and if they continue down this route, the future seems  a very bleak place.  Personally as a developer, the shift back to using HTML + Javascript is a blunder of epic proportions.


Frankly, it seems like innovation has died at Microsoft, Developer support certainly seems to have.  Microsoft has, for at least a decade, been known for exceptional developer support, probably the best in the industry.  These days however, may be in the past and I for one am greatly saddened.


Does this mean you should stop developing XNA apps?  Certainly not, at least, not yet.  Even as it stands now, it is a stable and well developed product.  Should you stop developing Silverlight or WPF applications?  That one is a hell of a lot trickier to determine and the lack of words outside of Microsoft aren’t exactly filling me with confidence.  Should you be boning up your HTML and Javascript skills?  Sadly, yes.


AppGameKit Studio

See More Tutorials on!

Month List