Driftwood Progress Log
The posts below keep track of the progress I'm making with my game : Driftwood. Driftwood is a seafaring adventure game about a coconut trying to map out the seas. Enjoy!
Defeating the Water DragonIn this post I am going to go through the process of how I made the ocean but first off I wanted to give a precursor here as to why making the ocean was so important to me personally. The first time I tried to make an ocean I attempted to make one based off "Gerstner Waves." In short, I was defeated. Thoroughly. The important thing looking back though is that I learned why: I had tried to go straight to a tutorial implementation instead of actually understanding the math and physics going on. Now tutorials are a great way to learn, but if I really wanted this ocean to be a part of my game I had to understand the math and physics inside and out. This time around I dove deep into articles and tutorials alike across a few different mediums and came out with the base for my ocean (I created the Material in Unreal Engine 4 complete with a Gerstner Wave material function, a panning normal maps material function, and a material instance to use in game). I've compiled a little demo of each "phase" my ocean took below and linked the materials I studied to create it. The entirety of the process took a couple weeks. Quick disclaimer! Just to reiterate I followed the tutorials and information found in the articles listed at the bottom of this blog post. Without them I would not have been able to create the ocean for my game and I want to give credit to those that did the hard work and put the info out there so others can learn. They're the real heroes here. #1:So what you're looking at above is not actually a Gerstner Wave, but a basic sine wave applied to a grid (tessellated plane). The Gerstner Wave makes use of the function used here but expands heavily upon it. #2:Jump to a week later and boom we've got ourselves a Gerstner Wave (just one for now, but this is where I finished the base material function to be used multiple times in the final material)! I put a basic water texture (very low res) on the ocean to better visualize the horizontal stretching and contracting of the mesh that make that occur with a Gerstner Wave. Now it's time to make it into an ocean with a few more waves (and some more detail work like ripples and reflections) #3:Now we're starting to get something a little more ocean-y! I took off the texture and just put a light blue color on there as I was starting to work with implementing the height based color system taught in lvl80 article. Still kind of looks like someone shaking out a big blue carpet but hey, at least it's a Gerstner based carpet. So math wise, we've got four gerstner waves here summed together. Two large waves with differing directions, and two proportionately smaller waves in those directions (they take the original amplitude, wavelength and frequency and divide it by a constant). In the article I worked with the author wrote out a way to create panning normals for the ocean so I used her method along with a few tweaks of my own. #4:And there we have it! The ocean now gets its color information based on its world height. It also has some specularity work to get some of the shine going. This is the point where I decided to put the finer details on hold as I now had something I could work with for creating the rest of the game. There are also a few visual issues I wanted to fix such as the water catching too much of the skybox's clouds in the specularity (more apparent when the camera is in close proximity to the water, which in this game is very important to fix). So there you have it! I defeated my water dragon and made the ocean tools that defeated me a year prior. When the time comes I will be able to make not just one ocean, but multiple types of "ocean tiles" that can be loaded dynamically to fit the area of the game in which the player is traveling. If you'd like to try your hand at making a Gerstner Wave based ocean yourself, here are the articles and video I used to make it happen:
Awesome article by Hailey Williams: 80.lv/articles/tutorial-ocean-shader-with-gerstner-waves/ The Nvidia article where it all began: developer.nvidia.com/gpugems/GPUGems/gpugems_ch01.html The amazing youtube video that helps to digest all the math going on and gets you used to material functions in Unreal Engine 4: www.youtube.com/watch?v=_y7Z0MbGOMw
0 Comments
A Quick OverviewHi! In this first installment of my Game In Progress blog I'll be detailing what work I have already been doing on Driftwood so I can bring you up to speed for future posts. Long story short, in early February I decided to re open the vault on an old game I had started the summer prior called "Driftwood Pirates." I was tired of not following through on long term projects so I went to Driftwood Pirates to find a new direction, proper scope and go at it until I came out with a game I was proud of. The game is now just called "Driftwood", here's what has happened so far: Digging Through Old WorkThe first step was going through all of the old documentation I wrote (game design documents, technical documentation, etc.) to salvage what I could and learn what it was that killed the project in the first place. What I found was that the most prominent "game killer" here was a miss assessment of scope. Past this I thought that since the game followed a contained story it would be fairly straight forward to make, and wow I could not have been more wrong. I almost laughed when looking at the old docs because this "straight forward" game called for cut scenes, level by level mechanics, and totally different location that just about everything in the game was a "one off." Despite this, I was still in love with all of the lore and story I wrote. I really felt like there was a lot of magic in the world I wanted to make, I just had to take it and put into a game that was way more manageable. "Specific" would be the right word here. That's where the "re-focusing" came in. Re-FocusingSo my original idea for the game was a linear 3D adventure game with a focus on platforming, seafaring, and narrative. Instead of trying to focus on three elements at once, I decided to pick one and make it the priority focus for the game. At the end of the day, the sea was what really tied the game together for me, so I chose seafaring and from there designed a game that featured a seafaring coconut whose sole purpose was to make a map of all the islands in the sea. I also took a page out of Monster Hunter's book and instead of trying to create a "grand purpose" for the player to embark on, I wanted to focus on just making the act of exploring and seafaring fun and interesting in their own right (the same way in Monster Hunter you're playing a day in the life of a monster hunter, nothing more nothing less). So here's the new and improved design (an overview)! Current Overview of the Game Design:
|
|