Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon Join the GFS Discord Server!
3. September 2013


Way back in October of 2012 I mentioned the Platino 2D game engine.  It runs in Appcelerator Titanium a cross platform JavaScript based mobile development system.  Platino appears to have it’s roots in QuickTiGame2D, and open source 2D Titanium game engine.  Anyways, after several months in closed beta Platino is finally available to the public and it’s grown into an entire family of products.




Excerpts from the launch press release:

Over the past several months, we’ve been fine-tuning our Lanica product line and giving some of you early access to new goodies as we roll them out.  During that warm-up phase, we focused mainly on big studios to ensure that Lanica could handle the most heavyweight demands of mobile gaming and interactive development before we let it loose to the masses.

And now, without further ado, we’re releasing the Lanica Game Platform to indie developers!

What does that mean?  Well, most importantly, we’ve rolled out lower prices for indie devs, non-profits, and educational institutions to access Lanica.  You’ll no longer have to break the bank to have the power of our entire game-making platform in your hands.  Now, no matter what the scale of your operation, any developer can make use of all the big guns that we offer.


If you’re new around these parts, we should probably explain why we’ve decided to release Lanica as a three-pronged platform for making games:

You see, we realize that most developers out there already have their own processes in place, and it’s unfeasible for them to just drop everything and pick up a whole new platform every year.  That’s why we’ve built the Lanica Game Platform as a multi-tiered but separable platform, so developers can incorporate Lanica into their workflow at any scale — whether it’s just one tool or the entire platform.  We didn’t want Lanica to be an ‘all or nothing’ deal, that simply would not have been fair.  Instead, you can mix and match specific pieces of the Lanica Game Platform to fit your own development needs.

For instance:  Let’s say you absolutely love your current code editor, but are in dire need of a better sprite animator — Animo Sprites will have you covered!  Want better particle effects, but can’t part with your current framework?  You can use Animo Particles!  Need to step up to a completely new game engine? Then Platino (a.k.a. the JavaScript juggernaut) is your baby!

We don’t want to leave anyone out in the cold, so be sure to check out our entire product line and see what could work for you.


I was in on the closed beta and will say, working in Titanium is a breeze and the SDK is quite nice.  I never really got much into using the other tools other than to play around with the particle tool.  What I’ve been waiting on most was pricing and today we’ve finally got it:




Note the * beside all of the prices?  That’s because you don’t actually purchase monthly, it’s a bit of marketing slight of hand.  So basically the Platino Engine is 816$ a year for companies, or 408$ a year for indies.  Add another 144/72$ if you want to add in app purchase support.  To be honest, those prices are a great deal higher than I was expecting, especially given the amount of competition there is out there.  I am especially shocked there isn’t a complete package price point.


That said, if you are using Titanium and want a game engine, Platino is the only game in town and it’s a good game indeed.  Just not a cheap one, at least compared to it’s peers.


27. August 2013


YoYoGames have released update 1.2 for their popular GameMaker cross platform 2D game engine, which was used to make such titles as Hotline Miami and gamemakerlogoHome.  Included in this update is one pretty bold claim…  New YoYo compiler runs projects up to 100x fasterI!  That’s a pretty big claim, and I have to say… if you’ve got room for a hundred fold improvement in speed… you had some pretty serious issues before hand!



Anyways, here is more information from the release:



  • New YoYo Compiler Runs Projects Up to 100x Faster
  • New Shader Support Allows Creation and Cross-Platform Publishing of Shaders


YoYo Games today announces the general availability of GameMaker: Studio version 1.2. With today’s update, developers will be able to harness the full speed of the CPU with the new YoYo Compiler, allowing projects to run up to 100x faster across all native platforms supported. Fully-integrated, totally cross platform Shader support allows developers to write shaders once and then deploy them across all platforms that support them.


"Today’s update raises the bar in the visual quality and the complexity of games that can be made in GameMaker: Studio,” said Russell Kay, chief technology officer at YoYo Games. “Our goal with today’s update and all future enhancements to GameMaker: Studio is that the imagination be the limiting factor in the game development process, not the technology.”

The YoYo Compiler

The YoYo Compiler unlocks new possibilities in CPU-intensive areas such as artificial intelligence, procedural techniques, real time lighting, enhanced physics, real time geometry deformation, collision and data manipulation, immensely raising the quality bar. The YoYo Compiler is free for customers of GameMaker: Studio Master Collection and is otherwise available as an add-on priced at $299.

Cross Platform Shader Support

Fully integrated, totally cross platform shader support allows full access to low level shaders, while still letting GameMaker: Studio do the heavy lifting. The built-in editor has been extended to have full color syntax highlighting and “intellisense” for shaders, making creation a breeze.


The rapid adoption of GameMaker: Studio as the preferred 2D games development framework has exceeded YoYo Games’ expectations. Today, GameMaker: Studio has been downloaded more than one million times and is quickly approaching 20,000 daily active users. To learn more about the GameMaker: Studio family of products and to get GameMaker: Studio version 1.2, please visit


