Thursday, May 9, 2013

Yellow Gem Spawning

Here is a video taken a few days ago of Space Invaliens(new working title, or Publishing title.. hmm?!). Check out the video and I will describe some aspects of it below.


Yellow Gem Spawning from Robert Toone on Vimeo.

This video was taken to show the spawning of the Yellow Gems. It seems like such a simply thing to spawn collectible items like these gems when the enemy ship is hit. But there are a lot of design considerations involved. I will go through just a few of them here.

How: Well once your bullet hits the enemy ship it will spawn a gem for you to collect. These have to float down the screen so they can be run into by your ship to collect them.

Problem: You can fire very quickly. So you can hit the enemy ship with 4 bullets so quickly that if I simply spawn all of these gems by placing them and letting them fall down the screen, they overlay each other. You cannot tell how many gems there are, which is a waste.

Do what: My solution to this problem was done in several ways. The reason for that is if I tried to solve this with just one method, it would be invasive, noticeable, and to be honest I didn't like it much. I decided to spawn the gems with a slight offset from the contact position. Then I also gave them a slightly different base speed plus a random amount to float down the screen, I also added in a slight drift. This allows the spawned gems to drift apart while coming down the screen.

Now you can see them come down the screen, and can count them. Which is what I was aiming for.

Once they are close to you ship you have like a magnetic or tractor beam effect on them, which draws them into your ship. This looks pretty good, or did once I added a shrink to it as they are drawn in.

Finally: You can see my deflector shield on the ship, though with me not hitting anything, there is not much to see, but IT does work very well, and works perfectly as per my design.

Laters
Da Voodoochief

No comments:

Post a Comment