Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
16. April 2012



First off, Jamaica is an absolutely beautiful country.



Second, the sun is hot.  Really hot; something I seem to have stupidly forgotten and now am paying a pretty serious price for.  Even SPF 70 sunscreen ( which I didn’t even realize existed until now ) didn’t help.



Third, the age of e-books is upon us!




The last part really shocked me.  I was considering picking up a couple “dead tree” books to bring down with me, so I didn’t look like a total dork reading my books on my Galaxy Note.  Inget_musty_smell_out_of_books the end I decided against it, I haven’t purchased a paper book in years and since when did I care about looking like a total dork anyways?



Well, turns out that fear was horrifically misplaced.  In fact almost everybody there that was reading was using an e-reader!  The Kindle Fire was easily the most popular reader, probably representing about 50% of readers that I saw.  This makes me kinda envious, as we sadly can’t get the Fire in Canada.  Perhaps even more odd, outside of the Fire, I saw almost no “old” kindles.  The Nook seemed to be the most predominant runner up to the Kindle Fire, although Sony seemed to be pretty well represented.



Yes… I really did spend my vacation gawking at people’s e-readers.  I was simply staggered at how ubiquitous they have in fact become.  You know how many good ole fashion books I saw during my time on vacation?   3.



Oh, and the number of books I actually ended up reading?  0.



Anyways, things should be back to normal with new content in these here parts shortly.

Totally Off Topic

30. January 2012




Alright, this one has absolutely nothing to do with game development, not even remotely, just an upfront warning!


I post it here because I just spent the last several hours trying to figure this out and now that I solved it, I felt like sharing in case other people are trying to add a property or attribute to a BlogEngine.Net page.  It’s not hard, once you figure it out!  Anyways, this site is run on BlogEngine and I am rather happy with it.  I have another site I am working on, however I need much more static pages with searchable attributes.  This isn’t really something Blog Engine is designed to do out of the box.  You can of course add tags to blog posts, but that doesn’t really work well for non-chronological pages.


So, I added it to the page object itself.  In this case I am going to add a single new entity to the Page, Published Year.  First obviously you need the BlogEngine source code,  download the source release.  Extract the project then open BlogEngine.sln inside the BlogEngine folder in Visual Studio.



First, in BlogEngine.core, locate Page.cs.

Now add the following code:


/// <summary> /// Added by me to support published year /// </summary> private string publishedYear; /// <summary> /// Gets or sets a value indicating Published Year /// </summary> public string PublishedYear { get { return this.publishedYear; } set { base.SetValue("PublishedYear", value, ref this.publishedYear); } }



Now you need to add a GUI for it, so you can actually set the Published Year.



Open EditPage.aspx.  First lets add the html.  I put it so it will appear in the side area of the form, above keywords.  Locate the Keywords LI ( included below for reference ) and add the following method:


<li> <label class="lbl" for="<%=txtPublishedYear.ClientID %>">Published Year</label> <asp:TextBox runat="server" ID="txtPublishedYear" TextMode="SingleLine" /> </li> <li> <label class="lbl" for="<%=txtKeyword.ClientID %>"><%=Resources.labels.keywords %> </label> <asp:TextBox runat="server" ID="txtKeyword" TextMode="MultiLine" Rows="5" /> </li>



Also in EditPage.aspx locate the SavePage() javascript method, and change it as follows:

var publishedYear = $("[id$='txtPublishedYear']").val(); var dto = { "id": Querystring('id'), "content": content, "title": title, "description": description, "publishedYear": publishedYear, "keywords": keywords, "slug": slug, "isFrontPage": isFrontPage, "showInList": showInList, "isPublished": isPublished, "parent": parent };


Order IS important here.



Now open EditPage.aspx.cs. Locate the PindPage() method and add:

this.txtPublishedYear.Text = page.PublishedYear;


Now locate BtnSaveClick() and modify to look like:

page.Description = this.txtDescription.Text; page.Keywords = this.txtKeyword.Text; page.PublishedYear = this.txtPublishedYear.Text; if (this.cbFrontPage.Checked)



Finally open AjaxHelper.aspx.cs in the admin folder.  Locate the SavePage() method and make the following change:

public static JsonResponse SavePage( string id, string content, string title, string description, string publishedYear, string keywords, string slug, bool isFrontPage, bool showInList, bool isPublished, string parent)

Remember when I said order was important?  These parameters need to be in the same order as the dto object created earlier.  So make sure your publishedYear setting is in the same position in both.  Now scroll down a little further in the SavePage() method and make the following change:


page.Description = description; page.PublishedYear = publishedYear; page.Keywords = keywords;


And, you are now done.  Compile and run.  Now when you go into your Page admin um, page, it should look like this:






Yay!  May seem a small thing, but its incredibly useful for me, and hopefully will be helpful to some of you out there!

Totally Off Topic

14. January 2012


Alright, first off this post has almost nothing to do with, well anything.  I just discovered this and frankly I think it’s damned cool! Although it has absolutely nothing to do with making games, who doesn’t like Lego?


I have a Safari online book subscription ( which I love by the way ) so when they add new books I am often exposed to things I was previously unaware of, but this one added today was unexpected!  They just added Badass Lego Guns!


