Posts Tagged ‘programming’

QA Specialist in Unity Technologies

Sunday, January 3rd, 2010

For a few months I have been working at Unity Technologies as QA Specialist, handling the publicly submitted bugs reports. I am very proud (even lucky as I have just graduated) of being a part of one of the worlds leading teams in game development.

Our issue tracker, FogBugz, is not feature loaded, but the FogBugz XML API has quite a few possibilities to it.

I am learning Perl to get an easy and versatile tool to work the API with. Once I am on top of that, I will look into how the API can be used to fill in some missing features of FogBugz. Then, in a near future when I have tweaked FogBugz to meet the needs of Unity Technologies, I will put my interests and experience into extending the product itself to make life even more easy for game developers.

Sapling game programmer

Sunday, October 11th, 2009

Back on the blog.

Some 3d doodle guys from the DADIU projects I did have started a small game company called Sapling.

Another programmer and I are going to help them create some code that make their great graphics come to life.

For now we are doing a pilot project called Zumbi-e: a zombie shooter with some RTS/Puzzle elements in it.

Game programmer on Exodroid

Wednesday, April 8th, 2009

While doing my MSc in Medialogy, I took part in two productions at DADIU (Danish Academy for Digital Interactive Entertainment).

My second production was called Exodroid and was made in Unity3D using C# and Visual Studio Express. This production took place in March 2009 while I was writing my essay and master thesis , so these are somewhat interconnected.

As game programmer on this project, I gained experience using C# with Unity3D. Furthermore, I took an active part in developing the design and the production itself.

I participated in the project while writing my master thesis, therefore much of the discussion and conclusion is somewhat related to this project.

Official info and download page at dadiu.dk

Simple C# script to trigger theme music at certain points in the game:

using UnityEngine;
using System.Collections;

public enum ThemeFader
{
FirstToSecond = 0,
SecondToThird = 1
}

// Put this script on the triggerbox that has to change the theme music
public class AudioThemeTrigger : MonoBehaviour
{
// enable these controls in the editor
public float fadeTime = 5.0f;
public ThemeFader themeFader;

private bool triggered = false;
private GameObject player;
private Transform AudioTheme1;
private Transform AudioTheme2;
private Transform AudioTheme3;

void Start()
{
player = GameObject.FindGameObjectWithTag("Player");
AudioTheme1 = Helper.getChildByName(player.transform, "AudioTheme1");
AudioTheme2 = Helper.getChildByName(player.transform, "AudioTheme2");
AudioTheme3 = Helper.getChildByName(player.transform, "AudioTheme3");

switch (themeFader)
{
case ThemeFader.FirstToSecond:
AudioTheme1.transform.audio.volume = 0.7f;
AudioTheme2.transform.audio.volume = 0.0f;
AudioTheme3.transform.audio.volume = 0.0f;
break;
case ThemeFader.SecondToThird:
AudioTheme2.transform.audio.volume = 0.7f;
AudioTheme3.transform.audio.volume = 0.0f;
break;
default:
break;
}
}

void Update()
{
if (triggered)
{
switch (themeFader)
{
case ThemeFader.FirstToSecond:
CrossfadeAudio(AudioTheme1,AudioTheme2);
break;
case ThemeFader.SecondToThird:
CrossfadeAudio(AudioTheme2,AudioTheme3);
break;
default:
break;
}
}
}

private void CrossfadeAudio(Transform t1, Transform t2)
{
if (t1.transform.audio.volume > t1.transform.audio.minVolume)
{
//fade out
t1.transform.audio.volume -= t1.transform.audio.maxVolume * Time.deltaTime / fadeTime;
}
else
{
t1.transform.audio.volume = 0.0f;
t1.transform.audio.Stop();
}
if (!t2.transform.audio.isPlaying)
{
//start the new sound if it is not allready running
t2.transform.audio.Play();

}
if (t2.transform.audio.volume < t2.transform.audio.maxVolume)
{
//fade in
t2.transform.audio.volume += t2.transform.audio.maxVolume * Time.deltaTime / fadeTime;
}
else if (t1.transform.audio.volume <= t1.transform.audio.minVolume) triggered = false;
}

void OnTriggerEnter(Collider collider)
{
if (collider.gameObject.tag == "Player")
{
triggered = true;
}
}
}

A little C# helper for some tedious tasks:

using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;

