Dev Blog

Dev-Blog 102: Water world

03/05/2014

devblog_header03

Welcome back followers of the fearsome!

GDC is coming up, so we’re working hard to get *something* running that we can show off. As we’re a viking game, most of our game will have a lot to do with the ocean and islands, so we need a decent looking ocean. It needs to be able to display many different styles of water: large ocean-like waves, smaller bay-like waves, high winds, low winds, etc. Also, it needs to look cartoony, to fit the style of the rest of the game.

I started looking into shaders for ocean rendering, and found that a lot of methods use a lot of math and large shaders to make them work. This is great, but not really something I want to spend a ton of time on a the moment. The one page that I thought had a pretty good explanation on how they did their ocean rendering is this one: http://hosukchang.com/making-ocean-1/. The interesting part of that page (besides all the cool video’s) is the image with all the circles on it. I figured this was worth a test run in a very simple shader.

So I started working on a subdivided plane, with a vertex shader to alter the position of the vertices over time. I slapped an internet test texture on it, and got to building some simple vertex shader to move the points.

start

Now, to get some wave action, we’ll need to add an offset to the position in the shader. Instead of just adding a sine wave to the Z (up), I’m also adding a sine wave to the X (sideways), with a 90 degree phase shift. Phase shift is simply adding an offset to the sine evaluation function for the X direction. So in a GLSL shader, it looks something like this:

attribute vec4 v_position;
attribute vec2 v_uv;
uniform mat4 wvp;
uniform float time;
uniform float phaseshift;
uniform float xamplitude;
uniform float zamplitude;
varying vec2 f_texCoord;
void main()
{
    vec4 pos = v_position;
    pos.x += cos(time + phaseshift) * xamplitude;
    pos.z += cos(time) * zamplitude;
    gl_Position = wvp * pos;
    f_texCoord = v_uv;
}

As you can see, there are a few variables to play with: phaseshift, xamplitude and zamplitude.  Here are some examples:

sine

The image above has a phase shift of 90 degrees (1/2 PI), so each point will traverse a nice circle. It generates big rolling ocean waves.

sine with phaseshift 

When you change the phase shift to about 125 degrees, and make the xamplitude larger than the zamplitude, you can generate waves that are a bit more like breaking waves (like the image above), with a steeper angle on one side versus the other side. You can go way crazy with this and generate something like this:

sinebreakingwave

In the image above you see one more thing. Blending between textures based on where the ‘cycle’ of the vertex is. I’m using two textures, one quiet water texture, and one frothy foamy water texture (which is also a test image from the internetz), and blend between them using another cosine to get the blend factor.

The last thing to note about these images is that the water kind of appears straight at the back, and the color fades to a different color. This is because I’m fading out the wave heights towards the back, and fade the color to the skybox color behind it.

When all is said and done, it looks like this:

And here’s the whole shader with a ton of tunables in case you’re interested. (Make sure to right-click and save!)

Alright, that’s it for this week, I’ve gotta get back to implementing cool stuff!

Nick_avatar64 Nick

Follow us on twitter: Nick: @nickwaanders Jesse: @jouste Caley: @caleycharchuk SlickEntertainment: @SlickEntInc

Follow us on Google: Nick: +NickWaanders Jesse: +JesseTurner Caley: +CaleyCharchuk

Like us on facebook: https://www.facebook.com/SlickEntertainmentInc

Posted by: Under: Tech,Vikingsquad Comments: 4

Dev-Blog 101: Shellrazer Bugzkrieg 101!

02/26/2014

devblog_header01

Welcome back, followers of the fearsome!

Tomorrow we’re shipping the new update for Shellrazer called Bugzkrieg!

BugzKrieg_Poster02_small

Tons of pesky bugs are taking control of an entire island, so it’s up to you so raze it and free the crashed alien Bloop. We made a cool little video, here it is:

Besides adding  a whole new island to play, we’ve also added localization for 9 languages: French, Italian, German, Spanish, Portuguese, Simplified Chinese, Japanese, Korean and Russian.

The free update will come out tomorrow on Android and iOS. You can get this awesome new update to Shellrazer by clicking either button below:

Get it on Google Play

Please, tell your friends about our update, it’s a big help to us!  

Nick_avatar64 - Nick

Follow us on twitter: Nick: @nickwaanders Jesse: @jouste Caley: @caleycharchuk SlickEntertainment: @SlickEntInc

Follow us on Google: Nick: +NickWaanders Jesse: +JesseTurner Caley: +CaleyCharchuk

Like us on facebook: https://www.facebook.com/SlickEntertainmentInc

 

 

Posted by: Under: Shellrazer,ShellRazer Dev-blog Comments: 0

Dev-Blog 96: Steam Dev Days

01/22/2014

devblog_header03

Welcome back, followers of the fearsome!

This week isn’t really a Waanderful -tech post, though it is about things I’ll need to change in the engine to prepare for future developments. I spent last week at the Steam Dev Days, a fantastic event organized by Valve Software. Talks ranged from how to port your engine to Linux (and SteamOS, which is based on Linux), how to make the best use of Steam features like community sharing and the workshop, as well as what Valve sees as a big thing in future: Virtual Reality. I’ve always been a big fan of VR, so I can’t wait for this to become reality. I wasn’t one of the lucky people to try out their VR system, but supposedly it’s really, really good. 

