• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Slime

Wingnut

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
1,414
I could use some help on how to create some kind of slime in a 2d game. I've been looking into different physics-engines.
What other available options are there?. It doesn't have to be "realistic" at all, just some kind of slime that can stick to walls and bounce around

Do you think it would be possible to do using some technique?
 
Your game is in side view, right?
It is a bit hard to guess, what you are expecting as a result.
By "using some technique" you are saying that you want to avoid drawing the slime by hand including its animation frames, right?

You could combine some simple physics for bouncing around like it is done in the breakout example by ferdi with some particle effects to make the visuals of slime. For that I would experiment with the particles in ignitionX. I remember there is one that looks already a bit like plasma. For example using an image like the one for blobmonster and move multiple ones in circles while changing its alpha value or having slightly different color tones. Just be careful with setcolor on html target, as it slows down heavily there.
 
Thanks! Something like this is what I'm building now, it's hard to get the phsyics right but I'm using water and sand and trying to add softness to it. Right now it is not working as good as I was hoping but I will try a few weeks before I give up.

Slime.png
 
I never had any problem with SetColor on the web platform or any other. Cerberus X gives me 60fps on all tested devices, even when I use 2000+ SetColor commands per frame.

Circles themselvs can be slow when they are big but I can use images and stretch those :)
 
I never had any problem with SetColor on the web platform
I guess it is only an issue with mojo not mojo2 then. If you try the firepaint example by mak you'll see. Just uncomment all the setcolor lines.


Regarding your sketches you are trying to achieve much more complex slime than I was expecting.
 
Ah okay, Mojo1 does not have many advantages except that it has a writepixel that performs amazing on Android, my god it's quick. You can draw 640x400 with 60 fps. You'll get 4fps on other platforms. Android really sticks with old API I guess.

With Mojo2 you would use DrawRect with a size of 1,1 to do the same with (almost) the same speed. Not quiet but close enough. This was one of the reasons I chose Mojo2 for the game.


Nah I don't think it will be complex I just it need some time to get everything just right. I will use a simple water algorithm (that picks 4 tiles around the centered one and average them as the new centered one) to make things "bounce" when the slime lands again. The only thing that I really need to pay attention do is too make react a little bit better than the usual water algorithm and the idea that you describe with circle is really nice. I think it will work.
 
SetColor might be slow in Mojo1 because it uses displaylists which is considered deprecated in the Open Gl standard.

I've I think I've seen that in Mojo2 too when using Displaylists. Thay are always slower and are sensitive to states like SetColor. I will try to get some time and check that more carefully when I get home.
 
Back
Top Bottom