About Water in your Game

There are a lot of ways to add water to a level and for now I am going to show you a really basic way to do it. Later in this tutorial we will cover making water that looks great but that involves importing graphics into your game. And that is the next section of this tutorial so just hang tight, you are making progress

There are two different concepts to know when it comes to adding water to your game. Do you want the water to be passable? In other words will the characters be able to walk and swim in it? Also, do you want it to be transparent? Can the player look into the water and see the bottom of the pool? The answer for us is yes to both these questions and this will be the typical answer in most of the water you make. But just be aware that you can make the water, or other liquid such as lava, not passable so it can be walked on. And you can make it opaque so it can't be seen through. This idea of transparent is also important if you want to put fish tanks in your game. Let's add a new brush to the game. This is will be the cube of water in the pool.

Hit the Modify templates button The modify templates button

Now in the left side of your screen in the control panel you see a pull down menu under the heading of entities.. Pull down this menu and select "liquid" And a new cube shows up in the game. If a cube doesn't show up then just pull down the Tools menu and select New Brush | Cube. Now in the right side tools panel make sure you select Customize Template and check the button for solid. This should be already set to solid because the last brush you made was solid but check it for practice.

Now, Using the Scale Brush and the Move Brush get this new square to fit nicely into the pool. Remember to use the camera button to move your views around so it is comfortable to work on. You can zoom in and work on it so it is nice and easy. Now that you have it the right shape hit the textures tab on the left, find the dark texture for a muddy water look hit the select button then on the right side of the screen hit the "Add to World" button and your new water block appears.

Make the Water Passable

It has some of the characteristics of water but we are not done. Single click on your new block and its edges turn green and the Brush attributes box comes up on the right of the screen.

Make these selections: Under Type check the Empty button and under contents check the Water box. This makes your new block of water passable so when the player steps on it he actually goes into the water.

Make The Water Semi Transparent

The face attributes menuNow we want to be able to see through the water so with the block still selected and its edges green press the pagedown button on your keyboard. This scopes down to work on the faces of the box and it brings up the face attributes menu.

You can see that menu here.

Now at the bottom of this menu there is a checkbox for Transparent. Make sure you put a check in this box.

And under it the transparency value is set to a default of 255.

Delete this 255 and input 175. The lower this number the more transparent the water so you may want to experiment with this number by previewing the game and then setting it.

 

This properties box doesn't have an ok button. You just have to input the number - simple as that - and the program knows what you have done.

 

 

A pool of water in the game

Here is my pool of water that is pretty dark but you can see the square pattern of tiles at the bottom vaguely through the transparent water.

When you play the game you will step right into the water and you will hear the swishing of water as you walk.

One other nice thing about water is that if you pagedown again so you are back to normal block editing and you see the Brush attributes Panel you can select the checkbox called "Wavy" and the water in the game will ripple. This is a pretty cool effect. I recommend you give it a try to see what it looks like.

In the Brush Attributes control panel after changing to Wavy don't forget to hit the apply button.

OK, that's enough about water for now. You have a general concept of how to do it and we will do more water effects and will do some water that looks great. For now you can do basic water, make it passable, make it semi-transparent and even make it wavy! So you have actually come a long way.

For the next part of this tutorial we are going to learn how to import your own graphics right into the game so you can use them. This way you can find nice graphics and images or even make your own then use them in your game. To do this chapter we are going to get a nice blue water color imported into the game so we can do better water.

Continue with the Tutorial Where we learn how to import graphics into the game.

 

Latest Articles

Free Game making programs - to help you make games without spending money.

Writing quests for video games. Tips, ideas and techniques

A look at video game design - This shows you the process of how a game is designed and I take you from idea to game.

What is the most important thing you need to make a video game? It isn't what you think

Who do you contact if you want to get a job in the game industry? I have advice and more.

Video Game Design - What is it and how is it done?

Kids Make Video Games: A Guide for kids of all ages in game making.

A look at Assassin's Creed II - From a game makers perspective. This game is remarkable and there are some great lessons to be learned from it when it comes to making video games

Into the Looking Glass: A History of video games including a video. How did it all start?

A look at the various Game Design Software Packages - Help finding the one that's right for you

Free Resources for making video games. If your budget is Zero these resources are for you!

Three New Lessons in the Milkshape 3d Animation Tutorial: Animate, Link skeleton to skin, and animate both

So You have a great idea for a video game! What do you do now? - Some solid advice on turning an idea into reality

AMD New Chipset and Processor breaks the barrier in gaming realism - games that look as good as movies are coming

How to write a video game players guide - Writing a guide is an easy way to start learning about how games are made.

 

For absolute beginners

All Materials, unless otherwise stated are Copyright©2000-2014
Kalif Publishing

sitemap
xml sitemap