Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon Join the GFS Discord Server!
27. March 2014


Wow, I gotta say this announcement pretty much broadsided me.  I wrote Moai off for dead, which was a huge shame, as I did a tutorial series on the subject, and frankly found MOAI to be some of the cleanest C++ code I had ever read.  So to hear of a new release certainly makes me happy.


So then, what’s new?


Feature merge from Zipline:

  • Massive rework of the garbage collection system to simplify object tracking
  • Reworking of the AKU Modules API
  • New SDL host to complement the GLUT host
  • A flag to MOAIAction to disable auto-stop on no children

A New Build System:

  • The CMake build system that was in place for the linux and blackberry hosts was extened to include all hosts
  • Luajit support was added to all platforms (via cmake scripts)
  • create-project-* scripts were created that allows you to generate vs2008->vs2013 and xcode project files.
  • Changes to a project can be recorded once in the relevant cmake script and all platforms should work instead of maintaining 6+ build configs
  • Plugin support was added for installing modules which are outside the moai sdk (other repos) [More]
  • Custom host support was added for compiling a host outside of the repo [More]
  • Support for compiling with Ming-w64 for a completely open source experience on Windows (no more vcruntime to distribute)

Additional Features:

  • Vector Pathfinding (MOAIVecPathGraph)
  • Box2D Closest Raycast Exposure
  • Twitter support in android
  • MOAIShader was enhanced with the 4x4 matrix and given access to UNIFORM_WORLD_VIEW
  • A faster and smoother android host with working keyboard support.
  • MOAISafariIOS is now MOAIBrowserIOS and MOAIBrowserAndroid added
  • Visibility can now be inherited!
  • Google Play Services
  • Updated Tapjoy and Vungle
  • MOAISim showCursor and hideCursor support
  • Documentation improvements
  • Chartboost for IOS and android
  • You can now EnqueueJoystickEvent from the host.
  • New HTML/JS host based on emscripten


  • Android logging support repaired
  • VFS works correctly on all platforms
  • A heap of lua stack overflows
  • Fixes to JSON parser and encoder
  • Textbox string bounds calculations fixed
  • PVR support working now


Certainly some nice new features in there, and hopefully this new release will breath renewed life into this project that frankly always deserved a better fate.


You can access the MOAI source code here.

You can read a more complete release notes here.

News Programming

27. March 2014


Ongoing documentation of creating a 3D mech asset.  Previously we ended with the torso and upper leg, like so:




Since then, I’ve rotated the upper leg back, created a foot and lower leg:



Current face count is at 527, but there is a hell of a lot of optimizing that could occur here.


There are a couple ugly areas too, that I intend to address later.  Not to much sense worrying about the ugly bits until you are cleaning things up.  One area of ugliness is the union between the foot and lower leg.  I modeled the foot first then extruded the leg up from it.  I then needed to connect it to the upper leg, which had a different number of edges.


I could have simply added an equal number of edge loops, but that seems like over kill, so instead I’ve created a problem to be solved later.



As you can see, I have about 5 faces blunting into a single face (top arrow ), as well as some triangle junction points.  Getting rid of the tri’s should be simple, but the lower leg presents a bit more of a challenge.  Reality is, I am using far more polygons than I really need to be, so I will probably solve things by reduction, not addition.


26. March 2014


I am a big fan of LibGDX and a big hater of Eclipse.  This always put me in a bit of an awkward situation, as in order to use LibGDX you basically had to use Eclipse, at least if you wanted cross platform support.  You could get IntelliJ to work, but it required a heck of a lot of jumping through hoops.  The reason Eclipse was basically forced upon you is because Google tied it’s tools pretty heavily to the Eclipse platform.  So if you want to use GWT ( for HTML target ) or Android, Eclipse was by far the easiest path.  Fortunately LibGDX recently announced they moved their build system to Gradle. 


Now let’s take a look at how you create and execute a LibGDX project in Eclipse.  First and foremost, grab a new release of LibGDX.


Next we want to generate our project.  You need gdx-setup.jar, you can download it here or find it in the lightly release of LibGDX.  Simply double click the jar to run it.  You can also run it from the command line, but we will only use the GUI in this example.




It’s like a stripped down version of the old setup tool, enter the name, package and class name ( following Java naming rules ) and click generate.


Configuring Android


You need to have the Android SDK installed to continue.  I recommend installing the stand-alone version of the SDK instead of the ADT bundle ( which is Android SDK + Eclipse ).  You can download the Android SDK here.  The download can be a bit tricky to located, Scroll down and locate “DOWNLOAD FOR OTHER PLATFORMS”, then locate SDK Tools only and download the appropriate package:




Extract that archive somewhere. 

At this point ( I am not sure its required, but it’s a good idea ), set the environment variable ANDROID_HOME and point it to this folder.


Now open up this folder and located SDK Manager:



Run it.  Let it install/un-install whatever it wants to do to make sure you are current.


The next step is very important.  You need to install the build tools version that LibGDX expects.  Right now I believe that version is 19.0.3.  The Gradle build process will fail if these tools are not installed.




Configuring IntelliJ


Make sure you have version 13 or higher.  You can download it here.  Community edition is fine, in fact, not much of the paid version is of use to a game developer.  Download and install IntelliJ 13.x if you haven’t already.


Anyways, now that we have fired up IntelliJ, we have a bit of configuration to do before we continue.  We need to setup our JDK and Android SDK in IntelliJ.  If you haven’t already, install and configure the Java 7 JDK.


This part is going to be a bit awkward, but it should only happen the first time.


Run IntelliJ.

In the welcome dialog, select Import Project



Navigate to the directory you created your project in earlier and select build.gradle from the root directory:



