×

Warning

Empty password not allowed.
Welcome, Guest
Username: Password: Remember me
Welcome to the Dogfight forum!

Tell us and other pilots who you are, what you like and why you became a Dogfight pilot.
We welcome all new members and hope to see you around a lot!
  • Page:
  • 1

TOPIC:

Major update on physics coming 1 year 6 months ago #387193

  • zuperman
  • zuperman's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Posts: 4418
  • Thank you received: 13142
As most of you know, I use Unity to develop Dogfight Elite. Internally, Unity utilizes PhysX to do all the physics work. This library is super fast and perfect for mobile. The problem is that it is a non-deterministic physics system. What does this mean?

Well, it means that for the same input you will get different outputs. Let’s give an example.

Imagine having a large truck filled with ping-pongs balls. You drive up a mountain and drop the balls from the cliffs. If you want to simulate this in Unity you can do it and it will look fantastic.

Now, every single person here download the simulation and they will find out that each particular ball will land at a different location that where they landed for me. Some balls will be static in my simulation after a few bounces, and for you, they are still bouncing down the hill and colliding with different objects.

How come? We have the same program. The same code. The same balls and physics system. And each of us will have a very different outcome.

that’s the problem with physx. The issue is that it utilizes “time” to calculate and in a way that is not completely correct. Since my iPhone is different speed than your pc, or even having the same iPhone but small differences in speed due to some other apps running… the results will always be different.

So what? You may ask.

Well, this is a huge headache for multiplayer systems. My airplane moves differently than yours. I may turn slightly faster or slower than yours. Some people always wonder how come “you turn faster than me!”. Well, this is a large part of the explanation. Nobody has a custom code or some magic “gift” I gave to them (some people suggested that). PhysX by design was not thought for multiplayer.

As developers, we apply numerous tricks so that everything is synchronized and everybody sees the same behavior. We apply techniques like roll backs and interpolation. That’s when you see airplanes moving faster or slower all of the sudden. We are doing lag compensation and adjusting the physics world so that everybody sees the same.

But there is a limit to this and nowadays almost every phone can run a proper system. Many of us complained to Unity for years and they finally wrote a deterministic physics system. It should help solve these issues. The problem? I have to completely rewrite all physics in the game. And as you can imagine, it is a huge part.

I will be focusing on doing that for the next month. Funny thing is that although it requires a lot of work, you will not “see” changes. They changes are not visual. But this should help a lot for everyone to have the same game experience.

keep reporting bugs and asking for features. I will try to get as much done between now and the physics update.
The following user(s) said Thank You: Marko99, [NLR] The Blue Fighter, Acegirl, Gannet, ~Bandit~, DireWolf{WP****}, Grandpappy 9+1 {WP}, nebular, chickenlittle, frits and 5 other people also said thanks.

Please Log in to join the conversation.

Last edit: by zuperman.

Major update on physics coming 1 year 6 months ago #387203

  • Gannet
  • Gannet's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 2019
  • Thank you received: 4449
Awesome!
Don't stop Zup, you love this stuff.
.
 
Attachments:
The following user(s) said Thank You: Acegirl

Please Log in to join the conversation.

Major update on physics coming 1 year 6 months ago #387211

  • DireWolf{WP****}
  • DireWolf{WP****}'s Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 2173
  • Thank you received: 4958
Great news, Sir Zup!
The following user(s) said Thank You: Acegirl, frits

Please Log in to join the conversation.

Major update on physics coming 1 year 6 months ago #387222

  • [NLR] The Blue Fighter
  • [NLR] The Blue Fighter's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Nothing is Impossible.
  • Posts: 4655
  • Thank you received: 9789
Zuperman this game is so engrossing that once you start playing it you keep going. Making friends, banter amongst players, and sometimes even fights that end up blocking the player to calm down the situation are all part of this wonderful game.Having said that everyone knows how hard and time-consuming it is to keep it running with endless devices and ever-changing technology on a day-to-day basis. Managing all these single handily is a hell of a task and so far, you have done it beautifully.The best part is you might not know how many young minds you may have inspired to become gaming programmers & developers.So, keep going and take good care of yourself.
The following user(s) said Thank You: Marko99, Acegirl, nebular, chickenlittle, frits, Pegoud

Please Log in to join the conversation.

  • Page:
  • 1
Time to create page: 0.840 seconds