Experiments

ToDo List/Game

ToDo List/Game

Place a description in the Items field and put a time (in minutes) for how long the task will take and click Add Item. When complete, click the Complete button and that will strengthen your character.


Platformer

Desktop Version      Mobile Version

Player must try to collect the diamond. They can click/touch the screen to create blocks to get to the diamond. Enemies can destroy any created blocks on touch.
Created Blocks can be removed by clicking/touching them again.


Unity

Unity Game Tutorial

Monday, June 24, 2013

Lava Levels

Biggish update today. I decided to add a new level set. This new level set is the Lava Levels. It includes 10 new, random levels that introduces balls of lava that can kill the player and destroy blocks.

The balls of lava are created with an initial location below the viewing area. I then set a random timeout between 0.45 seconds and 4.5 seconds. This updates their vertical speed (negative) until they reach almost the top of the area. At this point, I set the speed for them to fall (positive).

Timeout:
setTimeout(function () {
    lavaB.velocity.y = -3;
}, Math.random() * 4500);

Update Speed:
if (lavaB.yPosition < top) {
    lavaB.velocity.y = 3;
}
else {
    if (lavaB.yPosition > bottom) {
        lavaB.velocity.y = 0;
    }
}
 

No comments:

Post a Comment