• Quick Info: Perspective and Orthographic Projection

    In Unity (and most engines), cameras can be set up to use Perspective or Orthographic projection. Perspective Projection will show content in ‘3D’ and will allow content to appear to move into or out of the screen in the Z axis. The size of content will reduce as it moves into the distance which gives…

  • Example 14: Part 1: How Do 3D Objects Get Rendered?

    In Example6 and Example7, I showed how to programmatically generate 3D content and put it onto the screen using Unity Mesh components. In those examples, we just set up vertices, indices and colours and then passed those to Mesh components. So how do the mesh components put the content onto the screen? Well, this is…

  • Starting with Python

    I’ve never been a fan of Python as it always seemed like a ‘pretend’ language with its ‘indent’ based syntax. It never felt as solid as C#, C++, Java and the like, and has always seemed a bit ‘off’… but… I’ve started using python for some utility code over the last couple of years as…

  • Core Content

    So, this post will give you the basis you’ll need for building 3D games. In Unity, there are various functions available to do most of this, but I’m going to explain it as though Unity doesn’t exist. By working this way, you’ll know what’s going on ‘under the hood’ and you’ll be able to debug…

  • Example 9: 3D Beagle

    So, did this for fun a few weeks back… There’s a nice piece of software on iOS called “Luma“. I’d recommend grabbing it and having a look. It can be found on the AppStore. Note: I have affiliate links for luma but I’m recommending it because I think it works really well compared to other…

  • Example 11: Simple Interpolation

    This is an example of how you’d move something from A to B at a linear speed. Very basic but I’m including it all… What’s important to remember here is that this is using a time delta. If you don’t use a time delta then the ball will move at a different speed depending on…

  • Example 10: “Dampened” Movement

    This one is used a lot. You want object A to move to object B, but as it moves, it slows down as it approaches the destination. It looks something like this… You’ll often see this sort of movement on UI elements or missiles chasing the player (for example) It’s a simple system; Object A…

  • Example 8: Reflecting a Vector

    You have a ball heading for a surface and you want the ball to bounce correctly… To make this happen, you’ll need to reflect the inbound direction of the ball off of the surface it hits in order to figure out where the ball should go. The math for this is pretty simple; InboundVector –…

  • Example 7: Programmatic Cube

    So, I’ve set up Example07. This shows how to generate a cube programmatically and can be found on the git repo here The code has been written to split the standard 3D from the Unity 3D to allow re-use if you’re using a custom rendering engine. You’ll see this marked in the code Polys are…

  • Game Dev Tips and Tricks #3

    Pool objects: Instead of instantiating them again and again, create them once and keep a ‘pool’ When the game starts up, instantiate objects (enemies, bullets etc) and store references to those instantiations. This will avoid the overhead of creating content while the game is playing, will improve framerate and avoid stalls caused by the GC.…