Gravity: a flash game by Jon Dutko using my tutorials

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:

ACTIONSCRIPT:
  1. onClipEvent (load) {
  2.     yspeed = 0;
  3.     xspeed = 0;
  4.     power = 0.65;
  5.     gravity = 0.1;
  6.     upconstant = 0.75;
  7.     friction = 0.99;
  8. }
  9. onClipEvent (enterFrame) {
  10.     if (Key.isDown(Key.LEFT)) {
  11.         xspeed = xspeed-power;
  12.     }
  13.     if (Key.isDown(Key.RIGHT)) {
  14.         xspeed = xspeed+power;
  15.     }
  16.     if (Key.isDown(Key.UP)) {
  17.         yspeed = yspeed-power*upconstant;
  18.     }
  19.     if (Key.isDown(Key.DOWN)) {
  20.         yspeed = yspeed+power*upconstant;
  21.     }
  22.     yspeed = yspeed+gravity;
  23.     _y = _y+yspeed;
  24.     _x = _x+xspeed;
  25.     _rotation = _rotation+xspeed;
  26.     if (_root.wall.hitTest(_x, _y, true)) {
  27.         xspeed = 0;
  28.         yspeed = 0;
  29.         _x = _root.startpoint._x;
  30.         _y = _root.startpoint._y;
  31.     }
  32.     if (_root.endpoint.hitTest(_x, _y, true)) {
  33.         xspeed = 0;
  34.         yspeed = 0;
  35. _x = _root.startpoint._x;
  36.         _y = _root.startpoint._y;
  37. _root.play();
  38.     }
  39. }

...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!

Improve the blog rating this post
Tell me what do you think about this post. I'll write better and better entries.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

» Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.
They can be easily customized to meet the unique requirements of your project.

13 Responses to “Gravity: a flash game by Jon Dutko using my tutorials”

  1. Article Feed » Gravity: a flash game by Jon Dutko using my tutorials on February 26th, 2007 6:00 pm

    [...] Read More Emanuele Feronato [...]

  2. programmedchild on February 27th, 2007 3:20 am

    Cool game it is verry fun I am also working on a game that is original and fun.

  3. abhilash on February 27th, 2007 12:06 pm

    from which link(or button) on the website you submitted your game.I have also made a 2player racing game but I cant find from where to submit??

  4. Emanuele Feronato on February 27th, 2007 12:29 pm

    abhilash: at the moment there aren’t buttons to submit a game.

    Send it to me at info(AT)emanueleferonato.com along with some explications like Jon did

  5. abhilash on February 28th, 2007 8:07 am

    emanuele:I didn’t understand what u wrote ‘info(AT)emanueleferonato.com.
    An error came ‘invalid page’ or something else.

  6. Emanuele Feronato on February 28th, 2007 10:25 am

    I mean you should send me your work by email, at info@emanueleferonato.com
    I put the (AT) to prevent spam, never mind…

  7. abhilash on March 1st, 2007 11:13 am

    @emaneuele:thanx and sorry for that noob question

  8. mousey on March 3rd, 2007 12:08 pm

    i really like the game ! hope it all goes well

  9. hasna on March 9th, 2007 7:00 pm

    nice game but why dont inprove the hittest with the one from linerider tutoriol part 3

    cleard all levels =)

  10. Lauren on March 16th, 2007 9:27 pm

    this game is tight
    J-Duck is a beast

  11. Kieron on March 17th, 2007 5:13 pm

    This is a very good game. There are some very original level ideas here, and some clever tweaks in the code to fit your game. I managed to complete it all, so maybe you should make some more, and much harder, levels. This could make the game appeal to more people, as it is a bit easy at the moment. Nevertheless, well done!

  12. flash noob on April 4th, 2007 8:26 am

    i dont get it. What are you supposed to do first? I know you have to draw something first before you can put the code in.

  13. sangokushi-taisen on June 16th, 2008 11:07 am

    hey that’s some cool game

Leave a Reply