Getting AppGameKit to run it’s game executables on Ubuntu 16.04

July 18, 2016

Well, App Game Kit was on sale today on Steam and as always, Steam sales bring the impulsive buyer in me out! Even better, this piece of game development software has native support for Linux.

However, upon first trying to run the initial AGK basic code, no window would appear. Running the produced binary in a Terminal or through the Debug button would produce output like the following:

AGKBroadcaster64: error while loading shared libraries: cannot open shared object file: No such file or directory


So, it’s running into a dependency problem. The hard part for most would be that the packages AGK executables rely on are not in Ubuntu 16.04’s repositories. These packages are from the Ubuntu 14.04 days.

Not to worry though, I was able to cleanly overcome these dependency requirements in a standard updated 16.04 install. Here’s a quick step-by-step for you to get up and running too.

For Normal Users

To be clear, the AGK dependencies are two. One is libavcodec54 and the other is libavformat54.

First, head to each of these links and download the .deb files. The links on each page may not be as apparent at first glance, but you’ll generally either be looking for a mirror link near you or there will be the text ‘’. Rather strange text for a download link, but it’s the right one.

There’s more than two packages because, you guessed it, our two packages have their own dependencies. Thankfully this rabbit hole does not go too deep.

Download each of these:

Now, install them by double-clicking them. Follow this list from top to bottom! (That means start from the top or number 1 and install them one-by-one whilst going down the list and end at number 8).

  1. libavutil52
  2. libopenjpeg2
  3. libvpx1
  4. libx264-142
  5. libavcodec54
  6. libgnutls26
  7. librtmp0
  8. libavformat54

Double clicking them will open them in the new shiny Ubuntu Software app.

That should be it! Now if you try to run your AGK executable, either through a terminal, by double-clicking it or through the AGK IDE it should run the game window without issue. Running the default basic code which prints the frames-per-second should show something similar to this:

For Advanced Users

If you’ve already run the steps in the above section for Normal users, then you’re done! This part is for those who want to use a Terminal instead to solve the problem. If you’re like me and want to install them through a terminal to see what’s going on and to find any potential problems, then CD to the location you downloaded those .deb files. To install each deb package through a Terminal, the command looks something like the following:

sudo dpkg -i package_name_amd64.deb

So, for example the first package would be:

sudo dpkg -i libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb

I believe it’s possible to do it all in one go, but I’d recommend separating it in at least two parts so the required packages get installed before the main dependency packages get installed. The required packages first in one go:

sudo dpkg -i libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb libopenjpeg2_1.3+dfsg-4.7ubuntu1_amd64.deb libvpx1_1.3.0-2_amd64.deb libx264-142_0.142.2389+git956c8d8-2_amd64.deb libgnutls26_2.12.23-12ubuntu2.5_amd64.deb librtmp0_2.4+20121230.gitdf6c518-1_amd64.deb

Now, the main dependency packages in one go:

sudo dpkg -i libavcodec54_9.18-0ubuntu0.14.04.1_amd64.deb libavformat54_9.18-0ubuntu0.14.04.1_amd64.deb

Final Notes

I hope this helps you in some way! The developer has kindly replied to me in the Steam forums with the following regarding this problem:

The OGG music commands are a step towards this support. The old music commands used libAV to decode music files whilst the OGG music files use a built in decoder. At some point I will remove the old music commands from the Linux version so that we no longer have this dependency.

So, he is working on a solution for the future. Whilst this quick guide does show one how to get the AppGameKit IDE up and working in Ubuntu 16.04, it would be unwise to expect normal gamers on Ubuntu or any latest Linux distro to have to manually install these packages before they can start your AGK game. Whilst it might increase the size of your game package, it would be wiser to include these libraries statically in your final game package for now. Alas, as is with anything in the game development arena, this can be debated as a good or bad thing. In the end, it’s up to you what path you choose to release your game on. Happy game devving!




Run Unreal Engine 4 on Ubuntu 16.04

April 24, 2016

It’s been over a year since I last made the tutorial post for downloading, building and running Unreal Engine 4 on Ubuntu. Since then, both Unreal Engine 4 and Ubuntu have moved to newer versions, and things have changed quite a bit!

So, since Ubuntu 16.04 is the new LTS release and will be around for a long time, I figured I would go over the new steps to get Unreal Engine 4 up and running on this new beautiful release. Let’s get started!


I began these steps with a clean install of Ubuntu 16.04 64bit on the Nvidia open source drivers (Nouveau), which to my surprise now work with UE4 out-of-the-box! That is to say, you should be able to follow along with these steps with little to no issues.

I cannot vouch for AMD or Intel GPU users, these two vendors generally have flaky Linux driver support, so things may or may not work depending on your generation of card. When in doubt, make sure you have the latest drivers installed, and with Nvidia I still recommend using the proprietary drivers for maximum efficiency and performance.


To start, us Linux users still need access to their github account. Unfortunately, it does not look like the Unreal guys will bring the Epic launcher to Linux (a year later still nothing). If you’ve done this before, you can skip these steps and head to the ‘Download UE4 Source’ section below.

  • Make your Github account here (it’s free).
  • Make your Unreal account here (it’s free).

