|
acocq
|
 |
« on: November 12, 2008, 11:12:28 AM » |
|
When stacking boxes, I noticed that they tend to jiggle/wobble around, even though no external impulse is applied.
So here's the 64,000 dollar question .... how do you keep the objects from jiggling ?
(I've had the same situation in GameStudio and ended up using Newton, just because it works).
Cheers, Andreas
|
|
|
|
|
Logged
|
__________________________ Easy to use ... is easy to say ! 
|
|
|
|
pixel_legolas
|
 |
« Reply #1 on: November 13, 2008, 09:45:06 AM » |
|
Higher mass? 0 bouncyness? I have no clue because i don't touch GC right now  And i will not do it until a new update has come to life 
|
|
|
|
|
Logged
|
|
|
|
|
BigDaz
|
 |
« Reply #2 on: November 13, 2008, 05:54:27 PM » |
|
I've stacked plenty of objects and haven't had any wobbling at all.
What's in the box .opr file? What have you got DynamicsStepsPerSecond and MaxDynamicsStepsPerFrame set to?
And have you tried it the object without the interactive framework?
|
|
|
|
|
Logged
|
|
|
|
|
Squat
|
 |
« Reply #3 on: November 14, 2008, 01:56:24 AM » |
|
it's all in the dynamics steps. the more boxes, the more calculations and the more you need to up the values. I would start by confirming this by setting it to 200,200.
|
|
|
|
|
Logged
|
|
|
|
|
acocq
|
 |
« Reply #4 on: November 14, 2008, 07:35:06 AM » |
|
OK, setting 200/200 certainly calmed down my boxes  .... but is this the recommended approach (reiterative trial & error) ? Cheers, Andreas
|
|
|
|
|
Logged
|
__________________________ Easy to use ... is easy to say ! 
|
|
|
|
Squat
|
 |
« Reply #5 on: November 14, 2008, 01:24:05 PM » |
|
I would say yes, it's a decent approach that will net you decent results. Also, it lets you fit it into how much room you've left for the system after all your graphics and game elements are in. A stack of boxes on top of a primitive box floating in blank space isn't going to perform the same feat inside of a graphically rich environment.
Just remember Dynamics Steps Per Frame affects mainly the simulation speed, per second is the quality of motion. Both greatly affect performance.
Also remember that the heavier the mass on the boxes, the more compression that has to be calculated near the bottom of the stack.
I always test 200/200, just to see if the theory I'm running is sound. If they are, I tune it down until my structure basically collapses. I usually settle in around 60/30 or so. On the big stacks, I'm about 90/60 and any higher than that and I get nervous.
My game is going to feature hundreds of physics simulations. At first, I was planning on just giving them stacks of things to run around. Now, I'm thinking I want to try and make them into puzzles. For instance, a lot can be done if you tie one box into a script and call an event should it touch the ground, or land in a basket. Putting that box at the top of a weird stack and giving the player one shot to bring it down is actually a game. Not a whole lot of fun, but covers the basics of a video game. Actually, I take that back. Steven Spielburg thought an entire game based on that idea alone is fun and I'm pretty sure it's selling well. Smash Blocks or something? On the wii.
My real hopes is to incorporate AI into the sims so that you can hopefully kill them by bowling them over with stuff or have to block their path and whatnot. I've had fantastic results with AI's interactions with it so far. VERY cool to see a stack get taken down by a wanderer and have him push through it all. AND, he can't move it if he's really lightweight, so making him weigh 5000 turns him into the indestructahulk against 1 mass boxes. That to me opens up about 5000 pounds of game ideas.
Anyway, so far I've squeezed out maybe 20 or so test sims. Each and every single one requires different physics settings but I've got them all dialed for now. The good news is that this can be adjusted on the fly in the game. We can make transition areas for players to pass where it triggers a shift in calculations.
BTW, if you want to see something interesting, set the physics steps to 1,1.
|
|
|
|
|
Logged
|
|
|
|
|
gekido
Guest
|
 |
« Reply #6 on: January 14, 2009, 08:06:25 PM » |
|
Note that if you are changing / modifying the physics step, it will affect every script in the game that has any kinnd of physics manipulation going on - ie the character script, vehicle script etc. This would be something for 'advanced users only' really. We've set the default value that we created the scripts based on as 60/10 as this is a healthy 'medium' setting for physics accuracy versus perforance - if you start cranking up the physics step, things will become more stable, but will also take more processing time as the physics is being calculated more often per frame.
Very much a balancing act and you have to be aware of the potential consequences.
|
|
|
|
|
Logged
|
|
|
|
|
Squat
|
 |
« Reply #7 on: January 14, 2009, 09:53:58 PM » |
|
Yeah, that kind of thing is hard to notice until you implement into a new environment..ie, go from a test arena to your real world. If I change physics, all of my custom debris and AI characters also change behaviors. You would have to correllate your physics steps to your actual scripts. It wouldn't be that difficult to write in, but I think a bit of a puzzle to manage.
|
|
|
|
|
Logged
|
|
|
|
|