Gameplay video: ReEntry–An Orbital Simulator

Logo

Lately I have been working on a space simulator names ReEntry. The game is focused around Orbital Mechanics, where you fly a rocket from a 3rd person perspective, perform orbital maneuvers to complete missions and so on.

The game will focus on realistic programs like Project Mercury, Project Gemini, Project Apollo and the Space Shuttle.

The game also comes with a Virtual Cockpit mode for Mercury (others to be implemented as well if time permits, currently started on Gemini) where I have modelled the interior of a generic Mercury Capsule that can operate both the Redstone and the Atlas Launch Vehicles (see screenshots below). The switches, gauges and fuses has all been implemented, as well as navigational equipment, electrical components, and so on.

 

GAME PLAY VIDEO: Entire Redstone-Mercury 3 mission

 

SCREENSHOTS (WIP)

53
Mercury-Atlas lift off

72
The interior of a generic Mercury capsule

M2
Mercury capsule in orbit

64
Mercury-Redstone at the launchpad

Advertisements
Posted in Game programming, Unity | 1 Comment

#GameDevLive–Episode 2: Creating a game from scratch!

image

Welcome to Episode 2 of #GameDevLive! The purpose of this series is the help you get started with game development and Unity 3D, while we develop a full game.

In this episode, we will use trigger zones to add power ups, introduce fuel to our player and some more UI tweaks like a fuel indicator that changes color based on the amount of fuel left, and a restart level button that is visible when it’s game over.

You can follow OmegaDish on Twitch to see these episodes live, while providing input, suggestions and what features will implement – be part of the development! Smile

Right, enough talking, let’s get started!

Download the tools you need here: www.unity3d.com
Download the source here: https://github.com/omegadish/DishGame

Also a special thanks to Bredholy for helping me with editing and the Twitch channel!

Posted in Game programming, GameDevLive, Tutorial, Unity | Leave a comment

GameDevLive Episode 2 will go live tomorrow at 10am PST

Hi!

The next episode of GameDevLive can be seen from http://twitch.tv/OmegaDish tomorrow at 10am PST, see the countdown here: http://www.timeanddate.com/countdown/generic?iso=20151208T10&p0=234&msg=%23GameDevLive+-+Session

