0 Members and 1 Guest are viewing this topic.

#### Spenceboy98

• LV7 Elite (Next: 700)
• Posts: 547
• Rating: +59/-2
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #45 on: November 13, 2012, 09:12:38 pm »
@Spenceboy98
The physics? Builderboy helped me a ton with that. Well, for collision, when 2 objects collide, it detects which axis they collided on, then, based on that, it uses an equation to calculate the velocities once they collide, based on current velocity, their mass, and the global bounce absorption.
Each objects has it's own X, Y, velocity X and Y, mass, etc.
Those are each essential to the physics engine.

Would you mind sending me the equation(here or by pm)?
I like milk.

#### nxtboy III

• Posts: 795
• Rating: +26/-1
• NXT!
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #46 on: November 13, 2012, 09:19:45 pm »
Ok, sure.

Well, I used Builder's equation.
Here it is (Do this 4 times, 2(1 for each object) for X and 2 for Y):
By the way, V is velocity, C is the bounciness (from 0 to 1), and so on.

V1 = (C*M2*(V2-V1)+M1*V1+M2*V2)/(M1+M2)

#### leafy

• CoT Emeritus
• LV10 31337 u53r (Next: 2000)
• Posts: 1554
• Rating: +475/-97
• Seizon senryakuuuu!
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #47 on: November 13, 2012, 09:30:32 pm »
It's the classic equation for the coefficient of restitution - if you want a more in-depth explanation, look it up on Wikipedia ^^
In-progress: Graviter (...)

#### nxtboy III

• Posts: 795
• Rating: +26/-1
• NXT!
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #48 on: November 14, 2012, 10:33:04 pm »

Any suggestions?

#### Camdenmil

• LV4 Regular (Next: 200)
• Posts: 121
• Rating: +4/-0
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #49 on: November 14, 2012, 11:33:51 pm »
Wow, I just stumbled upon this topic. have you tried grayscale? 83+ style 3 level grayscale looks good on my NXT.
It is bad luck to be superstitious.

#### leafy

• CoT Emeritus
• LV10 31337 u53r (Next: 2000)
• Posts: 1554
• Rating: +475/-97
• Seizon senryakuuuu!
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #50 on: November 14, 2012, 11:37:00 pm »
One thing I think you're ready for now is destructable blocks (maybe even pigs?) I'd probably give each block a starting health, and subtract from it each time something hits it by the mass times velocity. Unfortunately, there are some drawbacks to this method, but it should be pretty interesting to see what you come up with ^^
In-progress: Graviter (...)

#### nxtboy III

• Posts: 795
• Rating: +26/-1
• NXT!
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #51 on: November 20, 2012, 11:29:27 pm »
Thanks for the idea.
(lol pigs)

What are the drawbacks?

@Camdenmil
Well, yeah, I have made 4-level grayscale games for the NXT, its actually pretty awesome.

« Last Edit: November 20, 2012, 11:30:54 pm by nxtboy III »

#### nxtboy III

• Posts: 795
• Rating: +26/-1
• NXT!
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #52 on: May 14, 2013, 07:58:04 pm »
lol

#### Hayleia

• Programming Absol
• Coder Of Tomorrow
• LV12 Extreme Poster (Next: 5000)
• Posts: 3367
• Rating: +393/-7
##### Re: [NXT] Angry Blockheads!-Tower Crushing w/Physics!
« Reply #53 on: May 15, 2013, 02:38:45 am »
Was there a post in between or are you lol'ing because you necroposted ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.