The Daily Click ::. Forums ::. Klik Coding Help ::. life like water
 

Post Reply  Post Oekaki 
 

Posted By Message

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
15th August, 2009 at 04:33:06 -

for a platformer, how would this be possible so that when you jump in it, it makes a splash depending on how you jump in, move with you while you swim etc, im just curious on how this would be done, cause ive got no idea.

 
[Game design makes my brain feel like its gonna explode.]

Neuro

Ludologist

Registered
  29/10/2006
Points
  437

Game of the Week WinnerVIP MemberI'm on a BoatPokemon Ball!
15th August, 2009 at 04:40:53 -

A lot of trigonometry. Angles, velocity, momentum...

 
n/a

nim



Registered
  17/05/2002
Points
  7233
15th August, 2009 at 05:50:50 -

I'd use a whole bunch of thin vertical active objects. There's a game called Sundown Shambles here that has the right idea.

Edit: Linky! http://www.create-games.com/download.asp?id=7435

Edited by nim

 
//

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
15th August, 2009 at 09:29:28 -

It is easy to 'fake' water when it is in a standing pool; as long as you don't want to have it do any swell physics stuff like pouring out when a plug is removed, etc. Those are complicated. But for simple splash effects, you can just create active objects to the sides of your water that work as "splash sprites", which travel in both directions as little ripples (ideally, make it a ripple "generator" that creates progressively smaller waves for a short second). If you're really enterprising, you could make it somehow subtract from the water overlay to create the 'sin wave' effect instead of merely being laid on top (I am working on exactly this effect in the project I'm in).

So for example:
"Upon hero hitting water"
"Create 1x water ripple facing left"
"Create 1x water ripple facing right"
"Set Y position of ripples to Y(Water)"

"Always:"
"Move ripple along X by a few pixels"

"After Ripple Animation is Over"
"Destroy Ripple"

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
15th August, 2009 at 11:11:11 -

http://www.create-games.com/download.asp?id=6472&sa=true has some water effects.

 
n/a

Marko

I like you You like you

Registered
  08/05/2008
Points
  2804

Has Donated, Thank You!Game of the Week WinnerVIP Member360 OwnerDos Rules!Happy FellahCrazy EvilI am an April FoolGingerbread House
15th August, 2009 at 11:18:43 -

Has anyone noticed the time adam posted that post?? Spooky!

 
Image

Subliminal Dreams. . ., daily gaming news and the home of Mooneyman Studios!
www.mooneyman-studios.webs.com

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
15th August, 2009 at 12:18:00 -

Splash particles

When the player hits the water (assuming you're not using the built in platform movement, but even if you are you can add in little formulas to count individual X and Y movement speed), create 5 splash particles.

water particle value A=0;
set A=1
set X position to player (add in +random(6)-3 for a little bit of randomisation)
set Y position to water
set value B and C to the players X and Y movement speed
set value D to random(100).

Water particle count is >0;
add 1 to value D,
Set transparency to value D
set x position to current position+value B (divide by 2 or 3 to slow it down a little)
set y position to current position+value C*-1 (this is important, it inverts the particle direction so it doesnt just continue down through the water)

Water particle value D>128 OR water particle hits summot;
Destroy!

Ripple
If you want to just drag and drop an effect in, create a 5x4 (so long as it's a rectangle) Perspective object at each end of the players impact on the water. Have each piece move to a different side and subtract from the zoom value. Zoom value<0; destroy!
But that's a real cut and shut method, but it's nowhere near as CPU intensive as Phizzies version.

I'd write up a bit on them wooshy ripple things (like the ones you can just about see on http://www.youtube.com/watch?v=j--8iXVv2_U at 1:55?) but that's a lot more complex and not off the top of my head!

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

nim



Registered
  17/05/2002
Points
  7233
15th August, 2009 at 14:33:17 -

I like the part in that trailer where the guy turns into a boat.

 
//

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
16th August, 2009 at 00:59:20 -

argh! its all so complicated! but i suppose i expected that lol

 
[Game design makes my brain feel like its gonna explode.]
   

Post Reply



 



Advertisement

Worth A Click