Post news RSS Weekly Update #1

With some polishing done to the new pathfinding system, we've added some basic items like ammo purchases. Some new graphics effects, like candles, where added as well.

Posted by on

Hello IndieDB community! Here is our weekly update on 3G for the 3rd week of August. We are going to try and keep up with these to keep the community informed.


If you read our last post, we talked about how we where building a custom pathfinding solution to solve some of the issues we have had with attempting to use some pre-made solutions. And as promised, a tutorial has been started on the subject! You can view the first installment now on my wordpress (temporary location until an official website is setup) here:

That article talks a bit about the limitations that forced us to development a new solution, and explains the A* Pathfinding Algorithm in it's basic form. The next installment will dive into building custom components with Unity Editor Extensions to get some tasty productivity out of it.

Weekly Update #1 Photos

Pathfinding makes it a lot easier for zombies to find their way around obstacles and through the rooms inside. Room purchases will turn "nodes" on to allow zombies to use them in pathfinding. At this moment, the first edition of this system is running pretty smooth! The graph refresh only happens once at the start and helps pre-calculate the connections, timed at around 6 milliseconds. Now, the enemy path calculation takes a bit longer then we wanted. Searching ~30 nodes takes just under 2 milliseconds to produce a path.

Graphics Update

Now besides the fancy pathfinding we did play around a bit with the graphics. We wanted to save this until later, but sometimes it's good to get a general idea going. Unfortunately, the computer we used for the 3D modelling is down at the moment, so we have to continue with the placeholder primitives. An interesting thing though, is that for the cell-shading we went about creating a bunch of custom shaders to handle the job. This way we could incorporate a more "posterized" feel to the textures. We also needed to get around a caveat of Unity's built-in shaders, being that Unity accepts 2 UV coordinates with imported meshes but the shaders don't use them. So because the models coming out of Blender will use 2 UV maps for the materials, it was only fitting that our shaders actually used them!

Weekly Update #1 Photos

It might not look like much right now, but there's some potential power behind the shaders. At their most complex they actively posterize the diffuse map and light map, use ramp powered lighting, use 2 UV maps for diffuse and lightmap, and feature normal map and specular mapping. All while giving that classic outline.

The Much Important Gameplay

Besides the technical looks and algorithms, the gameplay is starting to shape up! The waves are working. For debugging we've limited it to just one, but with a quick change it can go infinitely now. As of now, they are pretty easy to hold back when they are outside of the windows, but ammo doesn't last forever. Which gives you 2 options. First, you can open one of the rooms and purchase some much needed ammo from the box. Or second, you can let them tear the windows down and turn them into an item-drop gauntlet!

Weekly Update #1 Photos

Zombies drop random power-ups when killed inside. It's almost motivation to let them in. Currently the only types of power-ups are: points, cash, health, and ammo. Later on we will add stuff like super strength, electro-bullets, invincibility, etc. If you wanted to go with option 1 and buy the ammo, that is also possible! Thanks to a very handy base-class, making new vendor types is a breeze. As of now, the ammo box charges you based on the weapon you have. This way refilling a pistol can be cheaper then refilling a not-so-light machine gun. Can't wait to get some new models and textures so we can ditch these placeholder models!

Weekly Update #1 Photos


Well we hope this has peaked your interest! And in case you wondering, this next week we hope to add some of this lovely stuff:

  • Add more vendor types such as medkits, energy drinks, weapon upgrades, etc.
  • Fix the existing bugs in the enemies AI (they stall out sometimes)
  • Start introducing some special attacks like fire, shock, acid.
  • Upgrade the GUI for a more efficient better feel.

We hope to see you next time, and we would appreciate any comments! Also please feel free to track this game, or send it to your friends. And just for fun, if you are a Unity developer and are interested, here's one of our early versions of the super-toon shader:

Shader "Baystep/Toon/Complex Outlined" {
	Properties {
		_Color ("Main Color", Color) = (0.5,0.5,0.5,1)
		_MainTex ("Base (RGB)", 2D) = "white" {}
		_LightMap ("Lightmap (RGB)", 2D) = "white" {}
		_BumpMap ("Normal (Normal)", 2D) = "bump" {}
		_SpecularMap ("Specular Level (R) Gloss (G) Emission (B)", 2D) = "gray" {}
		_Ramp ("Toon Ramp (RGB)", 2D) = "gray" {}
		_OutlineColor ("Outline Color", Color) = (0,0,0,1)
		_Outline ("Outline width", Range (.002, 0.03)) = .005
	SubShader {
		Tags { "RenderType"="Opaque" }
		LOD 200
			#pragma surface surf Toon
			#pragma target 3.0
			sampler2D _MainTex;
			sampler2D _LightMap;
			sampler2D _BumpMap;
			sampler2D _SpecularMap;
			sampler2D _Ramp;
			fixed4 _Color;

			struct Input {
				float2 uv_MainTex : TEXCOORD0;
				float2 uv2_LightMap : TEXCOORD1;
			inline fixed4 LightingToon(SurfaceOutput s, fixed3 lightDir, fixed3 viewDir, fixed atten) {
				fixed3 h = normalize (lightDir + viewDir);
				fixed NdotL = dot(s.Normal, lightDir) * 0.5 + 0.5;
				fixed3 ramp = tex2D(_Ramp, float2(NdotL * atten, 0)).rgb;
				float nh = max (0, dot (s.Normal, h));
				float spec = pow (nh, s.Gloss * 128) * s.Specular;
				fixed4 c;
				c.rgb = ((s.Albedo * ramp * _LightColor0.rgb + _LightColor0.rgb * spec) * (atten * 2));
				c.a = s.Alpha;
				return c;
			void surf (Input IN, inout SurfaceOutput o) {
				half4 c = tex2D (_MainTex, IN.uv_MainTex.xy);
				half4 l = tex2D (_LightMap, IN.uv2_LightMap.xy);
				o.Albedo = (c.rgb * l.rgb) * (_Color * 2);
				o.Alpha = _Color.a * (c.a * l.a);
				o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
				float3 s = tex2D(_SpecularMap, IN.uv_MainTex).rgb;
				o.Specular = s.r;
				o.Gloss = s.g;
				o.Emission = s.b;
		UsePass "Toon/Basic Outline/OUTLINE"
	FallBack "Diffuse"

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.