public static class Helper
{
static AudioClip lastClip;

// Get the first child transform with the speified name
public static Transform getChildByName(Transform transform, string name)
{
for (int i = 0; i < transform.GetChildCount(); i++)
{
if (transform.GetChild(i).name == name) return transform.GetChild(i);
}
throw new Exception("Cound not find child " + name + " in " + transform.name);
}

// Returns a random audio clip from the specified array of AudioClips
public static AudioClip getRandomAudioClip(AudioClip[] clips)
{
if (clips != null)
{
// Create a list with available clips
List<AudioClip> clipsToChoose = new List<AudioClip>(clips);

// Remove the previous clip from the list if it is there
if (lastClip != null)
{
for (int i = 0; i < clipsToChoose.Count; i++)
{
if (clipsToChoose[i].name == lastClip.name)
{
clipsToChoose.RemoveAt(i);
break;
}
}
}

if (clipsToChoose.Count > 0)
{
int randomNb = UnityEngine.Random.Range(0, clipsToChoose.Count);
lastClip = clipsToChoose[randomNb];
return clipsToChoose[randomNb];
}
else throw new Exception("At least one audioclip has to be passed");
}
else
{
throw new Exception("At least one audioclip has to be passed");
}
}

public static float adjustVolumeToDistance(GameObject soundSource, float distanceToZeroVol)
{
GameObject player = GameObject.FindGameObjectWithTag("Player");
//getting distance to camera
float distance = Vector3.Distance(soundSource.transform.position, player.transform.position);
//calculate newVolume
float newVol = 1 - (distance / distanceToZeroVol);
//scale according to maxVolume
newVol *= soundSource.audio.maxVolume;
//make sure volume is positive or zero
if (newVol > 0.0f) soundSource.audio.volume = newVol;
else newVol = 0.0f;
return newVol;
}

public static float adjustVolumeToDistance(GameObject soundSource)
{
return adjustVolumeToDistance(soundSource, 1000.0f);
}

// Sets layer for a given transform and for all its children recursively
public static void setLayer(Transform t, int layer)
{
t.gameObject.layer = layer;
for (int i = 0; i < t.GetChildCount(); i++)
setLayer(t.GetChild(i), layer);
}
}

Dusk of Ninja and Brush

Wednesday, February 11th, 2009

nice graphics, eh :-)In January 2009 I attended Global Game Jam with the game Dusk of Ninja And Brush.

The game was made in Unity3D using C#. My contribution was a little programming, part in the game design and virtually most of the sound design and implementation.

Go check out the game at the Global Game Jam website. There are tons of other experimental games there as well.

Check out Computerworld’s report on Global Game Jam (Danish).

See you next year!

Using Game Design Patterns in Casual Online Game Productions

Sunday, December 28th, 2008

9th Semester/Internship

Spending time in “the real world” was a great lesson for me. Besides the academic work, described below, I gained first hand experience in what it takes to deliver production quality flash games. Go see the cases Jul i Sonofonhuset and Tron – Light Cycles.

(more…)

Jul i Sonofonhuset

Monday, December 8th, 2008

This was a project where I took part as game design and programming intern in Titoonic a/s in late 2008. The production time was one month. My main tasks on the project was game design, sound design, and sound programming (where the sound engine was added to the company’s codebase).

The sound manager class which is an adaptation of Matt Przybylski’s code found here.

Localisation of 3D Audio Sources in Augmented Reality

Saturday, December 29th, 2007

(7th Semester)

As human beings, we are dependent on our ability to hear sound in three dimensions since it provides us with many clues about how we are to navigate and behave in our surroundings. The fact that we from birth have been equipped with two ears placed on each side of our head makes us able to perceive the azimuth of a given sound, in fact we are able to localise a sound source within 2 degrees of azimuth; the design of the pinna or outer ear and our torso provides us with the ability to perceive the elevation of a given sound.

During the past decade there has been an increase in interest within 3D sound or spatial audio, both within entertainment, industry, and research; within this period several methods and systems has been developed to reproduce spatial audio. One of the methods is called head-related transfer functions (HRTF), which uses several audio cues in order to provide the listener with a broad spatial soundscape.

(more…)

DADIU May 2007 – Hængerøv

Monday, June 11th, 2007

Hængerøv

The first production was called Hængerøv and was made in Source SDK using Lua, C++ and Visual Studio 2005. The production took place May 2008.Hængerøv poster

The game was a 3D platformer where you would play a young boy, that accidentally broke his sister’s new cell phone while secretly tampering with it in his tree house one night. The objective is to collect the missing buttons while evading the furious sister who threatens to embarrass you by showing a picture of your bare bottom to the entire school, but that is not all.

The dark garden is a treacherous place to sneak around. Garden gnomes have come to life and they yodel awfully loud when tripped over, and that is what your sister is waiting for, so she can find you and take your picture.

Your parents aren’t of much help as they are having a garden party. Empty wine bottles can also give up your position, and so can the (not-so-scary-almost-pathetic) ghosts that are haunting the garden.

Fortunately you are armed with your Bug Vacuum Gun, that can suck up the ghost. The downside of it is that it attracts your sister’s attention as well.

The only chance of avoiding total embarrassment is to return the fixed mobile to your sister before her boyfriend calls her.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes