physical response setting

Talk about making games.

physical response setting

Postby Nykos » Mon Dec 20, 2010 5:46 pm

Hey everyone, I'm making an arkanoid like game. I used physical response to make the ball bounce on bricks and walls.
Everything worked fine until I added the brick actors( they are al clones of the first brick but with diferent graphics for each one of them) and now the ball acts really weird. It slows down at some moments, accelerates then slows again depending of the brick it collide.

Another thing is that sometimes it doesn't bounce and continues it's way on the same direction, and so it breaks all the bricks on this trajectory.

I've tried various things to set up physical response's multipliers and all, but if I manage to stop the ball from breaking everything on it's way without bouncing, then it slows down.

Could someone be nice enough to explain me how to set up mass, final velocity multiplier please, or maybe it would be best to do some coding.

Thanks in advance, Nykos
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: physical response setting

Postby Imperialjester » Mon Dec 20, 2010 6:00 pm

i had this problem before too, instead of cloning the actor, draw the tiles. click on the actor then click tile then select what tile you want to draw the press esc when your done.
User avatar
Imperialjester
 
Posts: 185
Joined: Wed Dec 08, 2010 5:39 pm
Score: 10 Give a positive score

Re: physical response setting

Postby zxcvbnm » Mon Dec 20, 2010 8:23 pm

In the game demo's section I made a Pong game. The best I can say is to download it and look at the code. The author is Krenisis(me) and I did the code simple . If you have any more questions just ask.
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: physical response setting

Postby Nykos » Mon Dec 20, 2010 10:36 pm

thank you two,
Krenisis, I hope I found the right pong (viewtopic.php?f=6&t=8446&start=0)
I looked at the code and if I'm not wrong, you used physical response only for collision with the borders of the view, and different scripts for collision with the different paddles.
So first, Why didn't you use physical response on everything, is it to avoid those bugs I've been experiencing?
Then why do your paddles have two actors (like enemypaddle and enemyleft)
And finally could you explain those scripts with yvelocity and xvelocity, is it just an acceleration or does it change the direction the ball goes? And how did you set it up( +9,-14,etc...)
Thanks for helping me

Nykos
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score

Re: physical response setting

Postby zxcvbnm » Mon Dec 20, 2010 11:21 pm

Ok

1) Yes I used scripts to avoid the ball slowdown bug that occurs after a while in game editor

2) I used diferent scripts for the paddle too. I wanted the game to be realistic as possible. I would say if you play the game, it feels like your playing a real person.

3) Now for your main paddle you need to have 2 or 3 separate actors and parent them to each other. Let me explain for your main paddle the one you control , make 2 actors and label them
leftsidepaddle
rightsidepaddle

A)Now program the ball so if it hit left or right side of paddle it reacts properly ,using my code as a guide. Now program the leftsidepaddle same way I programmed mine. Program the right side paddle same way I did mine. This is a way of perfecting the ball movement so if it hits the right side of paddle the ball will go one way. If it hit left side it goes another way. This is much harder but will make your game that much rewarding and proffessional .

Most of all please take your time and dont rush. I used to rush and my games didnt come out properly. Take your time and your game will be mega fun!!!!! You probaly wonder wow I made this game and be hooked on your own game.
Check out Momo AlienStarcatcher , featured in apples new and noteworthy and has 5 star reviews!!!
http://itunes.apple.com/us/app/momo-ali ... 61779?mt=8
zxcvbnm
 
Posts: 248
Joined: Sun Aug 22, 2010 7:57 pm
Score: 10 Give a positive score

Re: physical response setting

Postby Nykos » Tue Dec 21, 2010 5:04 am

Wow, thank you so much for taking the time to help me Krenisis, that's cool.
I'll try it today
Nykos
 
Posts: 110
Joined: Sun Dec 19, 2010 11:11 pm
Score: 6 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest