Can we make natural effect like this?

0 favourites
  • 10 posts
From the Asset Store
Wind effect
$2.49 USD
Animated wind effect for objects, grass, trees, etc.
  • Hi developers,

    Here is a question, i saw this game on google play store today, and its game play feels like real bubbles.

    Take a look here...https://youtu.be/j6aNk7hAe24

    I checked on their website, the game is made with unity, i want sonething like this in my game so i want to know, Can we replicate this effect on construct 2/3 ?

    Any suggestions are welcome!

    Thank you in advance!

  • Not easily I think, then again it’s probably not too easy no matter what you use.

    What I see are distorted spheres overlapping each other. I don’t know how you’d do that without 3D.

    You could try just drawing outlines with a bunch of sprites and make it flat between circles. That would likely require a lot of calculations.

    You can’t really draw filled polygons so coloring the bubbles isn’t really feasible.

    The motion could be done with physics pulling the bubbles toward each other. The soft body nature looks to be secondary.

    In short I don’t think construct has the tools to help do it as is. You’ll probably have to do it with a custom Plugin or something.

  • Maybe a combination of some line detection formula, and alpha threshold shaders on heightmap spheres.

    Then probably a few more shaders for the shine and warping.

  • R0J0hound

    is there any present plugin near to what we want to do here?

  • I don’t think there is any plugin that would help.

    My current idea is to use the physics behavior for the bubbles. Then just apply a force from every bubble to every other bubble to have them go together. They will just be rigid circles though, not soft.

    To make them soft the idea is to draw a larger circle around the bubbles and everywhere those larger bubbles overlap it would become flat. Easier said than done, I have a few ideas but they are involved and I’d have to actually try it out to see if it looks good.

    The circle outline could be done as a bunch of sprites as line segments. Filling these outlines could be done by triangulating the polygon shape and then placing two right triangle sprites to fill each triangle.

    As is construct 2 doesn’t have the drawing features we want. Namely drawing lines and polygons.

    There’s a few plugins that can help do that:

    Canvas- has drawline and polygon drawing

    Polygon- has polygon

    Paster- has draw quad

    Custom draw- has draw quad

    C3 has only the built in canvas plugin. I’m pretty sure you can draw at least filled polygons with it.

  • Here's a test. Basically physics with a collision radius smaller than the circle and some code to calculate the edges in between for a visual. Physics was done from scratch but the behavior could be used. For that you'd need two objects, one for the physics and one bigger one for the visual.

    dropbox.com/s/kjdf2evfxxelx1b/bubble_physics_test.capx

    The edge detection has issues though. It's probably as far as I want to go for now. I guess the next idea to tackle is coming up with a way to color each bubble individually or make the edges between circles curved.

  • R0J0hound Thanks a lot for the advice!

    i will check the file out!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • wow thanks man! i did not know you can do so much with array.... is it really important to learn array to make complicated games?

  • Arrays aren't always needed, but they can be useful if you want to keep track of a bunch of numbers. In this case I used it to keep track of the two end positions of a bunch of line segments. Most of the cool stuff is from math and logic.

    Anyways, I found a simpler way without much of the math stuff that works with colored bubbles. It uses the paster third party plugin. Basically it uses the "destination out" blend mode to slice off parts of the circles. You could do it without the paster plugin if you had a layer per bubble, but that would be harder to work with. Paster lets you draw to a image so you can use it for more complicated layer composition stuff.

    dropbox.com/s/60x8pkxyu8avx9y/bubble_physics_test2.capx

    Edit:

    It may be satisfactory as is, but some more work is needed to make clicking select the correct bubble. AKA we'd want to do out own collision detection.

    The more I fiddle with ideas, the more impressive the game in the op's video is. They clearly put a lot of work into it.

    Edit2:

    I tried adding an effect to make a the bubbles more soft, but eh, it doesn't look great.

    I'm more convinced a the bubble would look better with soft body physics instead of rigid. A simple way could be to make a bubble out of multiple smaller rigid bodies connected with springs and some forces to keep them from collapsing on themselves. Then we'd stretch the bubble over that so it looks distorted. The paster plugin's draw quad action could help with that. The bubble intersection logic would have to be reworked again though.

    It may be enough to just make the collision solver more spongy though. I guess that's the advantage of rolling our own physics, we can tweak stuff like that.

    Here are some older topics about soft body physics for possible reference.

    construct.net/en/forum/construct-2/how-do-i-18/bouncy-jelly-effect-43593

    construct.net/en/forum/construct-2/how-do-i-18/how-do-i-jelly-floor-from-the-85899

  • R0J0hound

    Sorry for late reply, something came up!

    Thanks a lot! it was very nice of you to do that! i will improve it to make it work smoothly :)

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