With those setup, you will need to link your Unreal account to your Github account before you can get the source for Unreal Engine 4 from Github. Do that here, enter your Github username and click save.

Go back to your Github page, and you should see an invitation from Unreal. Accept it.

Download UE4 Source

To clarify, the source code that’s available on Github is the latest if you’re on their main page. I would not recommend using this as it’s bleeding edge and can usually be pretty buggy. Instead, I recommend heading to the releases page here and selecting a specific version.

In my case, I use the last version’s latest hotfix which in this case is 4.10.4. If you’d like to use the exact same version as in this tutorial, the link to it is right here. Click the “Source code (zip)” to download your selected version.

Start Setting Up

You should now have a .zip file in your Downloads folder or where ever you chose to download it. I downloaded the zip file to the desktop for ease of access. Right click it and click Extract Here. Now, open a Terminal. Click the Ubuntu Dash button on the top left (or click your Windows button on your keyboard) and search for “Terminal” if you’re unsure how to find the Terminal.

Now, we want to CD into the folder we’ve just extracted. In my case, that would be:

cd '/home/ismail/Desktop/UnrealEngine-4.10.4-release'

Once we’re in, let’s actually run the setup. Enter the following into the same Terminal:


Don’t panic! We will run into a problem here. Setup will run for quite a while, and then will run into the following problem:

E: Package 'libmono-corlib4.0-cil' has no installation candidate

No matter how many times you rerun it, it will get stuck at this section. So, let’s go through the quick fix that seems to get me through this. First, let’s install what’s needed manually. In the same Terminal, or a new Terminal, whichever suits you, run the following:

sudo apt-get install mono-reference-assemblies-4.0 mono-devel

Once that’s done, we now need to manually change the following file so that the will stop trying to get the wrong package. Open the folder where your UE4 source is in, for me that’s the folder called UnrealEngine-4.10.4-release that’s on the desktop. Then head into the following sub-directories.


Once you’re in this folder, look for the file called (this is a different file from the previous one we ran). Open it in your favourite text editor, I just right-clicked it and clicked Open With -> Gedit. On line 44, under the section that reads DEPS=”mono-xbuild”, we want to remove that line that reads ‘libmono-corlib4.0-cil’. Save the file.

This is the line we want to remove:

This is the file after we’ve removed that line:

Now, it’s time to rerun the Setup command we did above to let it complete itself. So, if you’re lost, just open a new Terminal and CD back into your source folder for Unreal Engine 4 and run this line again:


It should no longer get stuck. Once it’s completed, you should see something like this:

Generate the Project Files

In the same Terminal, enter the following:


Once it’s completed, you should see the following:

Time to Build

This part is the heavy part, and can take quite a long time. On my computer with the following specs, it takes me about an hour to build:

  • CPU: Intel i7-4770 3.4GHz
  • GPU: Nvidia GTX 680 2GB
  • RAM: 24GB DDR3 Adata 1600MHz

RAM is essential for this part. If you have less than 8GB of RAM, it is very likely to crash your entire system as I’ve experienced in the past. On my own computer, I usually see it top out at 9.3GB of RAM usage.

In the same Terminal as previously, enter the following:

make UE4Editor UE4Game UnrealPak CrashReportClient ShaderCompileWorker UnrealLightmass

What it looks like whilst it’s running:

Leave it for a while. It may take anywhere from 15 minutes upwards to over an hour. Once it’s completed, you should see the following:

The last item we need to run in the same Terminal is:

make -j1 ShaderCompileWorker

You should see the following once it’s completed:

You’re set! Now it’s time to run this beast and see if it works. Open your Unreal Engine source folder (for myself that would be the folder on the Desktop named UnrealEngine-4.10.4-release). Head into the following folders until you see the UE4Editor executable.


Double click the UE4Editor executable and UE4 should start running!

What really impresses me is that this is all running on the open source Nouveau driver! Naturally though I will upgrade to the proprietary driver as this OSS driver is still too slow to run UE4 and compile shaders.

I made a build of the ThirdPerson Template project, added a UMG widget with the Ubuntu logo just to make sure things work. Then packaged it for Linux and ran it on Ubuntu immediately. It works!

I hope this helps you get up and running with Unreal Engine 4 on Ubuntu 16.04, happy game developing!

Developing with Unity3D on Ubuntu

October 31, 2015

Well, I never thought I’d see the day! Over the course of one week, specifically from the 19th of October 2015 to the 26th of October 2015, I took part in’s first ever Linux Game Dev Jam.

Over the course of that one week, I took the experimental Linux build of Unity3D [version 5.1] and built a first-person shooter game for Linux. With how everything worked, I can say successfully that I developed for Linux on Linux!

Here’s a video that shows some footage from the game, and also includes a time lapse of my development over the 7 days.

The Linux version of Unity3D is not without bugs though. Several I personally experienced were:

  • The Editor would crash everytime I tried to bake the Lightmap for all static objects in the scene.
  • RenderSettings does not obey changes from the script-side, but does obey Inspector-side changes.
  • Mecanim would not reset certain animations after changing scenes a certain number of times.

