Basically you would need to have each different object as a physics shape and you would need an intial ball shape. Then whenever you hit a new object with your ball you add a joint between the ball and the object you hit.
You could also try the Chipmunk Phizix extension, but Box2D is going to be bigger an better. The beta version works extremely well at this stage aswell.
Very helpful advice, could you send me the extension? I already asked him for a beta but he hasn't responded yet.
I could send you the beta, but since I haven't finished the documentation I'm not sure you will understand it. Prior phizix knowledge is kind of a requirement to understand the Box2D version at this point.
Graw dammit I didn't read the whole thread. Right. It's definitely possible to do but with all them rotations it'd need to be made with HWA.
Just mind sketching this... It's possible if Active 1 collides with the ball and its value A is 0, set to 1 and value B to the distance from the epicentre of the ball. When value is 1 set angle to the angle of the ball and (this bit will need a maths person) set the position to some formula running off the distance value.
Then, if a object with value A:0 hits an object with value A:1, then turn that into an A:1 object too. No physics required but there will be resource suckage from all them rotating actives.
Originally Posted by Dr. James Graw dammit I didn't read the whole thread. Right. It's definitely possible to do but with all them rotations it'd need to be made with HWA.
Just mind sketching this... It's possible if Active 1 collides with the ball and its value A is 0, set to 1 and value B to the distance from the epicentre of the ball. When value is 1 set angle to the angle of the ball and (this bit will need a maths person) set the position to some formula running off the distance value.
Then, if a object with value A:0 hits an object with value A:1, then turn that into an A:1 object too. No physics required but there will be resource suckage from all them rotating actives.
Okay, I think I see what you're saying. But some objects will be obstacles until you're big enough (like mushrooms) while others need to be background until you're big enough (like buildings)
so there has to be a way of measuring the ball by how large it is. Give it a counter or something, and have every object have an assigned size, add that to the ball....
still, the ball has to have a certain physics aspect to it - its kind of bouncyish and it needs to be able to roll like a real ball (like in the video). also, would jumping be a problem?
i sort of understand what you're getting at here but not entirely.
and yeah, i figured the rotations would be the most difficult part. since there will be SO MANY objects in the katamari, perhaps a system could be devised that deletes objects once they become too small to notice anyways. it could be as simple as "if katamari is > than 8m, delete all objects in katamari under 2cm" or something like that
there's the sticky object from andos, I think. It doesn't work under hwa. Or you could use the normal runtime with A/P animated objects and as james said, once they touch the object, record their position into two values. another thing that could be done in an easier way is to simply take a picture of the ball with the added object and then display it in the active picture object. you could take the screenshot outside the frame and granted, though it will pause for a little, you could make it come off as a bonus. it can be done in mmf2, definitely.
Originally Posted by Edron there's the sticky object from andos, I think. It doesn't work under hwa. Or you could use the normal runtime with A/P animated objects and as james said, once they touch the object, record their position into two values. another thing that could be done in an easier way is to simply take a picture of the ball with the added object and then display it in the active picture object. you could take the screenshot outside the frame and granted, though it will pause for a little, you could make it come off as a bonus. it can be done in mmf2, definitely.
Originally Posted by Canto Don't think the sticky object would help, unless it handles rotations; I have no idea whether it does or not.
The issue you have is how do you know how big the ball is? When things get stuck, how will it know to form in the shape of a ball?
I'm pretty sure it does - i could confirm it if someone could compile that for me, however it must have an object limit... but like i said earlier, there's got to be a way around it, like deleting smaller objects after you don't need them.... however i think it would be easier for them to have the appearance of being stuck to the katamari rather than actually being a part of the katamari, so you have a single rolling ball object rather than.... tons and tons of objects all moving as one mass.
I'm not sure about how it would "know" to form the shape of a ball.... perhaps if you made large awkward objects stick more towards the center? I'm not sure, however they did it in the video... I'll have to watch that again.
But also it would naturally take the shape of a ball if it is constantly rolling when picking things up.
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
22nd December, 2008 at 00:50:43 -
Some of the other methods here might work to a degree, but if you want anything like the video you're going to have to code a certain aspect of physics into it. If you look at the video the ball 'falls' into holes and contours around the background. There is an amount of friction and pressure on each object which allows the ball to move like this. You could do something similar by using a ball that collided with the ground and had a larger radius as it collided with other objects, which would be simpler, but it wouldn't be the same effect. And since you "intend to get this done and want it to come out excellent", a physics extension is probably your best bet.
If you've messaged Werbad then I'm sure he'll get to you in due time. As long as you've got experience with the chipmunk engine then you should be fine.
Originally Posted by Assault Andy Some of the other methods here might work to a degree, but if you want anything like the video you're going to have to code a certain aspect of physics into it. If you look at the video the ball 'falls' into holes and contours around the background. There is an amount of friction and pressure on each object which allows the ball to move like this. You could do something similar by using a ball that collided with the ground and had a larger radius as it collided with other objects, which would be simpler, but it wouldn't be the same effect. And since you "intend to get this done and want it to come out excellent", a physics extension is probably your best bet.
If you've messaged Werbad then I'm sure he'll get to you in due time. As long as you've got experience with the chipmunk engine then you should be fine.
With the chipmunk engine?
what?
Which one?
I haven't been on the MMF2 scene for a while so a lot of stuff has passed me by.
But your advice has been very helpful, thanks. And yeah, a physics extension seemed to be the best option presented - however, Werbad said earlier in this thread i probably wouldn't understand the extension.... I'm hoping he'll still send it to me. I think in the video, there's a seperate entity for how the ball acts and how it looks - its not directly rolling based on the objects inside it, it rolls on a circular "ball" inside the objects, which is why they "float" beneath the ground and fill up holes. Otherwise it would become difficult to roll.
Even when I do get the extension though, I'll likely be confused as hell so your guys help would be very welcome
you'll be in the credits if that's any comfort. haha.
n/a
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
22nd December, 2008 at 04:39:09 -
In that case, if you're new to the MMF scene, then I would reccomend using the Chipmunk Phizix extension which is available for MMF. It will be suitable for this type of game. You can just use a ball shape which rotates and grows in diameter and have the objects stick to it as a graphical kind of thing. Good luck
Alright, so I downloaded and played around with the objects, and as predicted, I have no idea how to use them.
The sticky object does deal with rotations and angles, which is good.
But for the physics of the actual ball itself, I should probably use Box2D.
I'm not sure what I should use for the sticking. I only want it to appear to stick, basically - they don't need to be actual joints, they just need to become "attached" to the ball. The ball also needs a slight bounciness and lack of gravity and of course needs to be controlled with WASD.
I'm thinking perhaps the sticky object would be easier for this...
But I'm not sure how to create such a ball with Box2D