Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Water Wave Physics 2d

Author
Message
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 23rd Aug 2020 01:56 Edited at: 23rd Aug 2020 02:10
i'm not seeing what i'm looking for in your function so, basic example of TMB (which, the goal is, to be independent of FrameRate())
[My Itch.io Home] | [#LowRezJamAGK2020]
[AGK Resource Directory] | [TGC @ GitHub]
[CODE lang=AGK] Your Code Here [/CODE] | [VIDEO=youtube] VideoID [/VIDEO]
brunuu
5
Years of Service
User Offline
Joined: 4th Jun 2018
Location:
Posted: 23rd Aug 2020 11:39 Edited at: 23rd Aug 2020 11:41
yes, but implementing this here is difficult, I tried several things in different parts of the code but nothing seems to work

I tried everything to this point.

this is the code without modifications




I tried to reduce the deltas according to the frame rate, but it didn't make any difference either
haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 26th Aug 2020 11:08


This is your original you can add really cool tweens to it as it is and not only save the visuals according to frame time but also.manipulate it with different stuff, as if the player is a bit bloody after getting a hit the water could change a bit reddish

So you can do this, just do not forget to updateAllTweens(getframetime()) at the main loop.




Hope this helps, now if the player is hit and a bit bloody
Simply Add setTweenSpriteColorRed/Blue/Green...

Before playing the tween, also maybe delete the tween or create it as global var before so it wont be reused but not deleted...
Nadav "Haliop" Rosenberg
Lets make the world great forever.
brunuu
5
Years of Service
User Offline
Joined: 4th Jun 2018
Location:
Posted: 26th Aug 2020 16:00
I like that idea a lot, I never found a use for tweens, nor did I have any idea that they could be used here


but something is not working well, I don't know what


haliop787
4
Years of Service
User Offline
Joined: 22nd Mar 2020
Playing: With reality.
Posted: 27th Aug 2020 07:48
Hmm i dont really understand this picture, can you upload a vid or a gif ?
Nadav "Haliop" Rosenberg
Lets make the world great forever.
brunuu
5
Years of Service
User Offline
Joined: 4th Jun 2018
Location:
Posted: 27th Aug 2020 12:54
The water sprite gets stuck up there and does nothing else, but I managed to get around it.
By changing a few things here.


But it still has the problem of accelerating with frame rate.

Login to post a reply

Server time is: 2024-04-24 02:42:51
Your offset time is: 2024-04-24 02:42:51