There were a couple more nuances with the editor, but in the end I was able to make use of most of it. The final game was of course buggy, had a hideous night atmosphere, and all around felt quite unpolished. It did however showcase what can be done by one semi-knowledgable individual in the span of one week with a lot of pre-made assets and a few self-made ones.

The power of the new UI system has to be one of the more enjoyable aspects of Unity 5. The previous OnGUI would have prevented a lot of the cool things I managed to get done in this one week. For example, interacting with certain crates would generate a UI with information on what was inside the crate in real-time thanks to the new UI system and prefabs. Trying to do this with OnGUI is unimaginable. You would have to code everything down to where exactly on the screen things would go and how they would need to respect the aspect ratio. With the new UI, you can do all that inside the editor directly and entrust it into prefab form. Is it the most beautiful looking game? Not at all. However, the shear amount of functionality I could squeeze in for a duration of 7 days is amazing.

I’m very thankful to the Unity team for bringing this amazing piece of software over to the Linux side. Here are some links for those interested.

Link to the game I made:

Link to the GOL Game Dev Jam page:

Link to the Linux build of Unity3D:

How to compile and run FRAPIX on Ubuntu

March 25, 2015

In my quest to look for more On-Screen Displays (OSD) for showcasing framerates in OpenGL games on Ubuntu, I’ve come across Frapix.

Now, to get this up and running, we’ll need to build it from source code. It’s not that difficult, but I would put this at intermediate difficulty especially if you’ve never coded or compiled anything before.

Compiling FRAPIX

Download the source code

To start, we’ll need the source code for two things. libimago and frapix.

Just click Download Zip for each. You’ll want to extract both of those onto your Desktop to make things easy.

Alternatively, if you don’t want to you use the Download Zip button but instead want to use git, we could do it like this. The following will clone (download) the source code to whichever directory your Terminal is currently in:

git clone
git clone

Installing the dependencies

Before compiling, we need a couple of things installed first. Go ahead and copy/paste this into a Terminal and hit Enter.

sudo apt-get install -y libx11-dev mesa-common-dev libjpeg-dev libpng-dev

Alright, we’re set, let’s first build and install libimago. After that we can build and install frapix.

Building libimago

First, cd into libimago’s folder wherever you extracted it to. For me, that’s on the desktop. This is what it should look like (ismail is my username).

cd '/home/ismail/Desktop/libimago-master'

Now, let’s start building it. Enter the following one-by-one.


This is what it should look like so far:

Installing libimago

Hopefully, no errors turn up here. Time to install it system wide.

sudo make install

Building FRAPIX

With that done, we can now build frapix. Open a new Terminal, and CD into the frapix source code folder wherever you extracted it. For me, that is on the desktop and looks something like this:

cd '/home/ismail/Desktop/frapix-master'

Now, let’s start building it.


Installing FRAPIX

sudo make install

That’s it, we’re done! You should now be able to run frapix with any OpenGL application or game and get a suitable fps OSD to display. The cool thing about frapix is that it changes the color of the numbers depending on the background color. If it’s a dark background, the OSD turns to a bright color to constrast it and vice versa.

Running FRAPIX

To test if frapix is working, we can run it with glxgears like so:

frapix glxgears

You should see a neat little OSD with fps numbers on the top right like I do. If you want to run it with Steam games, that’s also possible. Just right click your favourite game in Steam, and add the following to the Launch Options for that game like so:

LD_PRELOAD=/usr/local/lib/ %command%

Click OK and now all you have to do is start the game, it should work! This is what I get in Cities Skylines:

There is one problem though. If you’re on a 32bit OS, you should be fine. However, if you’re on a 64bit OS like me, you’ll end up with the 64bit version of frapix. What does this mean? Any game or OpenGL application that is 32bit-only will not have the frapix OSD appear.

I’m not yet sure how to overcome this problem, as there doesn’t seem to be a way to have both the 32bit version and 64bit version installed at the same time unlike GLXOSD.

Additionally, I have been unable to get any OSD to work in Wine which is the ultimate goal I’m setting out to achieve here. So, sadly, this does not work in Wine.

This should work on any Ubuntu version, but I’ve only really tested it on Ubuntu 15.04 (both 32bit and 64bit versions). I hope this post was helpful to you in one way or another! 😀

Running Unreal Engine 4 on Ubuntu

March 14, 2015

With Unreal’s latest announcement that they are making the engine available freely to all, I figured I might as well try the IDE client on Ubuntu. These steps should work on any version of Ubuntu, but I’ve only really tested it on Ubuntu 15.04.

This post assumes you know your way around Ubuntu, and have played with Terminals before.

First things first, you still need a Github account and an Unreal account. Why? At the time of this post, the Unreal Github repository is private, so to gain access you must follow Unreal’s requirements to gain access.

  • Make your Github account here (it’s free).
  • Make your Unreal account here (it’s free).

With those setup, you need to link your Unreal account to your Github account before you can access the source code for the Unreal Engine. You do that here, enter your Github username and click save.

