Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

21. July 2011

 

Great news for C# developers interested in iPod and Android development, it appears that Attachmate, the company that inherited the rights to Mono/Monotouch from the corpse of Novell, has released the IP to Xamarin.  Xamarin was the company founded by Miguel de Icaza.

 

This is great news for C# developers, especially those interested in non-Microsoft platforms!

Programming

15. June 2011

 

Earlier this week I described the process of building Blender for Windows using CMake and Visual Studio.  While I was doing I actually did a series of screen captures for the more visual learners amongst us.  Problem is, my machine decided editing 1080p video was a crime against humanity, so I wasn’t able to get them posted.  I can happily say, the problems have been rectified.

 

Compiling Blender ‘Avocado’ on Windows

 

 

Of course a great deal of the video will be unreadable in this resolution.  I recommend using an HD version on YouTube.  Or for the Vimeo inclined click here.

Programming

11. June 2011

 

EDIT: Now with video!

 

After yesterday’s post, I noticed there wasn’t a recent build of Avocado available so I got to wondering how much work it would be to build a Blender branch.  In the end the answer is “not much”, with a bunch of caveats.  Frankly the hardest part is configuring your environment.  This guide shows but one way, there of course are other options.

 

First of all, I already have Visual Studio 2010 Professional installed, but many of you may not have professional and there is a big snag with Express C++ in that there is no command line 64bit compiler.  At this point you have one of three options, build for 32bit, download and install the Platform SDK which includes a 64bit cross compiler or you can download and use mingw.  The last two options are beyond the scope of this post and the instructions will assume you are using VC++.

 

Next up you need SVN, which is what you use to get the code from Blender’s repository.  In my case, I am using Cygwin from the command line.  For those of you with a command line aversion, you can use a GUI tool like Tortoise SVN.  Again, my instructions are going to assume you went the Cygwin route, but should still make sense a different SVN.

 

Now, to get Cygwin, run the Setup.exe ( from here ) and choose the default ( install to a directory without spaces! ).  You can add other features, but don’t do this now as some download locations don’t have all the packages, so it could result in your install failing.  Once setup.exe has completed, run it again and search for svn, if it is not installed ( as pictured below ), in the New column, instead of keep it will say “Skip”, click this and it will set it to download.  Then click next and it will figure all of the requisites and dependencies, download and install them.

 

image

 

Assuming all went well, you now have svn.  Only one more file to install, CMake, a cross platform make tool.  The install process is pretty straight forward, now time to grab the sources.  You are going to need to make two directories on your local computer, one where the code is going to be downloaded, then one where the code is going to be built.  In my case ( and in the instructions ) I used C:\Temp\Blendersource and c:\temp\BlenderBuild but you can of course use whatever you want.

 

Now its time to get the source.  Launch “Cygwin Bash Shell”, it should be located in your Start Menu.  Otherwise you can run it from [Cygwin Install Directory]\Cygwin.bat.  Now you need to choose which repository you want to build.  The list of branches is available here.  In your browser navigate to the one you want to build, then into the blender directory and copy this address.  In this case I am building Avocado, so I copied https://svn.blender.org/svnroot/bf-blender/branches/ to my clipboard.

SVN works in the form of:

svn checkout [ paste your clipboard ] [where to copy to]

 

One gotcha is you need to point BASH to a directory on your computer, in this case C:\temp\blendersource.  In order to do this, we use the /cygdrive link.  So, the actual command looks like:

 

$ svn checkout https://svn.blender.org/svnroot/bf-blender/branches/soc-2011-avacado /cygdrive/c/temp/blendersource/

 

That will go ahead and download all the blender code.  You will probably get an error stating server certificate isn’t trusted, check type “t” or “p”.  Later on you are going to need the precompiled binaries from the trunk repository.  They are located at https://svn.blender.org/svnroot/bf-blender/trunk/lib/ in the windows/ and win64/ folders.  Warning! This takes a long time, like go make and drink a pot of tea long time.  We want them copied into the /lib/windows directory of the newly downloaded source.  The command for this is:

 

$ svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows /cygdrive/c/temp/lib/windows

followed by:

 

$ svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64 /cygdrive/c/temp/lib/win64

 

At this point, you have all the sources and libraries you need.

 

Now fire up trusty CMake you downloaded earlier.  In the “where is the source code:” text field put C:/Temp/blendersource/ ( or the location of CMakeLists.txt if you are using a different path).  In the “Where to build the binaries:” text field put c:/temp/BlenderBuild.  Now click “Configure”, the following window will appear, select your compiler:

 

image

 

 

Click Finish once your compiler is selected from the list.  Now your CMake window should look like this:

image

 

Now you can optionally enable/disable features.  If building Avocado, disable WITH_IMAGE_OPENEXR! It will currently cause your build to fail. Once you finalized your selections click Configure again, then Generate.

Now if you look in C:\Temp\BlenderBuild, you will see that CMake has built the proper native build files, in my case for Visual C++ 2010.  There is even a solution file if you want to build using the VC IDE.  In this case I am going to use the command line, launch the Visual Studio X64 64 Bit Command Line.  Now type:

cd \temp\blenderbuild

msbuild Blender.sln /property:Configuration=Release

 

And off to the races…   See, nothing to it! Open-mouthed smile

 

After 5 to 20 minutes later, copy your new Blender.exe ( from bin\release ) into a Blender install and…

 

image

 

AHHHH crap, seriouslyjQuery152044251238950528204_1314637985251?  Well, we apparently have a very streamlined version, perhaps a bit too streamlined.  What exactly is going on here?  Well, truth of the matter is, if you followed along at home and aren’t using Windows 7, nothing, it probably works perfectly fine.  However, if you are like me and are running Windows 7, this post is very interesting.

 