screenshot46

So what did I learn? Well, actually that my engine isn’t in that bad of a shape to be ported to Linux! Since I’ve got it running on PC and Mac already, and I’m already using OpenGL, a lot of issues are already resolved. There are a few things I want to work on though:

1) I need to learn Linux! I’ve been putting it off for long enough. I’ve installed Ubuntu using Parallels on my Macbook, and I’m playing around with it. I’m having trouble updating Ubuntu to the latest version, but this may  be because of Parallels, it seems have a few quirks. I’ll have to play with it some more. I did manage to install QTCreator, which seemed like a nice way to debug on Linux. 

2) I’m using a homebuilt project/solution creator tool that has proven very useful to port our games to different platforms, but I am getting a bit fed up with maintaining it, especially with new versions of XCode and Visual Studio coming out regularly. I’m thinking of switching from my python based system to CMake, and I’m currently investigating how to convert my current setup to CMake with the least amount of changes. It doesn’t seem that hard, but it’s all about knowing the vocabulary (which I don’t). Unfortunately I haven’t been able to find any clear examples online about how to convert say a Visual Studio solution with multiple libraries to a CMake setup, so if anybody has suggestions, please let me know in the comments! I’ve found snippets here and there, but nothing too in-depth. Maybe I should blog about the conversion process myself, so others have a bit of a guide to follow.

3) I should switch the engine to SDL2. My engine has shipped games on XBox360, iOS and Android, but it has never actually shipped on Windows, MacOSX or Linux. I’ve created code to manage application windows, threads, timers, etc, on most platforms, but I’m a bit weary about adding and supporting Linux myself. On top of that, joystick support tends to be a pain in the ass on OSX, and SDL2 seems to have support for it built in. There are a few things I’ve found out so far that I don’t quite like in SDL2, such as no retina support on the Mac. Hopefully this will be added soon. But, I’m hopeful, and I will probably try to get this implemented as soon as the Shellrazer expansion ships (SOON!), and I can rip up the entire engine to my hearts content. :)

4) VR is awesome. I really need to make some time to experiment with this. 

There are a lot more things I want to fix, but these are the main and most urgent ones. 

Alright, that’s it for this week. Keep those turtle cannons blazing!

- Nick

Follow us on twitter: Nick: @nickwaanders, Jesse: @jouste, Caley: @caleycharchuk, SlickEntertainment: @slickentinc

Follow us on Google+: Nick: +NickWaanders, Jesse: +JesseTurner, Caley: +CaleyCharchuk

Like us on Facebook: https://www.facebook.com/SlickEntertainmentInc

Posted by: Under: Tech Comments: 2

Dev-Blog 94: Aaand we’re back!

01/08/2014

devblog_header05

Hello fearless followers! (That’s the tag right?)

Caley here, with the first dev blog of 2014!

It’s a brand new year at Slick, 2013 is in the history books and we keep on keeping on. Last year was one of experimentation and support. Over the year we were playing around with a few ideas for our next game, Shellrazer got a new expansion with a 2nd on the way! Plus we helped out a few devs around town.

BugzKrieg_Poster02_small 

But now it’s 2014 and you’ve got a lot to look forward to! An idea has finally stuck and the new project is now in full swing.

Nick has been setting his keyboard on fire making the Waanimator. That’s shaping up nicely. Up next is work on the level design tool and gameplay systems! More info on that in the coming weeks!

The IGF nominations have also been released. Congrats to all the Vancouver locals that made it on the list! Ryan Clark(Necrodancer), Klei(Don’t Starve), Matt Thorson(Towerfall), Andy Moore(Monster Loves You), the list goes on! Vancouver Represent!

Cheers from the Slick Crew! Happy 2014!

- Caley

Follow us on twitter: Nick: @nickwaanders, Jesse: @jouste, Caley: @caleycharchuk, SlickEntertainment: @slickentinc

Follow us on Google+: Nick: +NickWaanders, Jesse: +JesseTurner, Caley: +CaleyCharchuk

Like us on Facebook: https://www.facebook.com/SlickEntertainmentInc

Posted by: Under: Slick Entertainment Comments: 0

Happy Holidays!

12/24/2013

screenshot44

Posted by: Under: Art Work Comments: 3

Latest News

July 26 2012

VANCOUVER, British Columbia – July 26, 2012 – Independent development studio Slick Entertainment is proud to announce Shellrazer for iPad, iPod Touch, and iPhone, released on the App Store today for a temporary launch sale of $0.99 (regular $2.99). RIDE YOUR GIANT WAR TURTLE TO VICTORY OVER THE NASTY GOBLINS!! You are a Klang Clan […]

Dev Blog

April 16 2014

Welcome back followers of the fearsome! This is Jesse here just back from PAX East Boston! I was lucky enough to pocket-pitch some people Viking Squad  and I want to thank everyone that let me talk to them about our game! We are really excited and ready to forge onward! ———- This week we’ll be […]