Go back to your Github page, and you should see an invitation from Unreal. Accept it. “But wait!” I hear you say, “isn’t the client downloadable for Windows and Mac OSX? Why do we need the source code for Linux?”. In it’s current state, Unreal Engine 4 is not ready for release on Linux (according to the Unreal developers). So, we must make do with the source code for the foreseeable future.

You could use Git to clone (which means download) their source, but it’s just easier if you click Download Zip on the right, and extract it to your desktop once it’s downloaded. Look for the Download Zip button on their page here. Looks like the following. Easy.

Install Required Dependencies

You’ll very likely need quite a few dependencies installed before being able to continue. So, let’s get those installed. Open a terminal, and enter the following:

sudo apt-get install -y mono-gmcs mono-xbuild mono-dmcs libmono-corlib4.0-cil libmono-system-data-datasetextensions4.0-cil
libmono-system-web-extensions4.0-cil libmono-system-management4.0-cil libmono-system-xml-linq4.0-cil cmake dos2unix clang-3.5 xdg-user-dirs libqt4-dev

Setting Up Unreal Engine 4

Alright, we’re set. Let’s get to prepping Unreal Engine 4 to work on Ubuntu. Open a new Terminal, and CD to the directory where you extracted UE4’s source code. For me, that was on the desktop, so my command looked like this:

cd '/home/ismail/Desktop/UnrealEngine'

Once in this directory, we need to run the Setup, so enter this into the Terminal:


Go ahead and hit Enter. It may complain that it needs to install extra dependencies (in case we missed any), just type in your password and it will auto-install it for you. It may take a while, since it’s downloading the rest of the UE4 editor files (3GB or more). Once it’s done, let’s run the following:


If you’re successful so far, you should see something like this in your Terminal:

Encountering Errors with Clang

If, after running GenerateProjectFiles, it returns an error like the following:

*** This version of the engine can only be compiled by clang - refusing to register the Linux toolchain.

Generating data for project indexing... 0%
UnrealBuildTool Exception: ERROR: GetPlatformToolChain: No tool chain found for Linux

This means Unreal’s source still can’t be built using Clang 3.5, or it simply can’t find Clang (may not have successfully been installed). Thus, you will need to uninstall Clang 3.5 (if it’s present on your system), and instead install 3.3 as instructed by them here. Personally, for me, Clang-3.5 worked so it should work for you as well. If this error did not occur, you can skip this part! To remove Clang 3.5, enter the following in a new Terminal:

sudo apt-get remove clang-3.5

In Ubuntu 14.04 and above, you should have access to Clang 3.3, 3.4, and 3.5. So, let’s install Clang 3.3. In the same Terminal as just now, enter the following:

sudo apt-get install clang-3.3

Once that’s done, just rerun the GenerateProjectFiles command as shown above (make sure your Terminal is in the same directory as the UE4 folder).

Building the Editor and it’s Components

Time for more commands! Yay! Alright, shouldn’t be long before we get the editor up and running now. Enter the following in the same Terminal as before:

make SlateViewer

That should have been pretty straightfoward and successful. Now, let’s actually build the Editor itself. Note that this part can actually take a seriously long time, that’s normal and ok. In the same Terminal, enter the following:

make ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor

This part WILL TAKE LONG! It took me over 1 hour to compile, and that’s with an Intel i7-4770 3.4GHz CPU. Clang and Mono ate my RAM like crazy, and when compiling certain modules it actually took up 100% of it, which is 8GB of RAM. Do not attempt this if you have less than 8GB of RAM.

Once it’s completed compiling, it should look like this:

Running the Unreal Engine 4 Editor on Ubuntu

Finally! We’ve made it, let’s run this beast. Be prepared, it took me 20 minutes before I was actually able to use the Editor for the first time, since it needs to prepare shaders for first-time use.

Head into your UnrealEngine source folder, enter the Engine folder, enter the Binaries folder, and finally enter the Linux folder (that’s Desktop/UnrealEngine/Engine/Binaries/Linux for me). Scroll down until you see UE4Editor. It should look like this in your window manager:

All you should need to do is double click it to run it! Give it a minute or two before anything appears. The first thing you should see, should look something like this (fullscreen image here):

After 10 minutes for me, the main Editor appeared, but still required another 10 minutes to finish it’s Shader setup.

That’s it! Happy UE4 Linux game developing! Hopefully I haven’t excluded anything important. Please note that at the time of this post, Unreal Engine was at version 4.7.2.

Modifying and running VoglPerf on Ubuntu

March 12, 2015

So, we’ve gone and compiled VoglPerf . If you haven’t yet, go here for a quick tutorial. That’s fine and dandy, but how do we go about using it?

Good question. I’m going to assume you have the voglperf folder on your desktop. So, first things first, let’s open a Terminal and enter that directory.

cd '/home/ismail/Desktop/voglperf'

Here’s what it looks like:

Note, change the word ismail to your username! The name ismail here is my username for Ubuntu. To make things even easier, instead of typing the full directory just drag-and-drop your folder into the Terminal. It will auto complete the directory for you.

Alright, time to fire up VoglPerf itself. Enter this into the same Terminal:

sudo -u ismail bin/voglperfrun64

Here’s what it looks like so far:

