jellyfish-like movement

0 favourites
  • 5 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • hey guys, i want my objects to move like jellyfishes. i was thinking of setting the bullet behaviour speed to (mySpeed * sineBehaviour) that they will slow down and accelerate when they move their .. tentacles .. or whatever you wanna call it :D

    but i would have to make a every tick event and i have 4 players, so it would be like:

    every tick -> set SineVariable to sineBehaviour

    every tick -> set movement speed of PlayersFamily to SineVariable

    Im not sure about how i would store that sine behaviour in a variable and I don't like those every tick events since i want to port to mobile devices and this is very performance consuming. (correct me if I'm wrong)

    I can't provide a capx at the moment because I'm not at home but I definetly will.

    has any of you got a great idea how to set this up properly?

    cheers! phil

  • This is an aesthetics question. We need to see how your jellyfish look like first. Beside, if you look at some games, they simply animate the whole jellyfish swimming in multiple frames instead. This would make the jellyfish look more dynamic and also eliminate the time required to make the jellyfish look right in programming... unless you have some other requirements.

    If that's the case, and you want further advice, please say so.

  • In the sine variable, on the properties menu you can choose motion type. Inside that dropdown list there is a "value only" selection. You can, during the game, get that value by using sine.value property inside the events. You can do MySpeed = object.sine.value or sth like that. I think this should solve your problem if I got it right.

  • yeah, i was thinking of something like this too but then i got worried about the hitbox/Collision Mask of my player model. i would have to leave transparant space and make the sprite bigger than it actually is and change the collision mask for every frame and i'm always a bit concerned about performance.

    the problem is, i can't really show you "my jellyfish" because my artists are damn lazy and want to get on with the game .. but thank's for your idea. i will try both ways and if I need further information/help, I'd contact you.

    Windwalker

    that's exactly what i was looking for. thank you very much!

    I'll compare performance and stability of both methods if i have enough time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could just crop the transparent area of the sprite if the origins are at the right place..

    That way you won't have unnessecary transparancy at the sides.

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