Categories
Blog

Oculus-book-gate?

Is it safe to come out yet? So the news came out yesterday that Facebook bought Oculus, the company behind the Oculus Rift virtual reality headset, and everyone went crazy. There were demands of refunds from the Kickstarter, and a few well known developers publicly distanced themselves from Oculus.
For some reason, a lot of people took the news pretty badly, and I’m still trying to figure out why. So far, I’ve seen nothing from Oculus which suggest the buyout will change their plans, and they’ve even stated that it won’t. In fact, the more I think about it, the more I think it’s what the Rift needed to have any kind of chance of survival.

Categories
Blog

Lottie Dexter on Newsnight

This post was originally a Facebook post in response to the following article and the appearance of Lottie Dexter, the director of the Government’s Year of Code initiative, on BBC’s Newsnight. The clip can be viewed on this website: http://politicalscrapbook.net/2014/02/tory-boss-of-government-coding-education-initiative-cant-code-lottie-dexter/, and the page on the government initiative is here: https://www.gov.uk/government/news/year-of-code-and-500000-fund-to-inspire-future-tech-experts-launched.
I’m going to play devil’s advocate here: I don’t see this as a major issue. Firstly, she doesn’t know how to code, but she’s going to go through the process of learning, so she’ll have first hand experience of learning modern coding standards and technologies. Hopefully the process will be similar to, or a replica of, how they intend to teach it in schools, allowing the government to see what works and what doesn’t. Arguably, this process should have happened prior to creating the curriculum, but was obviously rushed through to get it out before election time.

Categories
Blog

5th Anniversary

So GoGo-Robot will officially be 5 years old in April this year, so I thought it was a good time to reflect on my past years in the games industry, give an update on what’s been happening with both me and the company and what’s the direction for the future. I’ll point out some helpful tips along the way that I’ve learned and will hopefully be of use to someone. I guess this post is a bit longer than I’d planned, but I enjoyed writing it, so I hope you enjoy reading it. So without further ado, let’s take a look at…

Categories
Blog

Memory Management – Part 3

So I finally have a little bit of time after the Christmas rush to finish off our 3 part post on memory management (see Part 1 and Part 2), by looking at garbage collection. So let’s dive in…

Garbage collection is a feature available to a number of programming languages, most notably .NET languages (e.g. C#), Java and Objective-C (though not currently available on iOS). Basically, garbage collection is kind of like, well, real life garbage collection. When you’re finished with something, you discard it, and at some point in the future everything you’ve discarded will get cleaned up by someone else (i.e. The garbage collector). Sounds like a perfect system, right? Just create what you want, discard it when you’re done and not worry about memory management. Unfortunately, a lot of people (myself included) soon come across the pitfalls of this approach, but with a little knowledge you can play nice with the garbage collector. Firstly, we’ll take a look at how garbage collectors generally work, then at some of the problems we can find ourselves in, and finally the solutions…

Categories
Blog

Memory Management – Part 2

In part one, we looked at some simple memory management in C, and why we need to be careful with what we do with our memory. Now, we’ll take a look at some more advanced topics, including garbage collectors, reference counting and automatic memory management.

Categories
Blog

Memory Management – Part 1

I was originally going to post a piece on iOS memory management, but it turned into a much larger piece on memory manangement in general. So, here’s the first part – other parts will follow later…

Categories
Blog

XNA Skinned Model Animations

The Skinned Model sample from the App Hub education catalogue is great for getting animated characters into your game, but there’s a bit of a flaw with the export process. The problem is, when you export your character from 3DS Max (and possibly other modelling programs), all you get is one animation, named ‘Take 001’. Wouldn’t it be nice if we could define different animations for different parts of the animation timeline? Well, we’re going to do just that :). As an added bonus, we’ll also be adding in events, so you can be notified when certain parts of your animation are hit.

Categories
Blog

Texture Atlas (Sprite Sheet) Generator

UPDATE: A few people have asked, so we’ve released the source code for the tool in the download links below. We’re unable to make any modifications to it, as we’re no longer developing the tool internally, but feel free to modify it for your own needs, and contact us if you need any help with it. Unfortunately, the code isn’t the tidiest code around. Please note that all source and binary code is provided “as is”, without any warranty of any kind. Please see the website usage terms, at the bottom of the page, for more information.

A texture atlas, or sprite sheet, is a single image containing a number of smaller textures or sprites. This is useful as it is more efficient for the graphics card to process (it doesn’t have to keep switching textures when drawing different textures, as it can just use the single texture and sample from different parts of it). It is also faster to load into RAM, as you are only loading in one image, as opposed to several smaller ones, so the loading can be done in one stage.

Categories
Blog

Windows Phone 7 Flashlight (With SOS)

I tried posting this as a comment in reply to this post, but the code got mangled, so I’m posting it here 🙂

            graphics.GraphicsDevice.Clear(
                /* Check for touch panel being pressed */
            TouchPanel.GetState().Count == 0 ?
                /* Touch panel released, so reset the timer. This is stored in the target elapsed time, so we don't have to create any variables :) We also turn off IsFixedTimeStep, so that TargetElapsedTime isn't used. */
                ((((this.IsFixedTimeStep = false) == false) && ((this.TargetElapsedTime = TimeSpan.FromMilliseconds(Math.Max(1.0f, gameTime.TotalGameTime.TotalMilliseconds))) == TimeSpan.Zero)) ? Color.Gray : Color.Gray) :
                /* Touch panel pressed, so do SOS */
                (gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 1 ? Color.White :
                (((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds >= 2) && ((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 3)) ? Color.White :
                (((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds >= 4) && ((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 5)) ? Color.White :
                (((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds >= 7) && ((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 9)) ? Color.White :
                (((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds >= 10) && ((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 12)) ? Color.White :
                (((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds >= 13) && ((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 15)) ? Color.White :
                (((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds >= 17) && ((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 18)) ? Color.White :
                (((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds >= 19) && ((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 20)) ? Color.White :
                (((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds >= 21) && ((gameTime.TotalGameTime - this.TargetElapsedTime).Seconds < 22)) ? Color.White :
                Color.Black);
Categories
Blog

Converting a tile map into geometry

I recently needed to convert a tile map consisting of squares and triangles into chunks of geometry and after trying a couple of different approaches, I eventually settled on one which seems to work. I didn’t come across it anywhere else, so I thought I’d post it here in case anyone else is wanting to do something similar.