Note, once again change ismail to your Ubuntu username! On top of that, note that I’m using voglperfrun64 and not voglperfrun32. Which one you use depends on the game you want to run. If the game is a 32bit executable, then run voglperfrun32 instead.

Hitting Enter should now yield the following in the Terminal:

What it’s given you is an IP address. Fret not! Open up your favourite Internet Web Browser (I use Chromium here), and enter the IP at the top.

Sweet! We’ve got VoglPerf up and running. Now, before starting a game, let’s enable fpsshow so that it will show a frame counter in any Steam game we connect it to.

fpsshow on

Ok, time to start a game with VoglPerf. Enter the following (change the numbers to the game you want to start!). Here I’m starting Cities Skylines using VoglPerf:

game start 255710

You might get a long warning message from Steam asking if you want to allow it to launch this way, just click Ok. There’s nothing to worry about.

You’ll know it’s starting up successfully if you see the following appear in the Terminal:

Awesome sauce! We’ve got it running and it’s showing the frames per second on the top left! Well, it’s really kind of tiny, and my gosh red is a bad colour (go here for a fullscreen image to see just how tiny it is).

Modifying VoglPerf

So, let’s go ahead and change that. I’m also going to remove the information at the end of that since I only want the fps numbers. If you follow the rest of this, you will need to recompile VoglPerf as we will be editing the source code 🙂

Head into your voglperf folder. Inside the src folder, open voglperf.c in your favourite text editor. Look for the line that has the following:

// static const char g_MessageBoxFontLatin1[] = "-*-*-medium-r-normal--0-120-*-*-p-0-iso8859-1";

Let’s uncomment that code, by removing the // at the beginning. I’m going to change it to the following (more information on this can be found by searching for the X11 Protocol when it comes to fonts):

static const char g_MessageBoxFontLatin1[] = "-*-*-bold-r-normal--0-280-*-*-p-60-iso8859-1";

What I’ve done is increase it’s size and changed it to bold. But, to make it take effect we will need to uncomment the lines following it. It should then look like:

XFontStruct *font_struct = X11_XLoadQueryFont(dpy, g_MessageBoxFontLatin1);
if (font_struct)
gcflags |= GCFont;
ctx_vals.font = font_struct->fid;

Next, I’m going to change the font color to magenta, as that is the commonly used color besides green for framerate counters. Scroll down a bit further and you should come along these two lines.

ctx_vals.foreground = 0xff0000;
ctx_vals.background = 0x000000;

I’m only going to change the foreground color, so this is what it now looks like:

ctx_vals.foreground = 0xff00ff;
ctx_vals.background = 0x000000;

On to the last part, I want to adjust the position of the text since we’ve resized it to a greater size. Scroll a bit further down, and you should come across the line:

X11_XDrawString(dpy, drawable, glinfo->gc, 10, 20, s_frameinfo.text, (int)strlen(s_frameinfo.text));

This is what it should look like after setting the new position. Note that 20 is the x position on the screen, and 60 is the y position.

X11_XDrawString(dpy, drawable, glinfo->gc, 20, 60, s_frameinfo.text, (int)strlen(s_frameinfo.text));

Lastly, I’m going to remove that unnecessary information appended at the back of the output. You will need to scroll up for this one (or use Ctrl-F and search).

"%.2f fps frames:%u time:%.2fms min:%.2fms max:%.2fms",

Now, make it look like this:

"%.2f fps"

That’s it. Save it and close it. We can now recompile voglperf. CD your Terminal into your voglperf folder. Let’s cleanup first before compiling by running:

make clean

Alright, compile voglperf like normal. More details here for compiling. Running voglperf should now yield a cool fps counter like this:

A fullscreen image of it here. We’re all done and set. This tutorial should work on any Ubuntu version, but I’ve only tested it on 14.04, 14.10 and 15.04. I hope you found this tutorial useful or helpful in one way or another 😀

Gamemaker and making Children objects run their Event code and their Parent’s Event code

March 3, 2015

Slowly as I move forward with my Gamemaker project, I’ve learned new things along the way. One such thing I’ve learned is that when a Child object makes its own Event, it will override the Parent’s Event code. Sounds like pretty standard procedure, but what happens when you need the Parent’s Event code to run as well?

Let’s say, that there’s a Parent object that never gets instantiated. This Parent object’s sole purpose is to provide code to it’s children for managing mouse over events. Why place this code in the Parent object? We want to remove redundancy. Instead of manually calling this script in all the Children objects, let’s just call it in the Parent object so that all Children objects get it automatically. This Parent object’s code runs in the Step Event. Great, so all Children associated with this Parent object now have that Step Event as well.

Except, the Children objects require other code unique to their instances to run in the Step Event as well. If you’ve gone ahead and added code to the Child object’s Step event, you’ll find that it’s missing functionality when running. Specifically, the Parent’s Step Event code never gets run.

You need both the Parent’s Event code to run, and the Child’s Event code to run. The solution is pretty simple in GameMaker through GML. Just add event_inherited() inside the Child object, and do this before calling the Child’s Event code and you should be golden.

In the above pictures, the Child object will first run the Parent’s Step Event code, and only then will it move onto it’s own Step Event code (which is calling a script in this case). There you go, we have bypassed the Child object’s ability to override the Parent object’s Event code.

