Unity projects

Here's some of the things I've done in Unity! The links will take you to webpages with the games embeded as HTML5 WebGL plugin. You should run these on a laptop or desktop, with a modern web browser.

A quick little Breakout style game.

A work in progress, but I've got the physics to work, and for the game to keep track of score and lives. I implemented the physics by using Unity's built in Rigidbody component that included physics. That worked, but had problems with a Pong-style game, namely it added in friction and air resistance. To fix that, I just made every surface have zero friction and zero drag. Finally, there was the issue that the ball hitting a moving paddle caused the ball to speed up, when I wanted velocity to stay constant. I had to go in code that updates every physics calculation and override the velocity to a defined maximum if it was exceeded. The code looks like this:

public void FixedUpdate(){
    //using sqr magnitude and velocity as it's faster to compute
    if (ballRB.velocity.sqrMagnitude > ballMaxVelocitySqr){
        ballRB.velocity = ballRB.velocity.normalized * ballMaxVelocity;

I would like to flesh it out with more levels, maybe some power-ups, refine the physics more, and add in audio.

My modded variant of Unity's tutorial FPS game.

This is one of the default projects that Unity gives you to learn the engine with. I haven't added any code, but I have added more geometry to the levels, more weapons, changes to the enemy AI, and the enemy layout.