Author: Alex

  • Does calling sqrtf always result in a single asm instruction?

    I was recently running some performance benchmarks across different platforms to understand the cost of some simple mathematic functions such as sqrtf and quickly noticed, under certain circumstances compilers such as MSVC, Clang and GCC by default will not generate a single x86-64 sqrtss instruction, there is a little more to it… I think discovering…

  • Visualising SRGB & Gamma Correction

    Introduction There are plenty of fantastic websites out there which explain the technicalities of Gamma Correction and SRGB colour correction so won’t try to do the same here. Instead this post is to show visually the effects of SRGB/Gamma Correction in image composition and how blending colours in SRGB space rather than linear space is…

  • Redirect all stdout/stderr to console

    If your Windows executable is using /SUBSYSTEM:WINDOWS rather than /SUBSYSTEM:CONSOLE, something you will have noticed your output messages to stdout (printf, std::cout etc) will be missing. You can easily solve this however by spawning your own Windows console window and redirecting stdout to your new console. The code below will redirect all stdout & stderr…

  • Increase Windows Console Line Limit

    If you’re in a situation where your console output text is being truncated because so many lines have been output, you may want to increase the limit. Increase Windows Console Text Limit With a console window already spawned, right click the top and go to properties: Increase the Screen Buffer Size Height. You will be…

  • Faster Compiling: Visual Studio Unity (Jumbo) Builds

    Unity/Jumbo builds are a way of speeding up C/C++ compilation by compiling multiple c/cpp files as a single object file. Speed improvements can come from not having to re-parse and compile shared headers. Even in projects that use pre-compiled headers, there is an overhead of processing the pre-compiled header which can be avoided with Unity/Jumbo…

  • Programming a Digital Potentiometer (MCP4131) With Raspberry Pi & WiringPi

    Github Link: https://github.com/comeradealexi/MCP4131 Datasheet One of the most important parts of programming an MCP is studying the datasheet provided with it. For the MCP4131, you can download it here: https://www.microchip.com/en-us/product/MCP4131 It will provide everything you need to know about the chip. One of the most basic pieces of information we’ll need to start with is…

  • Connecting to Raspberry Pi direct to PC via Ethernet

    This article will show you how to connect directly to a Raspberry Pi by connecting an ethernet cable directly to your PC without needing to do any setup on the Raspberry Pi itself. This means you don’t need to plug a keyboard and monitor into your Pi to connect to it. Requirements: PC with ethernet…

  • C++ unique/shared ptr custom deleters

    I’ve recently found the need for a custom deleter function attached to smart pointers in C++ and I found there are a number of different ways to implement this. I’ll touch on the advantages/disadvantages of the different ways to use custom deleters and the difference between unique and shared ptr. std::unique_ptr: The type of the…

  • Raspberry Pi/C++ Log Class

    With having written many Raspberry Pi programs now, it made sense for me to create a little Log class which I’ve used in all my projects now which I feel is really quite nice to use and intuitive. In this post I’ll run through a few of its features. Source Code: https://github.com/comeradealexi/RaspberryPiShared One of the features…

  • Raspberry Pi – Home Monitoring System

    Using multiple Raspberry Pis, I’ve put together a small system to monitor my home when away. In order to maintain my own privacy, I’ve set up a system which detects when myself or my partner is home by periodically pinging our phones IP addresses on the local WiFi network and disables recording/monitoring when either of…

  • Raspberry Pi – Web Controlled Media Player

    Having a spare TV and a hard drive full of videos, I wanted to make it so I could easily watch videos from a hard drive on the TV and control playback and video choice entirely from my phone, this is what I set out to achieve with this project. The entire project can be…

  • lighttpd – Changing default user (Raspberry Pi)

    After following the great tutorial here (http://www.penguintutor.com/linux/light-webserver) for getting lighttpd setup and running on my Raspberry Pi, I wanted to change the default user the service ran as so I could run commands from php scripts requiring more permissions. The part I got stuck on was that on a reboot, the folder in /var/run/lighttpd would…

  • std::mutex crash on initial lock (Interesting thread releated bug with fix included!)

    Have been writing some code to test out creating worker threads in C++ and came across an interesting bug where my program would crash on the first lock of the mutex. Thought it was an interesting little problem to solve. Hint: Crash isn’t necessarily 100%… #include <stdio.h> #include <thread> #include <vector> #include <mutex> #include <atomic>…

  • Guide: Sending an SMS with Raspberry Pi/Linux – Huawei E303 Mobile Dongle

    For this guide I’ll be showing how I got my Huawei E303 Mobile Dongle to with with Gammu on the Raspberry Pi to send and receive SMS messages. This is the specific Huawei E303 I used. When I first started out, I was hoping it would just a be a case of plugging in the…

  • Using Raspberry Pi to test Power Supply Reliability

    I recently came across a problem with a friend whose computer was having strange issues of switching off entirely at random. We contacted the power supply support channels who suggested it sounded as if the surge protection on the motherboard was faulty, which I agreed with since in all my experience so far, I’ve never…

  • Problems with VisualGDB and Raspberry Pi 2

    I followed the tutorial for setting up VisualGDB for a Raspberry Pi from this link: VisualGDB and below are some issues that I ran into and how I fixed them. Hope it helps! Compile Error: “bits/c++config.h: No such file or directory”: With this error, all you need to do is add the following include path to…

  • [C#] HttpWebRequest not sending Cookies on Windows Phone

    Had a similar problem to Jeroen Swart to do with Cookies in Windows Phone as he mentioned in his blog post here. Basically identical C# code to make a HttpWebRequest with a few cookies would work in a simple desktop app but no cookies would be sent at all in Windows Phone. My code to…

  • Steam Live gets a huge update.

    Steam Live has received yet another huge update, this time adding some great new features and fixing some of those other little niggles! It’s an application that has been around for a while now and after a long stream of constant updates and improvements, it is bar far the best Steam Client for Windows Phone…

  • C#: Class Member variable called ‘type’ causes weird compile issues caused by AVAST Antivirus.

    Problem: Try and use this class in any C# project and it won’t work, it will give errors after compiling that it can’t copy the exe/dll with the following errors codes (warning MSB3026: and error MSB3027: and error MSB3021:) Renaming the ‘type’ member variable to anything else causes it to compile and run perfectly. I tested this…

  • Windows Phone C#: “Layout cycle detected. Layout could not complete.” on LongListSelector Fix

    Came across a very weird problem today that has occurred on my application Steam Live which I’ve never come across before… On a certain Steam Profile I’d get a crash with the following message: “Layout cycle detected.  Layout could not complete.” After a lot of searching, confusion and everything else I’ve managed to find a…

  • Windows Phone 8.1 DirectX Sample Landscape mode broken / rotation doesn’t work.

    The Problem: When the phone is in landscape mode, the rendered area isn’t rotated on screen! As you can see, the image on the right is when it is in portrait mode, the one below is when in landscape. The problem is caused by the following code in DeviceResources.cpp: Since the window size being created is…

  • C++ Controller Input Class

    Something I’ve always enjoyed programming is input via a controller, I’d dabbled with Microsoft’s XINPUT classes for the Xbox 360 controller before and I found it really interesting so I decided to put together a collection of classes which would allow detection of common input scenarios for video games. As it currently stands, the specific detections…

  • Bringing Side Switcher to Unreal Engine 4. (WORK IN PROGRESS OCTOBER 2014)

    In order to further my C++ skills and get started with the brand new Unreal Engine 4, I decided it would be a great task to convert my previous game Side Switcher from UE3. I have currently replicated the entire input, movement and camera control into the game, without any level design as of yet.…

  • PHP Programming CT2014.co.uk

    As part of my degree at Bournemouth University, part of the final year project was to exhibit at the Festival of Design & Innovation (FODI) where we can showcase ourselves and our final year projects. With FODI came the need for a website in which each pupil on Creative Technology could upload details about their…

  • Side Switcher – Full game using UDK, UnrealScript + ActionScript

    As part of the ‘Modelling & Game Design’ unit at Bournemouth University, I was tasked with creating a full game using the Unreal Development Kit. Having only ever used UDK for map design and some very simple Kismet visual scripting, I was eager to get to grips with this powerful engine as a tool to…

  • COMMAND THAT TANK – 3D XNA GAME (C#, PHP, HLSL)

    ‘COMMAND THAT TANK’  is a game which puts your tank commanding skills to the test to see whether you are not only the best tank commander in your country, but the entire world. With Command That Tank you tank control of either a powerful APC (Armoured Personnel Carrier) or a ferocious WW2 Tiger Tank in…

  • Getting to grips with Unity (C#)

    After finishing my course at Bournemouth University, I wanted to invest my free time into improving my programming and game development skills. I decided that since majority of my course at University had focused on the Unreal Development Kit, it would be cool to try out Unity properly and see how it compares. I’ve done…

  • CallofDutyMapPacks.com

    When I first started doing work as a creative writer for certain websites around the web I started to learn the basics of how WordPress worked more and more and the potential to make some money from a blog / website if I set one up myself. I knew I wanted to start a blog…

  • Final Year Project Bournemouth University

    Abstract / Introduction: With the video games industry currently larger than it ever has been before, just creating a game and releasing it to the world is just the beginning of its lifecycle. Analytics has exploded in the games industry recently and is now regarded as one of the most important aspects of game design.…

  • Beginning Windows Store 8.1 Development: Upgrading Starcraft II Profiler (C#, XAML, PHP)

    For my final year project at University I had decided that I would be developing a Windows 8 application, something I, at the time had no experience in. Over the 2013 Christmas break I decided I would create a Windows 8 application in order to understand the basics and fundamentals of the development and just…

  • Remastering Call of Duty Quiz

    Being my most popular application to date, Call of Duty Quiz was one of the first applications I ever made for the Windows Phone and since creating it my programming skills have come a long way. I felt it was time to re-create the popular application with a visual overhaul and new questions alongside the…

  • Google Analytics Experience

    Having run multiple websites for a number of years now, Google Analytics has been an extremely important part of managing and running the sites. I’ve used the service provided by Google to analyse a vast array of different data in order to make for a better user experience and improve website SEO plus SERP. In…

  • StarCraft II Profiler

    Latest and Greatest app. Consolidates and builds upon all previous Windows Phone knowledge, having spent months creating previous applications as I was going through large learning curves, I was able to create StarCraft II Profiler in less than one week. SC2 Profiler uses API’s provided by Blizzard Entertainment in order to fetch data for specific…

  • First Android Development (Eclipse, Java, XML)

    In order to broaden my skill base and allow my applications to reach a larger audience, I decided to finally begin development on the Android platform. After years of solely developing for Windows Phone it was a brand new experience to being developing for an entirely different platform. While there are features which are amazingly…

  • Steam Live Tile (Windows Phone)

    After completing my Weather Phone 8 application I had grasped some very complex skills within the Windows Phone operating system as well as PHP, upon realising there was not application in the marketplace which would create a Live Tile out of Steam profiles I began work on Steam Live Tile. Expanding on my knowledge of…

  • Or Die Trying… (Complex XNA Game)

    For an assignment at university, we were required to form a group and begin the development of a game, based on a clients brief. Upon assigning the programming roles to myself and another member of the team, we worked extensively together to create something truly special. From the start I constructed the foundation for the…

  • Tribal Wars (Physics Game)

    A recent assignment from Bournemouth University required me to form a group and construct a game which demonstrated Newton’s three laws of motion. Once a group was formed it was decided that I would understake all of the programming on the task while my class mate worked on all the art and audio. We ended…

  • FL Studios

    Check out the embedded SoundCloud songs below. They can all also be found at: http://soundcloud.com/comeradealexi My latest ventures: My initial ventures:

  • Top-Ten.TV

    Top-Ten.TV is a project I am currently working on with my father. It is a website about top ten lists of tv shows such as the best characters, episodes or moments etc. Recently I have been working with an experienced writer from the USA as well as undertaking rigerious SEO techniques in order to maximise…

  • Spaceman & Slime: C# + XNA

    Spaceman & Slime is a game I created for one of my assignments at Bournemouth University. The game is a re-skinned version of the classic, tactical board game Hounds and Hares built using C# and XNA for the Windows Phone OS. Having used XNA and C# extensively before I was keen to finally put all…