Turning a laptop into a desktop

January 21, 2015

Alright, so this post is going to be quite long. Basically, what I’ve been doing the past 4 days is to migrate the internals of a HP Envy 17 2001tx laptop into a desktop casing (AVF).

Why am I going down this path? The HP Envy 17 has to be the worst engineered laptop in the history of HP (it even had class action lawsuits filed against it). The bloody thing would overheat to 80 degrees celsius when on idle after a couple of minutes.

Please take note, this was just a very quick DIY. There was no real planning involved except “what size casing will we need to fit the motherboard in?”.

Instead of throwing it out, I attempted to breathe new life into it. My dad was very eager to use his power tools as well, so we cooperated in the process.

The locations of the screws on the back:

After unscrewing the screws, it’s time to remove the harddrives. They are connected via a single SATA cable, both of differing lengths.

The sata cable has a black plastic piece on top of it, which is meant to be pulled. It is connected to the motherboard in a downwards motion.

Now it’s time to unplug the Wifi module and remove it.

Notice the two small cables have a numbering on them. It’s important to reconnect them later with the right numbers (thankfully the module has the numbers written on it in white).

The cables are removed by pulling them upwards. I recommend doing it gently, and with the aid of a screwdriver or flathead to slowly remove them from their positions.

Now that they are removed, you’ll need to unscrew the 2 black screws that connect it to the motherboard. After unscrewing, you’ll notice it rises. That’s ok and normal.

The Wi-Fi module removed completely will look like the above.

Now, it’s time to unscrew the hidden screws beneath the rubber stamp legs. For these, use a flathead or toothpick-like tool to pry them from the body. They are connected to the body via glue.

Finally, the bottom should look like the following with everything unscrewed and removed (no need to remove the RAM).

Now, moving on to the top part, we first need to remove the keyboard.

To remove the keyboard, all screws underneath need to be removed. If it still feels like it’s being held strongly, then there might be a screw not yet removed. The idea behind removing the keyboard is to push at the spaces on the top part, until the entire top is free, and to pull towards the screen. This is because the bottom has metal potrusions to hold it in place ( I just pulled it from all directions, since it wasn’t going back into the laptop body).

There will be four cables to remove before pulling off the top cover.

The first two will be the keyboard and touchpad connectors, as seen below:

These parts are pretty easy to remove. just slowly unclip the top black or white plastic holder, and slide the cable out via the blue plastic meant for fingers.

You’ll want to remove the other keyboard connector, it’s a small orange cable to the top right. You’ll also notice there was one screw in the center that holds the keyboard in.

Don’t forget to remove the power switch cable connector on the top left. It’s a small blue-ish cable.

Now, we are ready to start peeling off the top cover. You’ll need something to get between the crevices to pull it off, but once you get one clip to unhook it should be straight forward.

Now, it’s time to remove the rest of the power cables and connectors so we can pull out the main motherboard unit. There’s also two additional screws.

First, remove the card reader cable connector.

Then, unscrew the BD-Rom drive and pull it to the right to dislodge it from the motherboard (there’s no cables for this).

Unplug the speakers/LED power.

The monitor is attached to the motherboard via a single cable that branches out into two connectors.

You’ll want to pull the white cable branch to the left to remove it from its place.

The other branch just needs to be pulled upwards to disconnect it.

Lastly, remove the power cable that connects the power brick to the motherboard. It’s this small white 8-pin cable.

Now, the unit is removable from the body.

The mess we’ve made so far, before we start cleaning the parts and moving them into a new house.

Now, onto the cleaning! The most important part to clean is the cooler. This unit connects to the CPU and GPU in one go.

I went with this thermal paste (Cooler Master E1 IC ESSENTIAL Thermal compound) as it was affordable, and it came with grease which really helped with the cleaning process.

I forgot to take pictures of the unscrewing and cleaning, but basically you’ll want to unscrew 7 screws (4 for the CPU, 3 for the GPU). After which, remove all previous grey/white thermal compound. You’ll know they did a shoddy job, if the thermal paste isn’t only on the shiny parts, but also on the green sections around the metal encasings (it shouldn’t be that way).

All spick and span, you’ll want it to be shiny enough that it looks like a mirror.

Don’t forget to clean the bottom parts of the copper cooler as well! Don’t leave any of the old thermal residue there.

Unscrewing the fan and it showcases that HP didn’t actually test this against massive dust build up. They didn’t even have the courtesy to make it easy to clean for end-users.

So, now that it’s all cleaned let’s put a single drop of thermal compound on each die. The CPU die cover will require a slightly larger drop, but basically you want to make sure it won’t leak over to the edges. Only apply the thermal compound to the onboard CPU and GPU, no need to put any on the cooler. Now, put the cooler back on and screw it in.

Alright! Cleaning is done, let’s get that new fang-dangled case ready for a new tenant.

Why’d I go with this case? As you’ll see later on, the area for cable management allowed me to do some pretty unorthodox installing of this mobo into it. REMEMBER! It’s a laptop, so both sides of the motherboard has connectors. You’ll need to figure out how to make sure both sides get the cables that they need connected.

