fredag den 8. februar 2013

Bees, Rain and more.

So video 10 has been out a little while, so I wanted to write a little about it, before it gets too old. But before I delve into video 10, I want to tell a bit about my newest video. The video is focused more on the work I do, instead of just showing the results and commenting on them. I will still continue the Phantobra - The Game series, but I figured I'd throw in a "Behind the scenes" video now and then, when I feel I have something to show. With that out of the way - Lets take a look at the 10th video.

This video includes the new Beehive mob, scrolling backgrounds, throwable snowballs, rain, wooden bowls, and a few more things, that the observant viewer might see :-)
Also, thanks to Dennis Panduro Hess for making an original music track for the game.
Check out his music at www.soundcloud.com/Panduro

What's New

- New Beehive and Bee mob
- Scrolling backgrounds (Work in progress)
- Throwable weapons - Snowball
- Rain
- Wooden bowls
- The first music track for the game!

Beehives and bees

When I sat down to design my next mob I wanted to use some new mechanics. This ended up with me taking a trip down memory lane, back to when I was like 8-10 years old, maybe a bit younger. Back then I was fascinated with bees, partly because I played this game where you helped a train full of cereal through some levels, where you controlled a bee that was responsible for adding honey and such to the cereal, but also because I loved honey back then. (Today I'm not so fond of it though :P )
So I decided that my next mob should be bees. Early in the design process I realized that having bees appear randomly didn't work for me. I then thought of having bee swarms appear as one mob, but that didn't agree with me as well. So I started thinking out of the box, and got the idea that, maybe the mob shouldn't be a bee, but a beehive, that shoots bees. Initially that was the way I decided to go, but I quickly realized that beehives would then turn out to be nothing but a cannon sitting in a tree shooting at you. The next logical step was then to make both beehives and bees as mobs. This way of thinking made things interesting. So I ended up with making the Beehive mob send out bees, whenever a player gets too close. The bees then follow the player until one of three things has happened:
1. The bees hit/sting the player
2. The be is killed.
3. The player hides under water.
If either 1 or 3 happens, the bees will return home to their hive. I decided on this behavior since bees usually only stings once (and usually dies from tearing off their stinger as far as I know), and they can't follow you under water.
The bees themselves do not drop any loot. To get anything you need to destroy the hive. The hive then drops  some honey, and occasionally some honeycomb. Honey can be consumed, which reduces hunger slightly. I am considering making it possible to bottle the honey for increased hunger satisfaction. If you gather enough honey comb, the plan is that you can create your own beehive, that produces honey over time. You might have to feed the bees something else, like sugar water or something.

Scrolling Backgrounds

Any platformer with respect for itself will have a background, and in most cases scrolling backgrounds. As with most things in this project, scrolling backgrounds is something I've never done before. I read up on it on the web, and it is, for the most part rather simple. The further away the background layer is, the slower it moves. Currently I only have two layers (not counting the sky), but I think I will be adding a third, possibly a fourth. The real challenge for me here was drawing the background. I am somewhat satisfied with the mountains I've made, but sometime in the future I might remake them. The hills in the foreground are undoubtedly going to be replaced, partly because they really aren't that great, and partly because I would like to have the hills separated into two layers. I will also change the backgrounds so that the react to vertical movement, at least to some degree. This way I could have a layer that might only be visible from a certain height. Small things like this adds to the depth and dynamic of the world.

Throwable Weapon - Snowballs

The first throwing weapon has been implemented. This, of course, also means that the throwing mechanism has been added. Snowballs are collected by harvesting snow with a shovel. One tile gives one snowball. This means that snowballs are easily replaced during winter. Snowballs deal very little damage, and are currently ineffective against everything, but bees. A bee that gets hit by a snowball, dies immediately. Snowballs are used off the quickbar, like every other item, and are thrown in the direction of the mouse cursor. I really like how they turned out, both visually but also on a physics level. There's no reason to try and explain how they behave, since the video does a good job of showing it.
Now that the throwing mechanism has been created, it's only a question of me designing new throwable weapons, like grenades, dynamites, darts, etc. I might have to add a weight value to the throwing weapons, which will allow me to limit the range of very heavy, or very light weapons.

Rain

Last time it was snow, now it's rain! Codewise rain is using most of the same code that snow uses, which made it extremely easy to implement. The sound for the rain, is just a placeholder, but it just felt too tame without any sound at all. As shown in the video, rain will increase the volume of water in existing water tiles, but won't create new ones. There's really not much to say about it. I am considering adding more weather effects like thunder, and maybe hail. I also need to create a "grey sky" for when it rains. It looks rather weird that it's sunny when it pours down (At least when no rainbow is present).

Wooden Bowls

The first "bucket" item has been implemented. The bowls, are able to pick up water, so that you can either drink it, or pour it somewhere else. I am still working out how much water, compared to a full tile, a bowl can hold, but this will be an easier task when I decided to add buckets and bottles.
Bowls stack in stacks up to 255, when they are empty. A filled bowl is not stackable. The reason for this, is to make better water containers worth more. Let me try to explain this further:
Lets assume that a bowl and a bottle can hold the same amount of water- Why would you spend your hard to come by glass on making bottles, when you can simply use wood to make a bowl? The reason is that bottles stack, bowls don't. If you decide to go on a large trek, you need to stock up on water. Let's say you decide that you need to bring 3 supplies of water. The bowls would take up 3 inventory slots, where the bottles might only take up one. This way I get to increase the quality of certain water containers over others, even though they can carry the same amount. Maybe crystal bottles can be stacked in stacks of 10, which makes them better for long treks. The same may be true for certain kinds of food. They might be equally satisfying, but the "better" food would stack in larger amounts.

Music!

The game has gotten its first exclusive music piece. This was made by Dennis Panduro Hess - Check out his music at www.soundcloud.com/Panduro
You will be able to hear the track in the video.

I think that was most of it covered for the 10th video. Thank you for reading. I know I've been behind with the blog for a while, but I am catching up. The next post will be a supplement to the new Phantobra Behind The Scenes series. The first video is already up, where I show off my level editor, and explain why I even have a level editor, for a supposedly randomly generated game. But enough from me, enjoy the 10th video, and again, thank you for reading!
Please do share this with friends, and the same goes for the video, if you know someone who might be interested in reading/watching any of this :-)
Enjoy!

Phantobra - The Game - Part 10: Bee Careful, It Might Rain