Certainly an important release for GameMaker developers.


4. August 2013


I just received the following email:

Dear You,

We recently became aware of suspicious activity relating to some of Crytek’s websites, and acted quickly to take those websites offline for security reasons.
The sites listed below are currently offline:



The following Crytek sites remain online and are not affected by these issues:



If you have an account at or, you will be asked to change your password next time you log in. If you use your current password anywhere else online, we would also suggest that you reset it at those sites.
We are working on getting all websites fully operational again as soon as possible. Please accept our sincere apologies for any inconvenience.

The Crytek Team


If you visit any of those sites, you see:



Considering that you had to register to evaluate CryEngine, if you’ve looked at it, you are compromised.  You need to authenticate to use CryEngine, so I wonder if all the devs are now dead in the water?  What really annoys me about this announcement is they don’t tell you if the passwords were encrypted.  At this point in time, any website that compromises user information without encrypting it, should be liable for any damages that occur!  This is getting far too common.


22. July 2013


For a point release, this one’s pretty good.Unity42


As mentioned in the title, probably the biggest change is the addition of 3 new platforms, Windows 8 ( as in the app store ), Windows Phone 8 and Blackberry 10.  Windows Phone 8 “Pro” is available free to Unity Pro subscribers.


Probably the biggest new feature isn’t new at all.  A number of previously “pro” level features are now available free.  Nav mesh baking ( used for AI pathfinding ), realtime shadows and text based serialization of assets for integration with version control have all become free features.  Those are perhaps the most cited missing features from the “basic” version, so if you are on a budget, that’s great news.


Other big features include:

  • OpenGL ES 3.0 support
  • Perforce source control integration
  • iOS crash reporter
  • Anti-aliased RenderTextures.
  • Numerous new image effects ( Blur, Bloom, Edge Detection, etc… )
  • Stencil buffer access (pro only)
  • Shuriken particle system callback scripting interface
  • Added the Quad primitive!


Of course, this is just a highlight of the features added, you can check them all out here.  Or of course you can just go ahead and download it, as all Unity basic versions are now free.


17. July 2013


In this tutorial we are going to look at how to handle Input using Lua scripting ( we will look at C++ later ).  I assume you have read the prior tutorials, so you should have the ability to create a new project and populate it with a new entity using the crate model we made earlier.  You do not need to export it again, you can simply copy the MODEL and texture files over to the root of your newly created project.  So, do that now, create a new project, create a default scene and add the crate model to your scene.  Next add a script component to your newly created crate entity.  If you have any problems with the above instruction, please refer to prior tutorials in this series.


In this tutorial we cover:

  • Polling for keyboard input
  • Polling for mouse input
  • Creating input maps to handle input in an abstract manner


By the way, this tutorial starts by demonstrating a way you shouldn’t use!  Be sure to read the entire post before you do anything.



Handling Keyboard Input


The following script shows how to handle basic keyboard input using Lua.  I attached the script to our entity and implement it it’s OnThink callback.


function OnThink(self)
  if Input:IsKeyPressed(Vision.KEY_UP) then
  elseif Input:IsKeyPressed(Vision.KEY_DOWN) then
  elseif Input:IsKeyPressed(Vision.KEY_LEFT) then
  elseif Input:IsKeyPressed(Vision.KEY_RIGHT) then

The key is the Input object, which is an instance of VScriptInput_wrapper, which as the name suggests, wraps input functionality and makes it available in Lua.  Another thing of note is the Vision object ( well… table if I am going to use the proper terminology ) contains a number of constant defines, in this case we access the values for various key codes, such as Vision.KEY_LEFT.  In the event of an arrow key being pressed, we move our entity calling the IncPosition() function, moving along either the X or Y axis, depending on which key is pressed.


The key thing to realize about the IsKeyPressed function is it will report true every time a key is hit.  Therefore with the above code, if you hold down the key it will fire every time OnThink() is called.  What do you do if you want to only respond when the key is pressed the first time?  In that case you use SetKeyOnHit, like so:



function OnCreate(self)

function OnThink(self)
  if Input:IsKeyPressed(Vision.KEY_UP) then


Using the above code, with the added call SetKeyAsSingleHit changes it so IsKeyPressed for KEY_UP will only return true when the UP arrow is initially pressed, and wont return true again until the key is released and pressed again.  You can toggle this behaviour off by calling SetKeyAsSingleHit again but passing false instead.



One very important point!


When testing input code, it is very important that you run your game in “Play the Game” mode, otherwise vForge will still capture and handle all the input events.  You run in Play The Game mode by clicking the down arrow next to the play icon and selecting Play The Game:



When you are done testing your game, hit the ESC key.


Handling Mouse Input


Now let’s quickly look at how you handle mouse events.  I created a new scene in the same project, added the create model and once again attached a Lua script component to it.  The Vision engine has the ability to poll the mouse for activity, which is exactly what we are about to demonstrate.


-- new script file

function OnThink(self)
	local mouseX,mouseY = Input:GetMousePosition()
  local mouseDeltaX,mouseDeltaY = Input:GetMouseDelta()
  local mouseWheelDelta = Input:GetMouseWheelDelta()
  local isLeftButtonDown = Input:IsMouseButtonPressed(Vision.BUTTON_LEFT)
  local isRightButtonDown = Input:IsMouseButtonPressed(Vision.BUTTON_RIGHT)
  local outString = "Mouse Position:" .. mouseX .. "," .. mouseY .. 
                  " Mouse Delta:" .. mouseDeltaX .. "," .. mouseDeltaY .. " Mouse Wheel Delta:" .. mouseWheelDelta

  if isLeftButtonDown then 
    outString = outString .. " Left Button Down"

  if isRightButtonDown then 
    outString = outString .. " Right Button Down"


The code is quite straight forward.  Each frame in OnThink() we poll the location of the mouse using GetMousePosition(), the amount the mouse has moved since the prior frame using GetMouseDelta(), the amount the mouse wheel has moved using GetMouseWheelDelta() and finally check to see if either mouse button is pressed using IsMouseButtonPressed().  Once again, the mouse button constants are defined in Vision.


If you run this code you will see:




Once again, like the keyboard demonstration, you need to run in Play The Game mode for Engine View to receive the input.


Creating Input Maps


Now that we’ve covered how to directly poll the mouse and keyboard for input, we will now look at handling input using a InputMap instead.  Using an input map allows you to put a layer of abstraction between you and the input devices, allowing you to map multiple control schemes to a single action.  Let’s jump right in and take a look.  I am once again creating a new scene, adding the crate model and applying a script to it.


-- Inputmap demo

function OnAfterSceneLoaded(self) = Input:CreateMap("crateInputMap")"Up", "KEYBOARD", "CT_KB_SPACE")"Up", "MOUSE", "CT_MOUSE_RIGHT_BUTTON")"Up", {0,0,100,100}, "CT_TOUCH_ANY", {once=true})

  -- arrow keys mapping for left/right"MoveX", "KEYBOARD", "CT_KB_LEFT", "CT_KB_RIGHT")
  -- WASD mapping for left/right"MoveX", "KEYBOARD", "CT_KB_A", "CT_KB_D")
  -- gamepad mapping for left/right"MoveX", "PAD1", "CT_PAD_RIGHT_THUMB_STICK_LEFT", "CT_PAD_RIGHT_THUMB_STICK_RIGHT")

function OnThink(self)
	if"Up") == 1 then

  if"MoveX") < 0 then
  elseif"MoveX") > 0 then


This time we are creating a map to handle input using the function Input:CreateMap().  If you create another map using the same name, the previous map will be destroyed.  Once we have a map, it’s a matter of defining triggers.  Essentially this means we are giving a string key and mapping it to an input event.  For example MapTrigger(“Up”,”KEYBOARD”,”CT_KB_SPACE”) is saying when the spacebar is pressed on the keyboard, trigger the trigger named “Up”.  As you can see, you can map multiple devices/keys to the same trigger.  In this example, we mapped the SpaceBar, Right Mouse Button and touching the screen in between the coordinates (0,0) and (100,100) all to the trigger “Up”.  So now instead of handling all the different control schemes in code, we can simple deal with “Up”.  If you look at the  CT_TOUCH_ANY trigger ( which we will cover in more detail later ), you can pass in a table of optional parameters in as well, in this case we are saying we want the event to only fire once per touch.


Sometimes however you want to bind an axis to an event, such as pressing left or right arrow keys, or using the thumbstick on a gamepad.  In that case you can use MapTriggerAxis().  In this case you pass in the name of the trigger, the device to use, then the values representing the negative and positive ranges of the axis.  In the first example, we are mapping the LEFT and RIGHT arrow keys to the X axis, with CT_KB_LEFT representing the negative value and CT_KB_RIGHT representing the positive value.  We also bound the A and D keys from a traditional WASD layout to the X axis, as well as the right thumbstick on a gamepad, if present.  The code will warn you that a given device isn’t present, but will run anyway.


Now in on think you can see handling triggers is extremely simple, you simply call your map’s GetTrigger method, passing in the name of the trigger you created.  Therefore if any of the triggers we defined are true ( RMB pressed, Spacebar hit or certain region of the screen is touched ), it will return 1 get you check the “Up” trigger.  Dealing with axis is virtually identical, except it returns a value from –1 to 1, depending on direction pressed.  Using a map allows you to easily handle multiple control schemes using a single code base.


In this tutorial, we looked mostly at traditional desktop controls… not really much use in mobile development.  In the next part however, we are going to look at work with mobile input.


See More Tutorials on!

Month List