How do I find out the violence of an impact (physics)

Get help using Construct 2

Post » Mon Mar 06, 2017 8:16 pm

R0J0hound wrote:A lot of things are done every tick and saving an expression to a variable is negligible in my opinion.


And trust, your opinion concerning physics and C2 is more than enough for me :) I tend to overworry with performance (just at the end it often seems that i hadn't overworried that much after all).

Nevertheless,

cjbruce wrote:It is an artistic judgement call to determine what that damage looks like, and In the end, this is a lot more important than the math.


And that's so very true too. In the game's current state, collisions are destructive or not on a purely random basis... and it looks pretty good, curiously -- it's all fast and dirty and plain dumb luck does not look too weird or outta place. As i'm trying to introduce some maths (and so calculate real forces), well... let's say it needs a lot of tweaking still. If the force is a square it gets a bit too, hum, nonlinear -- results are so volatile. I'm experimenting now with other values, even if that's not so realistic. But i'd lie if i said the lazy random solution aint tantalizing... :oops:
B
23
S
11
G
6
Posts: 181
Reputation: 5,003

Post » Tue Mar 07, 2017 3:31 am

@megalocrater,

Food for thought, if you want to really go nuts with the math:

1. The damage can be expressed as proportional to the loss in kinetic energy, which is proportional to the square of the change in velocity.
2. In real life, this damage would be distributed over a volume. How this volume of damage appears from a 2D side view could be completely unpredictable depending on the internal structure of the car and where the car was hit.

In the end, the random approach might be the best-looking model of all. I would totally go with it if it looks good. :)
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
48
S
14
G
20
Posts: 375
Reputation: 14,588

Post » Tue Mar 07, 2017 11:02 am

When I want to cause damage I usually throw in some fire and explosions effects. Hell that looks good in any game lol!
Banned User
B
27
S
7
G
58
Posts: 1,229
Reputation: 34,790

Previous

Return to How do I....?

Who is online

Users browsing this forum: Fenix18, Madsoggytoast, Yahoo [Bot] and 52 guests