Click OK.

In the next dialog, accept the defaults and click OK.



Gradle is now going to build your project… or at least try.

Gradle downloads all the required components, so this could take a while.   Or it should, but truth is, its going to explode in a horrible state of explosionness.  Look for an error like this;



Don’t worry over much, it’s just that IntelliJ doesn’t have a clue where your JDK and ADK are.  Let’s fix that now.


In the Project View (ALT + 1 if missing), right click the root project and select Open Module Settings:



In the resulting dialog select SDKs then click +.



Select JDK



Navigate to the location you installed your JDK.


Next click + again, and this time select Android SDK.  Select the Android SDK location and click OK.

This time you also have to pick the version:



Now there is a possibility you have a wrongly configured JDK at this point too:


If you have an entry other than the ones you created, select it and then hit the – button.


OK, SDK’s are now configured.


Now lets re-import the project.  Select File->Import Project and pick the .build file in the root of your project again.  When prompted:


Select “This Window”.


Now your project should load without errors.  You should never have to perform the above steps again, unless you change JDK or Android SDK versions.


Running the Desktop Project


You have a one time configuration to run each project type.  Let’s start with the Desktop project:

Select Run->Edit Configurations…



If an entry for Desktop doesn’t already exist, select the + icon.



Select Application:



Now configure the project like so.  Name it then select DesktopLauncher as the Main Class, the Android\assets folder for the working directory and desktop for the classpath value.




Once again, its very important when selecting the working directory, make sure to select the assets folder in the android project!



Now select Run->Run Desktop and voila:



Running the Android Project


Once again select Run->Edit Configurations.

If an Android project doesn’t exist, select the + icon and select Android Application.



In the configuration, name it, select Android for module and optionally pick USB Device under target device.  Unless of course you are crazy enough to actually use the horrific Android emulator that is!



Now select Run->Run Android to run on an Android device.  The application will be deployed to your device and you should see Logcat information in IntelliJ




Running the iOS Project


Ok… you need a Mac to do this part and I don’t currently have my Mac with me.  So… coming later.



Running the GWT ( HTML ) Project


If there is an area you are going to have trouble with, this is the one.  It’s somewhat normal though, I’ve had a lot of fights with GWT tooling thus far.


The project is the same Run->Edit Configurations:

This time select Gradle as the project type.



Now configure the following, set the Name, select the gradle project ( details below ), click Single Instance Only and task to superDev:




When setting the gradle project, be sure to select the project in the gwt folder.



Now click Run->Run HTML.


It will churn away for a few moments, then you should see:



Look for the URL in the results.  Open this in a browser to run your app.


In all honesty, this currently simply doesn’t work for me right now.  Currently I get:



Frankly I have had nothing but trouble with GWT and superDEV, so I really cant be bothered fixing this at the moment.  If I do come up with a solution, I will post it here.



Ok, I have a solution to the GWT problems, and it was mostly me, but partially a lack of intuitiveness.

To see your application, once you run the project open a browser window and go to localhost:8080/gwt

Then you should see:



There you now have a working project running in IntelliJ now.  Much of that was one time, so at the end of the day, after the first time, setting up a new project in IntelliJ is just as fast as an Eclipse one.  YAY, no more Eclipse!


24. March 2014


I have the need of a fully rigged Mech model, for a couple of reasons, so I’ve started working on one.  Figured I would document the process as I go.  It’s somewhat of a background task, so don’t expect a whole lot of speed.  This isn’t a tutorial either, look here for that, just a documentation of my process.  Hopefully some of you find it worthwhile, while I am sure some of you will find it cringe worthy!


Here, are the humble beginnings:



One of the challenges all modelers face is where to start?  I had trouble deciding.  Generally if I stat with a limb, I struggle a bit with proportions going forward, so this time I decided to start with the torso and upper legs.  Of course details are going to be added as I carry on in the process.  Currently we are sitting at 390 faces.  Ultimately I want to be in around the 5,000 mark.  There are several easy points of optimization here.  The eagle eyed viewer may also spot my first mistake too.




I always try to work in quads only, but sometimes corners just turn into triangles like this.  Look what happens if we apply a couple sub-divisions around this corner:




It’s not the end of the world, but not as clean as I would have liked.  In this case though, it still leaves me with proper edge loops in both directions, so I am not to phased about it.



So, where you might ask, is the concept art?  This is a good point and generally I would sketch in a front and side view, like I did in the Blender tutorial.  That said, for reasons I can’t bring myself to understand, whenever I do this with pen and paper, I just end up ripping off existing designs.  So in this case, I’m just going to wing it, although when it comes to the cockpit area, I may have to reconsider.


23. March 2014


This tidbit comes care of reddit.  Quixel dDO 5.3 can now be downloaded (that’s a direct link) and is free for commercial use.

Here are details of the release from Quixel:

Yes, we are now making dDo as we know it free. Not only that but we have also spent some love and care on improving features, stability and UI. This version will have limited support but will still be updated as per your needs.

We sincerely hope that you who own dDo will not feel let down that you paid for something that will now be free, but rest assured we will do our best to make it up to you with a free upgrade to the all new, arguably more bad-ass, DDO.

So what exactly is dDO?  Here is the official description:

DDO empowers artists with tools to make better textures. DynaMask unlocks extreme masking control over ultra-real wear & tear and shape based coloration. The 100% customizable Smart Materials empowers artists with the easiest PBR workflow to date. And Fusion lets you plug DDO right into any app.


Perhaps of more use is actually seeing dDo in action.

Just a bit of a heads-up... dDo works in Photoshop, and thus requires Photoshop. Without Photoshop dDo is of no use to you.


See More Tutorials on!

Month List