The Daily Click ::. Forums ::. Klik Coding Help ::. Problems with pad & ball game
 

Post Reply  Post Oekaki 
 

Posted By Message

7Soul



Registered
  12/08/2008
Points
  167
26th November, 2008 at 00:29:14 -

Im trying to make an arkanoid-like game, but the bounce command seems to get the ball to a random direction, it doesnt bounce properly
Need some help here =/

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
2nd December, 2008 at 16:12:22 -

you wont get a decent engine from using the built in movements. Try searching this site for a decent ball mechanics im sure there are loads of examples.

 
n/a

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
2nd December, 2008 at 16:26:05 -

Try:
Run event once: Set altvalMoveY("ball") to 3
If altvalMoveY("Ball") >0: Set Y position to "BallYpos + altvalMOveY("Ball")"
If altvalMoveY("Ball") >0: Set Y position to "BallYpos - altvalMOveY("Ball")"
if Ball collides with thingy: set altvalMove("Ball") to "0-altvalMoveY("Ball")"

Then do the same but with the X movement

Then the ball wont randomly change dir, but keep the pace its going

 
dont make me divide by zero...

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
2nd December, 2008 at 16:34:05 -

Oops make that last one "0-absolutevalueof(altvalMoveY"Ball"))"
and the third one should be <0

Edited by Zephni

 
dont make me divide by zero...

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
3rd December, 2008 at 17:06:30 -

That is great code

 
Image

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

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
3rd December, 2008 at 18:13:14 -

Hmm. I may have to try that sometime...

 

  		
  		
   

Post Reply



 



Advertisement

Worth A Click