Decompiling Sonic Runners

Usually, when you hear about games being decompiled and rebuilt, the games are often decades-old relics, loving and saved from the ravages of time. [MattKC] recently set out to decompile the 2015 game Sonic Runners.

The game was a 2D endless runner released on mobile platforms. Despite getting praise for the gameplay, it received mixed reviews for the pop-up ads and pay-to-play elements. A little over a year later, the game was discontinued. However, the game required a constant online connection, so once the servers were offline, it rendered the over five million downloads unplayable.

A team of developers worked to reverse engineer the server, and with a little bit of binary hacking, the client could be patched to connect to a community-hosted server instead. However, as phones with notched displays came out and suggestions for improvements stacked up, the community realized a new client would bring immense benefits. Compared to many decompilation projects, Sonic Runners was pretty easy as it uses Unity, which means most of the code is in C#. Unfortunately, the build of Unity used by the game is from 2012, meaning many of the tools designed for much later versions of Unity were inoperable.

However, one native code library called UnmanagedProcess was designed to confuse reverse engineering efforts. The library handled AES encryption and communication with the server. Luckily, the library was a later addition, and earlier versions of its functions still lingered in the C# code. Since an open source server already existed, it was trivial to validate the changes. Additionally, all the shaders were in OpenGL Shading Language (GLSL), which meant rewriting them in High-Level Shading Language (HLSL) and checking that they matched the original GLSL when building for Android.

Now the client has new game modes, no ads, and a proper offline mode. The community continues adding new features and refining the game, which is very satisfying. If you’re curious about reverse engineering, [Matthew Alt] can help you get started.

Continue reading “Decompiling Sonic Runners

C# Portable Settings Provider

We live in a world where everything must be portable, ranging from mobile applications to making an application able to run on Linux, Windows and OS X.  Making a C# application to be completely portable across all windows computers is a problem that Microsoft knows about and willingly admits they will not fix. [Mike] from Geek Republic has taken it upon himself to show us how to hack up some code to make your programs portable.  This code is a good push forward for people loving the portability of modern applications. He will admit that bugs may exist so be on the lookout and he would probably appreciate the feedback.  Looking forward to a fully working provider so that .NET applications can be carried wherever people go!

C Sharp Development 101 – Part 2: Toolbox Controls

In this tutorial we are going to start finding out more about the toolbox we utilized in the previous tutorial.  The Controls available in the toolbox are quite extensive and allow users to simplify a variety of everyday tasks such as manually creating and instantiating a textbox on a windows form.  At the end of this tutorial you should be comfortable finding Controls in the Visual Studio Toolbox, alter or produce code to link tools together using event handlers and ultimately get a better sense of Visual Studio, it’s layout and how to easily navigate it.

C Sharp Development 101 – Part 1: Hello World

In this tutorial we are going to get up close with the Visual Studio 2010 environment. We will learn how to make a console application as well as a form to display our hello world applications.  This will give us an opportunity to view 2 types of solutions of the many available in Visual Studio.  We will start making the console application first then progress to the forms application.

First we must  understand the development environment we are going to use.  On the far left side is the toolbox panel.  This panel gives us access to a lot of controls  that can be used by the Windows Forms.  Next is the Solution Explorer that will allow us to navigate the projects and files we are going to create in this Solution.  The Properties panel is directly under my Solution Explorer and will allow us to change properties of controls and of the form we will create later on.  If any of these are not being displayed they can be retrieved from the View menu at the top under Other Windows.  For more information on the Visual Studio IDE visit MSDN and search for the specific questions you are having.

Continue reading “C Sharp Development 101 – Part 1: Hello World”

C Sharp Development 101 – A Tutorial Series

In this tutorial series we are going to look at C# Development using the Visual Studio 2010 Express editions.  This will take you from the basics of installing Visual Studio 2010 Express, to the Object Oriented Programming style associated with C# and other languages, dabble in some database access (Access & SQL Server Express) and finally, design a project that will pull all of our knowledge together into a final solution.