In this episode, we will continue from Episode 1 (recording: https://digitalerr0r.wordpress.com/2015/12/05/gamedevliveepisode-1-creating-a-game-from-scratch/), covering pickups, more UI and a simple main menu.

Hope to see you guys there!

Posted in Uncategorized | Leave a comment

#GameDevLive–Episode 1: Creating a game from scratch!

Episode1

I decided to create a new video tutorial series for you guys, #GameDevLive! The purpose of this series is the help you get started with game development and Unity 3D, while we develop a full game.

Episode 1 is all about getting you started with Unity, and creating a little game from scratch, while the next episodes will build on this game introducing more concepts of Unity, taking you to an advanced level of Unity game development.

You can follow OmegaDish on Twitch to see these episodes live, while providing input, suggestions and what features will implement – be part of the development! Smile

Right, enough talking, let’s get started!

Download the tools you need here: www.unity3d.com 
Download the source here: https://github.com/omegadish/DishGame

Also a special thanks to Bredholy for helping me with editing and the Twitch channel!

Posted in Game programming, Tutorial, Unity | 2 Comments

#GameDevLive – I will make a game live on Twitch!

On the 3rd of December I will do a live stream on the OmegaDish channel, where I will start developing a game. In the first episode we will create a prototype of the game from scratch using Unity 5, and then in the following episodes, we will continue to work on the game to complete it. I will also take requests and input from the chat so YOU can influence how the game will function and look!

Following this series will get you started with game development and Unity, learn the different options for monetizing on your game, as well as publishing it.

image

Countdown:
http://www.timeanddate.com/countdown/launch?iso=20151203T10&p0=234&msg=%23GameDevLive&font=cursive&csz=1&swk=1

 

Hope to see you there!

Posted in Game programming, Tutorial, Unity | Leave a comment

MVP Lander: Source code from my MVP Summit session

image

As an ex-MVP it was awesome to be back at MVP Summit as a speaker. In todays session I spent about 40 minutes on this little game where you control a lander using A and D for rotation, and W or Space for thrust. You need to land on the platform somewhere on the moon below you.

You can download the source code and the exported Windows 10 Universal app here:
http://1drv.ms/1GMES9k

See my previous post for the SpeechSynthesis, VoiceRecognition and Cortana integration:
https://digitalerr0r.wordpress.com/2015/10/21/voice-activating-your-windows-10-games-using-speech-synthesis-voice-recognition-and-cortana/

Thanks for attending my session, enjoy!

image

Posted in Tutorial, Unity | Leave a comment

Unity 5 Shader Programming #3: Specular Light

image

Hi, and welcome to Tutorial 3 of my Unity 5 Shader Programming tutorial. Today we are going to implement an other lighting algorithm called Specular Light. This algorithm builds on the Ambient and Diffuse lighting tutorials, so if you haven’t been trough them, now is the time. 🙂

Specular Light

So far, we got a basic light model to illuminate objects. But, what if we got a blank, polished or shiny object we want to render? Say a metal surface, plastic, glass, bottle and so on? Diffuse light does not include any of the tiny reflections that make a smooth surface shine.

To simulate this shininess, we can use a lighting model named Specular highlights.
Specular highlights calculates another vector that simulates a reflection of a light source, which hits the camera, or “the eye”.

What’s “the eye” vector, you might think? Well, it’s a pretty easy answer to this. It’s the vector that points from our camera position to the camera target.

One way to calculate the specular light is

I=Ai*Ac+Di*Dc*N.L+Si*Sc*(R.V)n

Where

R=2*(N.L)*N-L

This is called the Phong model for specular light.

This model calculates the angle between the Reflection Vector and the View vector. It describes how much of the reflection hits directly on the camera lens.

There is another way of calculating this called the Blinn-Phong model where you don’t need to calculate the reflection vector all the time.

 

Blinn-Phong?

In Blinn-Phong, instead of calculating the reflection vector R, we calculate the halfway vector between the view and the light direction vector, meaning we can replace the dot product between R and V with the dot product between N and H.

 

 

image

where H:

image

Then we have a parameter n that describes how rough the surface is.

The biggest visual difference between these two implementations is that while Phong will always have a circular shape, the Blinn-Phong will have an elliptical shape from steep angles. This mimics the real world.

Both models got their pros and cons that we won’t discuss in this article.

 

Implementation

The implementation is straight forward, nothing new from the previous tutorials. In other words, let’s get started with the source:

Shader "UnityShaderTutorial/Tutorial3SpecularLight-GlobalStates" {
	SubShader
	{
		Pass
		{
			Tags{ "LightMode" = "ForwardBase" }

			CGPROGRAM
			#include "UnityCG.cginc"

			#pragma target 2.0
			#pragma vertex vertexShader
			#pragma fragment fragmentShader

			float4 _LightColor0;

			struct vsIn {
				float4 position : POSITION;
				float3 normal : NORMAL;
			};

			struct vsOut {
				float4 screenPosition : SV_POSITION;
				float4 position : COORDINATE0;
				float3 normal : NORMAL;
			};

			vsOut vertexShader(vsIn v)
			{
				vsOut o;
				o.screenPosition = mul(UNITY_MATRIX_MVP, v.position);
				o.normal = normalize(mul(v.normal, _World2Object));
				o.position = v.position;

				return o;
			}

			float4 fragmentShader(vsOut psIn) : SV_Target
			{
				float4 ambientLight = UNITY_LIGHTMODEL_AMBIENT;

				float4 lightDirection = normalize(_WorldSpaceLightPos0);

				float4 diffuseTerm = saturate( dot(lightDirection, psIn.normal));
				float4 diffuseLight = diffuseTerm * _LightColor0;

				float4 cameraPosition = normalize(float4( _WorldSpaceCameraPos,1) - psIn.position);

				// Blinn-Phong
				float4 halfVector = normalize(lightDirection+cameraPosition);
				float4 specularTerm = pow( saturate( dot( psIn.normal, halfVector)), 25);

				// Phong
				//float4 reflectionVector = reflect(-lightDirection, float4(psIn.normal,1));
				//float4 specularTerm = pow(saturate(dot(reflectionVector, cameraPosition)),15);

				return ambientLight + diffuseLight + specularTerm;
			}

			ENDCG
		}
	}
}

There are two main differences here, we need the vertex position in the shader, as well as the code that calculates the updated light equation.

image

This is just a pass-through from the Vertex Shader.

Then we need to do the specular calculation itself.

image

First we get the position of the camera by using the built in variable WorldSpaceCameraPos and the vertex position.

Then we calculate the half vector by normalizing the light direction added with camera positon.

The last thing we need to calculate is the specular term itself, H.V – and add it to our existing lighting equation. Here we are using a function called pow(x,y) what raises the specified value X with the specified power Y,

25 is the shininess factor, feel free to play around with the value.

As you can see, we didn’t use any new

Downloads:

Download the source from GitHub here:
https://github.com/petriw/UnityShaderProgramming/tree/master/3 – Specular Light

Posted in Shaders, Tutorial, Unity | 3 Comments