Deathworm movement

  • Been fretting over and over trying to work out how to do this.

    kongregate.com/games/playcreek/death-worm

    I'm interested in the way the worm looks, just its movement.

    Seems to have two states of movement. Underground movement controlled by physics/bullet? I've no idea.

    When player launches worm into the sky I think arrow control is disabled while worm does its thing. And when it hits back to earth and regains movement its so natural looking.

    TLDR:

    I cannot figure out how this worm moves. And transitions between underground/sky.

    I want to use this effect on a drilling machine that drills underground for ore and launches upto the sky to recharge energy etc/collect special tokens.

    Any help, much appreciated all :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • try using the pin behavior

  • I guess bullet behaviour would do..

    on up pressed and is not overlapping sky add to speed.

    on left pressed set angle to: bullet.angle-1

    on left pressed set angle to: bullet.angle+1

    on collision with surface if angle is going up set gravity to very high

    on collision with surface if angle is going down set gravity to 0

    add the tail by pinning rope style and voila..

    Could need some tweaking..

  • but that pretty much sums it up

  • LittleStain

    dropbox.com/s/m7bxbl8buesee1y/problem2.capx

    tried to start your method, and on my screen when testing the head is just screwing up, no idea whats going on.

    :/

    Anyone able to help out too? :)

  • Man, deathworm was fun! <img src="smileys/smiley32.gif" border="0" align="middle" />

    I would maybe suggest using an array/loop, and having the position of the leading segments pass along the array to the end segements.

    So say, your worm is made of a head and four body segments :

    [head] - [part1] - [part2] - [part3] - [part4]

    On movement -

    [Part1] moves to the x,y & angle of [head]

    [Part2] moves to the x,y & angle of [Part1]

    [Part3] moves to the x,y & angle of [Part2]

    [Part4] moves to the x,y & angle of [Part3]

  • JohnnySix

    I'm not going to have a tail, I'm trying to find a way to get the same movement as the original deathworm :)

  • Rewrote your events:

    <img src="https://dl.dropboxusercontent.com/u/48563442/worm-movement.jpg" border="0" />

    in the bullet behaviour options set bullet speed to 10 for this example.

    And I think the set bullet angle should be the other way around, so change the minus and plus for that.

  • Big thanks dude, got me right on track with your help :)

    Will post updates to the game soon :)

  • Update like I said.

    dl.dropboxusercontent.com/u/123274811/Sharktest/index.html

    It works rather well, changed idea slightly and added some artwork of mine :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)