• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
  • entries
  • comments
  • views

Water, water, everywhere...

Sign in to follow this  
Followers 0


I've been working on water, slowly progressing forward. To those who might wonder, keeping track of, generating storing and updating water when you're dealing with a 5km planetoid (our current test planet) isn't quite straight forward. This is sort of a backpost, since i already had basic water in my last post. But this is a bit more in depth.

The water simulation we went with is not like anything I've read about. There were several methods I considered before going with what we have now.

First was particle water.
The pros: Good water simulation. Realistic waves, breaking etc. possible.
The cons: Hard to extract surface. Impossible to keep track of all particles on any significant planetary scale.
This was obviously not going to work for us.

Height-field based water.
The pros: Significantly less storage. Easy surface extraction. Decent water simulation.
The cons: Braking waves are harder (though not impossible). How do you do a height field based water on a spherical planet? The answer: not well. You can either split into 6 separate height fields, or try to create one with polar coordinates based on a even point distribution.
This is too bad because back before we went for an actual planet, on a flat 2d terrain, this was my top choice

What I went with:
Storing water in a 3d voxel density grid. Much like terrain.
Pros: Storage concerns were already figured out - storing can be done in same datablocks as we store terrain - thus its possible on a planetary scale.
Cons: It's not a very realistic simulation. It's hard to make huge waves.

There was also one other pro, which i didn't realize until later - updating water was made just somewhat easier by the fact that I stored water on a grid. Of course, the grid is NOT oriented with the surface, yet due to a range of densities [-127,127] - it was possible to achieve a perfectly smooth water surface anywhere on the planet despite the grid being all squirrly.

Here are some screenshots of the apparently misaligned grid and the non-the less smooth water surface:

vw_small.jpg vnw_small.jpg

And here is a video of the new water shader:


And a video with the older shader, but the only video of water spreading in a huge hole.

Update: video of the water on a small planet (200m radius)


For more info, and a demo of the project, you can visit at http://blog.milchopenchev.com.


Sign in to follow this  
Followers 0


Nice! Destructible terrain [i]and[/i] dynamic water.

If your spherical planet was generated with oceans on either side, and you dug a hole from the ocean straight through to the core and to the opposite ocean, would A) the water stop falling when it reaches the center of the planet, and B) would the oceans on either side drain (if there was enough space) or would they just generate water without lessening themselves?

Share this comment

Link to comment
Well, although we plan on stopping the user from digging through the core, mostly to try to limit data storage, it is currently possible. to do what you described. To answer your questions:
A) Yes, the water will stop falling when you dig through the core. It technically isn't falling, since it has no notion of gravity, but it is spreading. However it will stop when it touches another body of water.
B) The oceans wouldn't drain. The current method of water spreading is a copy-density method, or in other words, an infinite water.
The reason for this is that if instead of copying densities, the water densities got transferred (moved from one voxel to another) - even a tiny dig would potentially trigger a huge chain reaction that would propagate along the entire body of water. It would eventually die down because of the minimum density transfer (there's 255 levels of density, and the minimum to transfer is 1 density.) However it would still cause a huge water update reaction - which isn't computationally feasible.
On a bright note, this type of water spreading works great for oceans, seas, rivers or other large bodies of water where its unrealistic to assume you could drain them all.
We are considering the water spreading by the density transfer method for user-placed water. If the user has a bucket of water, it is a very finite source, thus it would be more computationally feasible to move all the density around.
Thanks for reading.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now