Tag Archives: Development

Low poly water shader

Edit: I’ve added a link to a downloadable version of the shader! Copying the code from this post does crazy stuff to the symbols..

The side tracking specialist strikes again.

I’ve been working on another project lately and ended up in need of low poly flat shaded animated water.

I tried editing the mesh at runtime by script. Using the method mentioned by joni.giuro here: http://forum.unity3d.com/threads/low-poly-water-help.276685/

But when using the standard plane with this script, basically 200 triangles and when you’ve separeted all vertices (600), FPS drops down from 1500 without script to 190 with script applied. If you add more planes or models with more triangles you quickly get to a point where you get 1 FPS. So I needed something else.

That’s when I figured I’d try my luck with shaders.

Tried googling for solutions, but nothing was to be found so I needed to build my own. With no experience in shader programming this proved to be harder than I expected. But fast forward through some horrible looking results to today. Now I’ve gotten to a point where I can take any plane (not having to worry about splitting verts) applying my shader and getting this:

Almost no hit on FPS with fully animated low poly flat shaded water with specular color. And with this solution:

I can add looots of planes with this shader with almost no hit on FPS. Here I’ve added got 30 standard Unity planes with 200 tris each, all animating off into the distance.

Here’s a video of it in motion:

So how is this done, you say?

Code below.

It’s not perfect but it works! F.ex. I’ve left the UV coords in there but don’t need them for this. And I’m not entirely happy with the waves just yet.. But here you go.

Link to downloadable version

Getting closer to release

I’ve spent alot of time since my last post working on 3ounce.. And I’m getting closer and closer to re-releasing the game. I don’t have much left on my todo-list. But I do have a little work left in the sound Department… Game sound is not something I’m really good at.. Up until now I’ve been using music and sounds that are Public domain and I’m probably just sticking with that for 3ounce, since I don’t have the money to get someone to make something good for me, and a lot of the Public domain stuff I’ve found online is great! Will be working on the audio this weekend and believe I can finish most of what I have in mind.. After that I think all that is left to do before release is fine tuning.. Will spend some time on making a good trailer for the game also.. Which is another area I’m not very good at… See you later!

Unity Networking tutorials

Here’s a quick list of tutorials I have found interesting on Unity Networking.

Brent Farris – Unity Networking tutorials:

Tutorial Playlist

Createathings Unity networking tutorials:

Part 1/4

Part 2/4

Part 3/4

Part 4/4

Sky Arena  Photon tutorials:

These videos are referencing a tutorial asset, that can be bought at the Unity Asset store. I haven’t bought this so I can’t say anything about it. But found the videos interesting either way.

Part 1 – Lesson 1

Part 1 –  Lesson 2

Part 1 – Lesson 3

Part 1 – Lesson 4

Part 2 – Lesson 1

Part 2 – Lesson 2

Part 2 – Lesson 3

Part 2 – Lesson 4

Quill18Creates Multiplayer tutorial:

Part 1/2

Part 2/2

I haven’t decided yet if I wan’t to use PUN or built-in Unity Networking for BattleMaze. Both choices has it’s pros and cons as I see it at the moment, but I think PUN is a little bit ahead.

Do you have any experience with Unity networking? Or PUN? What do you think?

Thank you, Tube

YouTube