SAPhysics Simulation Acceptance
#1

Hello,

I have been working on a project called SAPhysics, which has a purpose of simulating physics server side. It is more like a research project, researching how to cope up 2015s physics engine with 2004s game. Though, after a lot of head banging I found a way to simulate objects without encountering an ackslimit issue. It is nature's rule that if there is something good, there will obviously be something bad to balance the cycle. Here the good thing is simulation does not give any ackslimit errors, and the bad thing is simulation lag (not the server lag).

Now, the simulation depends on number of objects. Lesser the objects, smoother the simulation. I had done some stress test on the simulation and it works without any issues. The main purpose behind creating this thread is, I wanted to know whether this kind of simulation lag would be acceptable or not. The video below will help you out to decide. If you want to use 20 objects, the simulation will not lag much, as compared to 40 objects.

To be noted, the video below shows simulation of 40 objects. Under the influence of gravity it will be a bit laggy because it will keep on accelerating vertically downwards. We can assume horizontally moving objects will lag less.

[ame="http://www.youtube.com/watch?v=zgY1YeYa99o"]SAPhysics Simulation Acceptance[/ame]


If the "Acceptable" bar exceeds "Not Acceptable" bar, I will look forward to this project.
If not I won't regret because it was kinda research project.

The poll will end after 7 days.

Thank you,


-codectile
Reply
#2

I'll be the first to ask a question....

Does the performance depend on the size of the objects or not? Because if not, I'd say GO FOR IT.
40 objects is a lot, I doubt that we will use that many objects when we apply the system in our scripts.

Even if it does, I'm curious about how far can we go with this. So, my answer is hell yeah!
Reply
#3

It sounds awesome, but I don't think this kind of simulation is healthy for the server, it requires lots of calculations and it lags with a really low amount of objects.
Reply
#4

@HeLiOn_PrImE: If you want to simulate 10 - 20 together, no problem at all.

@IstuntmanI: Calculation is handled on the server side, if your server provides good processing speed then there might be no problem.

Though, I will suggest simulating objects dynamically.
Reply
#5

I think the key to this system is to dynamically create/destroy simulations that way there might be peaks of several simulations but they don't last long. For instance throwing an object on the ground for an item system that simulation might last 2 seconds but the server will never have more than a few people tossing items at any given time.

So I think this system is best for doing simple one object simulations against the ColAndreas collision world. I think you just need to adjust your way of thinking slightly and address which problems are practical. Complex continuous simulations is not very practical in terms of SA-MP's capabilities but short duration simulations such as an explosion which blasts say 6 objects with a duration of less than 10 seconds is very practical.
Reply
#6

Bullet is full of amazing features, I recently got to know about a feature which excludes collision objects from the simulation and never simulates them until we command.

As I have said, this is kinda research project. There is a chance for a better way, always.


Simulating simultaneously 40 objects was just a stress test.
Reply
#7

Sounds good, I am just trying to be realistic since it is known which conditions stresses the system the next step would be to devise a methodology of handling dynamic simulations as I mentioned. I don't see this being a problem if the focus is on simulating upwards of 10 or more objects during during peak demand.

What I would like to know is how you are running the simulation without causing the server to pause during the simulation step ?
Reply
#8

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Sounds good, I am just trying to be realistic since it is known which conditions stresses the system the next step would be to devise a methodology of handling dynamic simulations as I mentioned. I don't see this being a problem if the focus is on simulating upwards of 10 or more objects during during peak demand.

What I would like to know is how you are running the simulation without causing the server to pause during the simulation step ?
The thing which stresses the server is setting position and rotation of objects. Sending to many data per second causes ackslimit problems. So, I solved this issue by giving some time to the server.

There are few more ways left to try out, lets see what happens.

I nearly, disclosed my trick
Reply
#9

I voted unacceptable, not because I dont like the idea. I really do like the idea and it is great to see a feature like this, however it is unacceptable in its current state. I'd advise to do what Pottus said and implement dynamic simulation, maybe even a stack based simulation system, where the stack isnt just 1 simulation big and also adding levels of abstraction. If there are numerous simulations running, such as more than 40 objects, abstract the physics simulation to a point where it is just about acceptable physics but no longer realistic.
Reply
#10

Simulation cannot be dynamic but simulating objects can, you can activate and deactivate on your command.

@konverse: I shall not promise anything.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)