We used a black & decker drill to make the holes in the casing, so that I could screw the motherboard in. 2 was more than sufficient (it’s a light motherboard).

One thing became apparent, we would need the power switch from the laptop to be able to turn this unit on. So, it was time to saw the piece off.

At this point, it had been over 12 hours on working with this. My mind was starting to wander, and I’d forget to take pictures often. Apologies in advance for missing information.

We were able to fit the motherboard in nicely, and the two harddrives fit as well. One had to be screwed onto the casing’s motherboard wall section (the SATA cable connector was too short). The other fit snugly in the actual HDD compartment.

After connecting the power switch, we’re basically holding it on the back of the case via sticky tape. Later on we’ll actually make a hole in the back casing cover and slip this guy into it to look slightly less hideous.

For the monitor, since the laptop monitor was still good, we detached it from the laptop body and drilled holes into the sides of the casing to get it to fit.

The Wi-Fi dongle is in this monitor, so you’ll need it anyway to get the in-built Wi-Fi working.

Plugging in the power, we ran it to see if it would start. Lo and behold! It works!

The Windows install was corrupted though, and the HDD’s RAID mode was the cause. So I had to disable that.

This is where the power brick connects to. I forgot to take pictures of the process, but it’s pretty straight forward. The white 8-pin power connector stretches out over a cable length and then connects directly to the HP power brick.

After having Windows 7 poop it’s pants, I needed to confirm if the hardware was actually faulty. Ubuntu 14.10 64bit to the rescue!

My younger brother then tested it for a couple of hours, and confirmed no shutdowns due to overheating, no RAM issues (hanging, screen corruption). The HDDs seemed to be fine as well, as the SMART test inside Ubuntu showed them to be fully operational.

That was the end of day 1! So, what took the other 3 days time? Installing Windows 7. I’ll give you a hint. Don’t use the original Windows 7 ISO, instead use a SP1 version. On top of that, if you find that using a disc or USB drive isn’t working, then you’ll have to go through the hell I did.

I extracted the 7 SP1 ISO into a folder, used Windows Updates Downloader to slipstream the DEC 2014 updates into the ISO. ( I followed this guide ) Then, I went to the HP driver page and downloaded the necessary storage, wifi, and USB drivers. I used NTLite to slipstream those drivers into that same ISO.

After which, I just simply copied it (the extracted version) into a pendrive, plugged it into the USB2.0 slot, and finally Windows 7 would install. Pretty difficult, compared to installing Ubuntu 14.10. I just plugged my Ubuntu USB into any of the USB slots, booted it up and installed it. (HP Envy 17 wasn’t built to run Ubuntu, yet here we are)

If you’re looking for NTLite, get it here:

If you’re looking for Windows Updates Downloader, get it here:

If you’re looking for Ubuntu (it’s free), get it here:

So, was this a professional DIY? Not by any means. In fact, this was probably the most adventurous DIY project I’ve ever done. What matters though, is that we now have a working computer, and it’s able to operate at it’s full power.

Compiling VoglPerf on Ubuntu 14.10

January 16, 2015

Well, whilst taking a short break from designing my inventory, weapon, and attribute systems for my little game, I’ve been doing some game benchmark videos pitting Windows against Ubuntu.

In this quest, it usually helps to have a suitable FPS OSD. On Windows, most often it will be MSI Afterburner or FRAPS. On Ubuntu, I have the choice of GLXOSD (preferred), Valve’s VoglPerf and Steam’s own Beta FPS counter.

The issue today is that I can’t seem to get GLXOSD to cleanly inject itself into Dota 2 for some tasty benchmarking. Thus, I have to resort to using VoglPerf, which is really aimed at developers who want to pinpoint where in their game performance is lost, and why. (Take note that VoglPerf only works with games that are on Steam)

I just need the FPS counter.

That said, after downloading VoglPerf from Github here, we can get started:

Please note that this guide will work on Ubuntu 14.04 and 15.04 as well. I’ve tested it myself.

I usually just extract it to my desktop, so that’s where all my terminals will point to later when compiling VoglPerf.

First off, you’ll need a couple of dependencies. I recommend installing them one-by-one to see if any issues arise or Ubuntu is unable to find them. To install the following, just simply open a terminal and enter them. Let’s get started on how to compile Voglperf on Ubuntu.


If you can’t be bothered with entering the following one-by-one, and want to get it over with quickly, then just copy this into a terminal, hit Enter, enter your password, and hit y to agree. It should install all required dependencies in one go:

sudo apt-get install build-essential cmake mesa-common-dev libc6-dev-i386 gcc-4.9-multilib g++-4.9-multilib lib32ncurses5-dev


It’s always best to start with the essentials, and so I usually do this:

sudo apt-get install build-essential

Now, for the required dependencies:

sudo apt-get install cmake

If you get the error regarding

fatal error: GL/glx.h: No such file or directory #include <GL/glx.h>

then you need mesa-common-dev:

sudo apt-get install mesa-common-dev

If you get the error regarding

fatal error: sys/cdefs.h: No such file or directory #include <sys/cdefs.h>