There is some annoying permissions issue with Win 7, depending on who/how/where you install as. A known problem, being worked on. Maybe already fixed. (can you tell I'm not a windows guy?)
Easiest work-around for now is to download the .zip version, unzip it and run from that folder.

 

Welcome to life on the bleeding edge!  It’s called the “bleeding edge” for a very good reason!  Anyways, head over here and download the 64bit ZIP install, extract it and copy your new Blender.exe file over.   Voila!

 

image

 

 

A fresh new 64Bit version of Blender—Avocado, bmesh tools and all.  It may have looked difficult, but in the end, it really isn’t, with the exception of figuring out the most recent bug ( thanks Google ).

 

Seem like too much work?  You can download the blender.exe I generated.  Simply download and install the current 2.57b ZIP from Blender, extract it then extract my Blender.zip over top.

Art, Programming

5. June 2011

 

When I was starting out, I was just dying to earn my “real programmer badge™”.  At the time “real programmers” used assembly and I was taking the lazy easy way out using C.  So, in my quest to earn my real programmer badge I taught myself assembly.  Now it took me 10 times as long to write my code and it sure was more difficult; no doubt my badge would be in the mail!  Sadly… no, it didn’t arrive.

 

 

The years went by and assembly became more and more niche.  In the meanwhile, higher level languages came to the fore.  There were even languages that hacks and simpletons could rapidly create programs in, like Delphi ( pascal ) and Visual Basic.  Of course real programmers looked down upon these amateurs, everybody knew that this wasn’t real programming.  Hell even C++ was looked down upon, it was way too high level and slow for real programmers to use, so being a real programmer I kept using C.  Things sure were slow and painful, lots and lots of work, no doubt my real programmer badge was on it’s way! 

 

 

Another generation of languages came along, new pretenders like Java and C# rose in popularity and the lazy and weak flocked to them like mad.  Real programmers of course knew that C++ was the one true language.  Sure, those class libraries and the freedom from memory management sure looked tempting, but I am a real programmer damn it, so I continued working in C++.  My god was it difficult so I truly must be getting close to getting my real programmer badge.  When it didn’t arrive I decide their surely must be a mistake at the post office!

 

 

Then the current generation of languages came to the forefront.  Scripting languages had risen in popularity, to the point that it seemed more people were “scripting” than programming these days!  Scripting?  What real programmer in their right mind would ever work in a lowly scripting language?  I am a real programmer, I will leave scripting for the hacks and newbies, thank you very much!  Real programmers work in C++!  Oddly enough, I still haven’t received my badge…?

 

 

Recently a funny thing happened… I took to a project under a tight deadline, it absolutely had to ship on a given date.  There was no way I could possibly succeed in time using a real programming language, so I took to using the plebian tools.  Working in C#, the wonderful class libraries sure did make development fast.  At times I actually slunk to the lowest of the low and used scripting languages!  It felt so dirty but I have to admit the rapid turn around and interactive tools sure did things quick.  In the end, it was a challenge and I had to prostitute my pride, but I shipped on time!  The following day, a FedEx truck pulled up to my front door and delivered my prized Real Programmers Badge™!

 

 

 

Official-Seal-of-Awesome

 

( Image totally stolen from a middle aged drama queen. )

Of course, this story is completely full of crap but the moral is completely true.  When I was starting out C was truly looked down upon as being a tool of “fake” programmers. Through the years the language has changed but there has always been an “IT” language that new programmers to the field think they have to work in to be a real programmer.  It sadly often takes years of experience to realize how stupid this mindset actually is.  Can you imagine a carpenter that wouldn’t use a drill because “real carpenters” use screw drivers, would you hire this person?

 

 

A real programmer uses the right tool for the job.  For those of you just starting out, “the job” very much includes “learning to program”.  In the end a real programmer makes the best product they can, as efficiently as they can, using whatever tool works best.  Sometimes, that tool might even be C++!

Programming ,

3. May 2011

In a recent forum conversation, it was brought to my attention a previous work of mine was now unavailable online.  You see, when XNA was a new technology I started writing a free book on the subject, working with the release candidate.  In the end I wrote 4 chapters, then Microsoft released XNA 1 and there were some major changes that would more or less have meant a complete rewrite, which didn’t seem all to exciting a proposition.  That told, all the chapters combined were downloaded well over a 1/4 million time, so it did have an audience.

 

xnaAnyways, the website that hosted these documents is now gone, as is the old mirror I hosted to.  By request, I managed to find the files, dust them off and I am posting those files here.  Keep in mind, these were written in 2006 and target a pre-release version of XNA, so the use is pretty extremely limited.

 

 

 

 

If for some reason you are still interested, here they are:

Chapter One

Chapter Two

Chapter Three

Chapter Four

 

Also, of some possible interest, I was in the middle of authoring a complete very simple 2D game for Chapter 5.  The texts are gone, but I have the unfinished source code and assets right here.  It’s not complete, polished and nor does it compile anymore.  It did back in the day, I remember that much, before the final release of XNA 1 this code was 100% working.  I don’t know if it will be of use to anyone, but here it is!

 

Chapter 5 Game Source Code [ 18 MB download ]

 

Enjoy this trip down memory lane.

Programming

Month List

Popular Comments

OpenFL 4.4 and Lime 3.4 Have Been Released
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


Home > >

2. November 2016

 

OpenFL is a cross platform Haxe powered implementation of the Flash API, while Lime is a set of low level cross platform libraries OpenFL depends upon (but can be used stand-alone).  Both just saw a new release this month, 4.4 and 3.4 respectively.  The major feature of this release is support for modular HTML5 builds, but other features such as improved HTML5 video support, SDL 2.0.5 support on native and other features are included.

 

From the Lime release notes.

3.4.1 (11/01/2016)

  • Fixed order of Assets.registerLibrary and app.onPreloaderComplete
  • Added a workaround for HAXE_STD_PATH error on -Dmodular

 

From the OpenFL release notes.

4.4.1 (11/01/2016)

  • Added support for the "ignoresampler" AGAL sampler hint
  • Improved the behavior of context3D.setSamplerState
  • Minor change to better support Lime onPreloadComplete event
  • Fixed visibility of TextField cursor on a final blank line
  • Fixed a possible null error in EventDispatcher
  • Fixed support for -Dmodular

blog comments powered by Disqus

Month List

Popular Comments