Thomas Sampson


Leave a comment

Success @ Games Republic 2012

Today’s Games Republic 2012 event, held at the University of Bradford, was incredibly rewarding for our team. The day was spent exhibiting our PSP Minis title BounceBack (along with our SteelEngine PSP game engine) to both students and industry professionals, and of course, the judges! We received some excellent feedback and were very humbled to be awarded the following three prizes…

 1st Prize – Best Team – Awarded by Rockstar Leeds
1st Prize – Best Game Technology – Awarded by Four Door Lemon
1st Prize – Best Game Design – Awarded by Sumo Digital

Many Photos were also taken at the event. BounceBack will be available for download on the Playstation Store for both PSP and Playstation 3, Summer 2012.


Leave a comment

Visual Studio ‘Find & Replace’ with Regex Groups

TIL; When using Visual Studio ‘Find & Replace’, regex match groups used within the search term, can be referenced numerically in the replacement term using the $ symbol. The example below adds spaces between function parameters:

Test String

SomeFunctionCall(param1,param2,param3);

Search term

,(\w)

Replacement term

, $1

Result

SomeFunctionCall(param1, param2, param3);


Leave a comment

Creating a new Windows Service

Sometimes it’s enough to add a program or script to the startup folder or scheduled a boot-time task, however if you need to setup a fully fledged Windows Service, the freeware NSSM (Non-Sucking Service Manager) tool can be used to quickly and easily install or remove Windows Services from the command line.

Creating a new Windows Service
The following command will pop-up a nice UI for you to select which program/script you want to run and allow you to tweak additional settings such as Automatic/Manual startup etc:

nssm install "YourNewServiceName"

Removing a Windows Service
The following command permanently un-registers and removes a Windows Service by name:

nssm remove "YourServiceName"


Leave a comment

Finding variable assignments

When searching through an entire codebase for a variable it is often useful to limit the search results to those instances where the variables is assigned a new value (or perhaps when the variable is used IN an assignment). This can be achieved with the following regular expressions…

Find assignments

MyVariableName[ \t\r\n\v\f]*=[^=]

Find usage in an assignment

=[^=][ \t\r\n\v\f]*MyVariableName


Leave a comment

Working with LESS

What?

After having around 20 minutes exposure to LESS (CSS pre-processor) I’ve picked up the following quick tips:

How it works

LESS is a language/syntax for writing CSS which grants you more freedom and less repetition when defining and organising CSS styles with features such as variables, imports and loops. To be of any use, LESS files are translated into vanilla CSS for consumption in the browser (this can be done client-side at runtime, or baked out offline).

Writing LESS

Looks fairly simple, the LESS file I worked with (albeit for 5 minutes) bared a close resemblance to regular CSS, with some syntactic sugar sprinked here and there for good measure. Full specification can be found here:

Using LESS

Although it appears that some nifty javascript can be used to translate your LESS code to CSS at runtime (probably preferable to reduce turnaround times during development), in my scenario I needed to bake out minified css files offline. This can be achieved as follows:

  1. Install Node.JS
  2. Open a Node.JS command shell
  3. Install the less nodejs package:
    npm install -g less
  4. Compile your LESS file, redirecting output to destination .css file:
    lessc styles.less -x > styles.css
  5. The -x flag can be removed if you do not require the CSS output to be minified