09 Apr

Where I’ve Been

Aaaaand we’re back. A few of you NewbQuest listeners / watchers / readers have very politely asked me what’s up with the show via Twitter (@mattmirrorfish). It’s been a pretty busy period for me, with the main news being: I got a new job! I’m now part of the Online Content Team at Unity Technologies and help out there with making videos for the Unity YouTube channel as well as doing about half of the weekly Monday afternoon (US EST time) Twitch streams teaching Unity. It’s an awesome job and I’m super happy to be doing it. It’s definitely in line with the mission of what NewbQuest is all about. The sad fact though is that it’s pretty time and energy intensive and because it’s similar to what I was doing for the show it’s caused me to go on a bit of a hiatus. I’m bringing the show back to life to release an episode that I’ve (shamefully) been sitting on for quite a few months with the excellent Steve Swink (sorry Steve!) and I’m aiming to make some more regular updates here now that I’m settled into my new job, new apartment and generally re-arranged life!
For those who use Unity I’d love for you to check out my first big project for them which is a 14 part tutorial series on creating a 2D Roguelike game. This is aimed at intermediate Unity users but if you’re a beginner with a lot of gumption and desire feel free to dive on in.

I’ve also been working slowly away on my procedural flying butterfly shooter Pollen and have made some progress with it. You can check out some gameplay footage of the first two levels here:

13 Jun

NewbQuest Ep.4: Richard Flanagan, Game Designer of Fract OSC

In this episode we interview game designer Richard Flanagan who is a member of the team who created FRACT OSC.  FRACT is a musical puzzle exploration game for Mac and PC. FRACT is best imagined by asking: what if Myst and Tron had a baby that was a giant synthesizer you could wander around in? If that sounds awesome to you, you’ll really enjoy it.

For those interested in music and sound technology, particularly real time synthesis, the project is very interesting.  The musical puzzles in the game combine pre-recorded music tracks with real time subtractive synthesizer sounds powered by Miller S. Puckette’s Pure Data (or PD) sound generation environment.  This is an area of real time sound and music generation that I’ve been very interested to see pursued further in games and so was delighted to talk to Richard about it, along with the larger process of developing FRACT OSC.


You can subscribe and download the show via iTunes, and if you do I’d love it if you had time to leave an honest review.

You can also check out the show via the NewbQuest YouTube channel, if you prefer that format. If you do I’d appreciate if you’d subscribe or leave a comment over there.

 

To learn more about Richard Flanagan and FRACT OSC head over to FractGame.com.  If you enjoyed the interview the best way to support him and his team is to buy the game on steam.

09 Jun

The Art of Screenshake (with Unity 2D script)

tumblr_mzjv0wUPlA1rpem9no1_500

Nuclear Throne by Vlambeer

This is a great presentation by Jan Willem Nijman of Dutch dynamic duo Vlambeer.  He talks about crafting the feedback that your player receives when playing your game, including things like screenshake, camera movement and explosions. There are some very useful ideas in here. I put together a simple unity script aimed at Unity 2D which implements screenshake by moving the camera on collision which was inspired by this, grab it below.

 

To use this script:

  1. Assets > Create > C# Script
  2. Name the new script “CamShakeSimple” (as in the class name)
  3. Add CamShakeSimple to the game object that will cause the shake, in this case it’s setup to shake the camera when this 2D object collides with something.
  4. Drag your main camera into the newly visible slot in the inspector called “Main Camera”
  5. Now when this object hits another it will use the relative velocity of that collision to shake the camera.  Other ideas might include shaking the cam when you fire a bullet, fall from high up, or any number of things.
  6. Note that if you’re using this in 3D you’ll want to remove the two instances of “2D” from the collision portion.

 

using UnityEngine;
using System.Collections;

public class CamShakeSimple : MonoBehaviour 
{

    Vector3 originalCameraPosition;

    float shakeAmt = 0;

    public Camera mainCamera;

    void OnCollisionEnter2D(Collision2D coll) 
    {

        shakeAmt = coll.relativeVelocity.magnitude * .0025f;
        InvokeRepeating("CameraShake", 0, .01f);
        Invoke("StopShaking", 0.3f);

    }

    void CameraShake()
    {
        if(shakeAmt>0) 
        {
            float quakeAmt = Random.value*shakeAmt*2 - shakeAmt;
            Vector3 pp = mainCamera.transform.position;
            pp.y+= quakeAmt; // can also add to x and/or z
            mainCamera.transform.position = pp;
        }
    }

    void StopShaking()
    {
        CancelInvoke("CameraShake");
        mainCamera.transform.position = originalCameraPosition;
    }

}

To give credit where it’s due, this is a combination of code fragments from this thread:

http://answers.unity3d.com/questions/220407/damaging-a-car-depending-on-force-of-impact.html

and this one:

http://answers.unity3d.com/questions/46317/screen-shake-effect.html?sort=oldest