Ok, a book about making guns in Lego, that is kinda cool.  A book about making 6 guns in Lego, that’s a bit cooler.  A book about making 6 guns that work in Lego, that’s just epic.  ( Actually, it’s 4 guns, a crossbow and a switchblade )



The book goes step by step in creating each of the guns, starts with an over view of each gun, then a bill of materials of LEGO pieces you will need.  The rest of each chapter is then basically IKEA style directions on how to assemble the gun ( or crossbow).


Obviously, the don’t fire bullets, but instead use ( what else! ) LEGO as projectiles and elastics as the propellant.  Some of these guns though have the look like even being LEGO and elastic powered, they could cause some serious carnage…  Consider the gun featured on the cover, the Warbeast… Yeah, it’s fully automatic and capable of a theoretical 1200 rounds per second!





Amazon’s got it for 20$ or of course, as I mentioned earlier, it was recently released on Safari Books Online if you happen to be a subscriber.  Now I just need to come up with a few hundred dollars worth of LEGO!  Wonder how to buy technic LEGO is these days?

Totally Off Topic

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

25. November 2011



In doing some link checking for a review I am working on, I started noticing that there are some pretty major sales going on… that whole Black Friday thing.  To non-Americans, Black Friday is a tricky thing to explain.  It’s name is routed in this Friday representing the day retailors traditionally went “Into the black” meaning they started turning a profit on the year.  To celebrate, there is an uber deal day around the world.  Traditionally ( and I am talking like 5 years worth of tradition here… ) online deals are on Cyber Monday, the upcoming Monday after Black Friday, but it appears some e-tailors ( did I really just say that! ) started early.



The roundup of great game related deals I have seen so far!



Corel Painter for 249$  180$ off and free shipping


I love Corel Painter, its great for replecating the analog art experience and I use the freebie version that shipped with my tablet all the time.  That said, 250$ is still a bit steep for my liking.  If you are looking for a natural media art package though, this is probably the best one.


PaintShop Pro and Corel draw are both on sale too, but frankly PSP used to be a nice cheap alternative to Photoshop, but since Corel purchased it, it has been more aligned as a photo touch up package.  That said, 30$ is 30$.  Corel Draw, and app I just can’t get into is 350$ down from 500$.  Again, personally not a giant fan.




Adobe has most products at 30% off too!


Photoshop for a 700$ instead of a grand… that’s a nice deal.  That said, 700$ is still 700$!  If you’ve been looking at buying PS5 though, this is probably the perfect time.  200$ for the upgrade price, although im not sure how much of a sale that is.




Sadly no deals at Autodesk ( Max, Maya, Softimage, Luxology ( Modo ), Maxon ( Cinema4d), Pixologic ( zBrush ) NewTek ( Lightwave ), so if you were in the market for a 3D app, no deals as of yet Sad smile



That said, Amazon does have Poser 9 on sale for 59.99$, which is 140$ off.  For those not familiar, Poser is a bit of a weird one, but remarkably capable.  You can make, animated, “dress”, pose 3D characters in a pretty much drag and drop environment.  Sadly Collada support is a pro only feature.


It’s still a very cool program at a very decent price, I wonder if there is still support for older exports like OBJ or 3DS?  Need to look into that more.





Speaking of Poser, while looking at their publishers website SmithMicro, to see if it supported Collada I discovered this:


It's that time of year again and we're offering deep discounts—60% off most software in our online store*—from now until November 30th.
Use coupon code: BLACKFRIDAY2011
*One coupon use per customer. Not valid with any other offers or discounts. Not valid on trials or upgrades. Not valid for SendStuffNow subscriptions. Sale ends 11/30/2011 at 11:59pm PST.

So, any single product 60% off?  They don’t make a ton of products relevent to game developers, but there are a few standouts ( in addition to Poser and Poser Pro ):


Anime Studio Pro 8  If Animes your thing, its 199$, that’s 80$ with the coupon.


Manga Studio EX In case you call your Anime Manga I suppose… frankly I don’t know the difference, but its 299$ so with coupon that would be @ 120$.


That is about all I found that might be relevant, but you can see the whole list here.




Amazon has Roxio Game Capture on for 65$.  Seems a little niche to me, but if you want to record or screenshot 360 or PS3 footage, this is your ticket.



Doesn’t really count as a programmer item, other than the fact this was they “cool kids toy” forAeron Chair by Herman Miller - Official Retailer - Highly Adjustable Graphite Frame - with PostureFit - Carbon Classic (Large) recruiting programmers to come work at your company a few years back.  The Aeron Chair.  Remember those?  Well now is your chance, marked down from 1200$ to 736$.  Ok 3/4 a grand for a chair is a bit excessive, but I have heard nothing but gushing reviews about these things.  That said, I’m not really in a position to drop that kind of money on a chair, but if you are, well the price is (relatively) right!








Last but certainly not least…  the ThinkGeek plush zombie!  What self respecting developer doesn’t have a plush zombie??  Actually, Think Geek has a ton of geek stuff on sale.




Actually, going through that list again, it looks more like a great day for artists… programmers kinda got the short end of the stick!

Totally Off Topic

AppGameKit Studio

See More Tutorials on!

Month List