Do you like my tutorials?

Then consider supporting me on Ko-fi

Talking about Flash and Users contributions.

I am very glad to introduce you Gravity: a flash game by Jon Dutko developed starting from my tutorials.

Gravity

The game is still in beta so Jon needs feedback.

It’s interesting how Jon designed some levels: growing balls, chasing pentagons, lightnings, mazes… can you beat all 30 levels? (I did it…)

Here it is the explication about how Jon made this game

Jon:

There are four main movie clip instances in -gravity-. hero, which is the movable character; wall, which is where all obstacles, both movable and unmovable; startpoint, the green spawnpoint for the character; and endpoint, the red trigger to move to the next level.

All coding is done under the “hero” movie clip. Bear in mind, I borrow heavily from your original code, tweaking small bits to fit the game. Without further adieu, here is the code:

onClipEvent (load) {
    yspeed = 0;
    xspeed = 0;
    power = 0.65;
    gravity = 0.1;
    upconstant = 0.75;
    friction = 0.99;
}
onClipEvent (enterFrame) {
    if (Key.isDown(Key.LEFT)) {
        xspeed = xspeed-power;
    }
    if (Key.isDown(Key.RIGHT)) {
        xspeed = xspeed+power;
    }
    if (Key.isDown(Key.UP)) {
        yspeed = yspeed-power*upconstant;
    }
    if (Key.isDown(Key.DOWN)) {
        yspeed = yspeed+power*upconstant;
    }
    yspeed = yspeed+gravity;
    _y = _y+yspeed;
    _x = _x+xspeed;
    _rotation = _rotation+xspeed;
    if (_root.wall.hitTest(_x, _y, true)) {
        xspeed = 0;
        yspeed = 0;
        _x = _root.startpoint._x;
        _y = _root.startpoint._y;
    }
    if (_root.endpoint.hitTest(_x, _y, true)) {
        xspeed = 0;
        yspeed = 0;
_x = _root.startpoint._x;
        _y = _root.startpoint._y;
_root.play();
    }
}

…and there you have it. Levels are divided into episodes by 10’s. Episodes are divided by scenes; so far, there are 3 “episode” scenes and one “intro” scene.

Gravity is not done yet; I hope to finish 20 more levels before sending it to the major syndicates (ie newgrounds, addictinggames).

What are you waiting for? Give him feedback and send me your works to have them published on my blog!

Never miss an update! Subscribe, and I will bother you by email only when a new game or full source code comes out.