Category Unity

Rune 2 – Visual Scripting for Betadwarf Entertainment

So my blog has been pretty silent for almost a year now, but it’s only because I’ve spent the last year working at BetaDwarf Entertainment as a programmer, so I’ve spent my time writing lots of code and not enough writing about writing code! Today I’d like to share some information on one of the systems I’ve helped develop during my time at BetaDwarf.

Everyone at BetaDwarf is hard at work producing the not yet released title Forced 2 : The Rush, which is currently in alpha. In the debut title Forced a visual scripting language was created to allow designers to set up world events for in game actions such as creatures spawning, or cutscenes. Based on the usefulness of this tool, it was decided early on in Forced 2 that a visual scripting language was needed...

Read More

Some gifs

Someone pointed me in the direction of software for recording gifs (GoonCam) and it is awesome and helped me make these. They show off my first steps at voxel editing abilities as well as riding the flow.


Read More

An Event System

Recently I was tasked with creating an event system. I had never really made my own system to handle events before so it took a bit of researching with experimentation and iteration to get something I was satisfied with. I set up a few criteria for the system.

  • Events are fire and forget
  • An event producer shouldn’t need to know about any of the event handlers
  • There should be two types of messaging, broadcast and multicast
  • Subscribers for broadcast shouldn’t need to know anything about the event producer
  • Subscribers for multicast should specify a producer to receive events from
  • Any class can produce events, and any class can consume them
  • Any type of data can be passed along with the message

With these criteria in place there will exist a very loose coupling between the event producers and ...

Read More

DirectCompute Particles on a Path

My Rel Por

For the past week I’ve been working on flows for the god game I’m working on. In the game there will be orbs, as seen in the picture above. Orbs come in different types, with a varying number of inputs and outputs.  You can see the definition of each orb type below. When an orb has a nearby neighbor it can possibly receive an output flow that that orb to the neighbor. These orbs are therefore connection points, and the flow moves from orb to orb. In the game these will grow fish populations, or possibly be hazardous and must be redirected.

  • Source orb – 3 outputs

  • Source sink orb – 2 outputs, 1 input

  • Sink orb – 3 inputs

  • Pass through orb – 1 output, 1 input

  • Combination orb – 1 output, 2 input

I started out prototyping a very simple version using LineRenderer in Unity, but ...

Read More

Unity3D ComputeShader Example

So I’ve been messing around with compute shaders in Unity3D for the past day and I thought I’d share some code to maybe help others get started. Unfortunately the documentation for this capability is abysmal, so there’s a few simple things worth noting to get it up and running. This is a DirectX 11 only capability so you’ll need to be building for windows if you want to get anything out of this. In this example I’ll be demonstrating how you can set up your compute shader so that you get a square set of points that move back and forth (z-axis). I got this working from some code that a Unity dev posted, which I’ve unfortunately lost the link for. It will look something like the following

Unity ComputeShader Moving Points

Unity ComputeShader Moving Points

It is of course not nearly as interesting as a screenshot.

Anyway here’...

Read More