Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement CCollision ourselves #3183

Open
1 task done
Pirulax opened this issue Sep 11, 2023 · 2 comments
Open
1 task done

Implement CCollision ourselves #3183

Pirulax opened this issue Sep 11, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Pirulax
Copy link
Contributor

Pirulax commented Sep 11, 2023

Is your feature request related to a problem? Please describe.

Since a big perf. bottleneck on heavily modded servers is collision detection it should be improved as much as possible.
The first step is optimizing CCollision functions as much as possible.
GTA's functions use x87 math, which is slow, SISD code, but nowdays SSSE3 is supported even on toasters, so I'd advocate using that, or, even better, finding a library that already implements these functions and just copy pasting them [A good place to start would perhaps be bullet3?]. Perhaps enabling "vectorextensions" in premake would help too.

Describe the solution you'd like

See above

Describe alternatives you've considered

No response

Additional context

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
@Pirulax Pirulax added the enhancement New feature or request label Sep 11, 2023
@CrosRoad95
Copy link
Contributor

i though about one optimization we can make, if you freeze vehicle then depends on how much it sink into ground, it can couse extra lags even. Even worse if 2-3 or more vehicles are frozen and colliding with each other.

So my solution is to selectivly disable collision between vehicles and world when they are frozen. for example vehicle won't collide with world, but will collide width other non-frozen vehicles and players

@Pirulax
Copy link
Contributor Author

Pirulax commented Oct 7, 2023

Thats not the kind of stuff I was thinking about.
I just want to reimplement the algorithms using SIMD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants