Understanding Game Maker 1.2s LLVM

Yesterday YoYoGames CTO publicly released 2 APK files demonstrating the new LLVM compilation in game maker studio that should be coming in version 1.2.

But what does this actually mean for users of game maker? Lets first answer this question by defining what an LLVM is and why its better than a traditional Interpreter.

LLVM Stands for Low Level Virtual Machine and it can be thought about as a replacement for the traditional interpreter but why replace something that’s all ready working? An interpreter just like in real life stands between two platforms, the Source Speaker (GML) and the Destination Platform(PC, Mac, Linux) interpreting what the source is trying to say into actions the destination can perform.

A perfect example of this would be a Chinese man speaking to an interpreter to ask an English man to fetch him some coffee while this process works it is not an ideal situation.

In order for this to work the interpreter needs to speak fluent English and Chinese and in the same way the GML Interpreter needs to know every function of gml and be able to translate that into an appropriate function of any other platform this means the interpreter becomes heavy with knowledge and holds onto information about everything possible in gml even when its not required.

The LLVM solves this problem by eliminating the middle man directly compiling the language to common language “CL”  this common language is then compiled directly to the platform in question this gives us a huge performance gain over interpretive systems since we no longer have a middle man this also makes it significantly easier to take the language to different platforms since no longer do we need to port the interpreter to a new platform but instead simply add support for the common language which in many cases is already done.

The LLVM handles code optimization and generation at a low level this means no longer are functions compiled into your applications that your applications don’t use which allows for a smaller footprint since we no longer have the entire GML Interpreter built into the application but only a subset of whats being used.

You can quickly begin to see the benefits of an LLVM system over the traditional interpretive system and we should be expecting to see a realistic performance increase in application logic of over 2x and of course small footprints.


You can find the demo apk’s and the post by YOYO’s CTO Below




Seed Based Matrix Randomization

So today i found myself in the odd circumstance that i needed a random value when given an X and Y coordinate naturally doing a dual for loop for each resulted in a horrible slow method that completely destroyed performance.

So i came up with the idea of caching randomized values in a 2D matrix and pulling them our as required, naturally this has the problem what if your looking for in X and Y Coordinates and your cache is not large enough to support those values? the solution Modulus looping and thus i present to you Matrix Randomization. please find the open source matrix randomization as part of the rm2kdev.toolkit namespace

Basic usage is simply initializing it with a length of 100 and whatever seed you like if you’d like a larger scrolling offset increase the length but know a larger array will result in longer look up times and more memory usage but for my uses I’ve found 100 wide to work perfectly.

'Copyright rm2kdev, free for use by anyone.
Namespace Rm2kdev.Toolkit
    Public Class MatrixRandom

        Private Randomizer As System.Random = New System.Random()
        Private Length As Integer
        Private Matrix(,) As Double

        Public Sub New(Length As Integer, Seed As Integer)
            Me.Length = Length
            ReDim Matrix(Length, Length)
            Randomizer = New System.Random(Seed)
            For i = 0 To Length
                For j = 0 To Length
                    Matrix(i, j) = Randomizer.NextDouble()
        End Sub

        Public Function RandomXY(X As Integer, Y As Integer) As Double
            Return Matrix(X Mod Length, Y Mod Length)
        End Function

    End Class
End Namespace

Cross Platform Game Development

So this video is a demo i recorded of some stuff i was doing throughout the Easter long weekend. Basically it demonstrates a game i am working on called Hangar:18 running seamlessly across multiple platforms.

PC, Mac, Android and IOS.

The clients are all connecting via TCP to a central server designed and implemented in c#.net based on a asynchronous architecture documented on msdn

Obviously in the default state it would not support a game i have redesigned the class into more of an application that supports automatic packet building, udp for non essential data (positions etc) and database connections for storing state information and stats in a MSSQL database.

More to come later.

My Wifes Paper Craft

I posted some images of my wife’s paper craft on twitter last night and the response was amazing i showed her all your tweets and likes and re tweets and she was really happy! so following this up i asked her to get me some photos of the things shes made throughout the past.

May i introduce her gallery of paper crafts. if you can leave some feedback that would be nice i will show her the feedback

Oh and just to be clear. this is all made from paper……

Procedural Sprite Generator

I found this procedural sprite generator online and thought it was pretty cool

It looks like it was made by the guys over at tomato games who if you check out their main website have made quite a few mini games. i’m not certain how their sprite generator is working but its defiantly an indie treasure, one of those links that you bookmark and save for a lonely day when your artist is sick or your working on a brief weekend project.