then you need libc6-dev-i386:

sudo apt-get install libc6-dev-i386

If you get the error regarding

fatal error: bits/c++config.h: No such file or directory #include <bits/c++config.h

then you need gcc-4.9-multilib and g++-4.9-multilib:

sudo apt-get install gcc-4.9-multilib g++-4.9-multilib

Moving on, it also looks like you’ll need the following if you’re compiling on a 64bit system and you’re trying to compile VoglPerf64 (although most games on Steam are 32bit binaries, so I believe the most useful version is VoglPerf32 regardless of your system’s architecture):

sudo apt-get install lib32ncurses5-dev

You’ll know if you need the above, when trying to compile and you get the following error:

Linking CXX executable /home/ismail/Desktop/voglperf-0.2/bin/voglperfrun64
/usr/bin/ld: cannot find -ltinfo
collect2: error: ld returned 1 exit status


Now that you have the required dependencies installed, let’s actually compile VoglPerf so we can use it. Open a new terminal, and CD to your VoglPerf folder. For me that would be:

cd '/home/ismail/Desktop/voglperf-0.2'

Protip: After typing cd and hitting the space bar, simply drag and drop your Voglperf folder into the terminal and it will autocomplete the entire directory path to the folder. Very neat, and seriously saves time.

Once I’m in, I have the choice of doing one of three things. I can either compile both the 32bit version and 64bit version, or I can compile each one one-by-one. I chose to simply compile only the 64bit one so that I may trace any problems easily. So, to compile both, all you would do is:


If you’re looking to just compile the 32bit version, then do the following in the same terminal:

make voglperf32

For the 64bit version, do the following in the same terminal:

make voglperf64

If you compiled successfully, it should look something like the following:

Now, please take note that after you’ve compiled a build, that folder will be in the voglperf folder. You’re building to the same folder you’re taking the source from. What this means is that, if you want to start fresh, or have made changes to the code, I recommend deleting the build folder (aptly named build32 for the 32bit version, and build64 for the 64bit version) before compiling a new build.

After all that compiling, you can find what you’ve built in the bin folder inside the voglperf folder. After all, what you’ll be running is the executable (which should be voglperfrun32 or voglperfrun64). You should have one of either of these, or both like I do:

Also, if you feel uncomfortable using the terminal, for the most part you can make use of the Ubuntu Software Center to install the dependencies. For example:

Please note, that while my Ubuntu system was a fresh install, it may be possible that I’ve installed other required libraries or dependencies previously that I have forgotten about or unknowingly done so. If you find any dependencies not listed here, please feel free to comment and add them so that others may know what they are and how to resolve them.

Game Inventory

January 11, 2015

Well, since my last post, I went ahead and purchased the Ubuntu exporter for Game Maker. Now, I’m only waiting on the Steam keys to be distributed to me. Using the IDE outside of Steam is nice, but I don’t get that satisfaction of looking at the hours I’ve logged. Plus, Game Maker’s achievements are pretty neat too.

For the past week, I’ve been going through some basic inventory ideas. I’ve been trying to figure out everything from how to draw the inventory to the screen, to how to appropriately store and manage items in the inventory. Check out my initial ugly sketch, which I’m now continuing from as a base. Start with laziness, and proceed to professionalism.

I’ll admit, this is the first time I’m making use of a 2D array outside of a University project. When storing the objects picked up by the player in this global array, I store several pieces of information. Namely the following, albeit this will likely change in time, but for now does the trick:

I’ve realised that planning ahead is pretty important. Some things I needed to think of before getting down to code was:

1. The inventory needs to be able to receive items and delete items

2. Upon deleting items, instantiate that object back into the world.

3. Upon picking up item, select the correct sub-image with item from world.

4. Upon picking up item, instance_destroy() of the object in the world.

5. Does player simply colliding with object act as a pickup scenario, or should there be additional player input upon collision with item?

6. Upon mouse over, item slots in inventory need to be highlighted.

7. Upon mouse over, item descriptions need to be displayed.

8. Will there be drag and drop functionality? Or simply keyboard/mouse clicks to commence inventory actions like equip and drop?

After going through the above, I’ve covered how to do 1, 3, 4 and 6. I’m still going over how to get around to the others, but it should be trivial once I start going through the workflow process on paper (scribbling really helps me figure things out). The ability to have all the items that can be picked up as a child of a single object, and only test the player’s collision with this parent object really simplifies the logic.

You can see the implementation from art asset on the right, to implemented in code on the left in the following image (it’ll only appear if “I” has been pressed, and it also has highlightable inventory slots).

On top of coding though, since I’m alone in this, I also have to design my own art assets. As such, I’ve been going over some of the items that can be picked up. I’m currently in the process of creating higher resolution versions of the health items.

On an ending note, there’s been an interesting project that seems to have popped up in my newsfeed recently. It’s name is Enigma-Dev. Apparently, you can code and compile GML through this IDE, and the best part is that it’s multi-platform, open-source and free. However, as with most open projects, it’s still quite buggy(from what I’ve read). I’ll have to get around to trying it sooner or later. It could mean me continuing my development in Ubuntu exclusively, which would be cool.