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

Server-side Qib implementation for players not using Noxesium #23

Open
trolliant opened this issue Oct 13, 2024 · 4 comments
Open

Server-side Qib implementation for players not using Noxesium #23

trolliant opened this issue Oct 13, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@trolliant
Copy link
Contributor

Using Qibs for speed/jump pad effects is very neat and simple to create but unless all players are required to use Noxesium wherever they're being used, you have to make some sort of server-sided implementation which gets really janky considering server-side effects override Noxesium's client-authoritative effects.

@trolliant trolliant added the enhancement New feature or request label Oct 13, 2024
@Aeltumn
Copy link

Aeltumn commented Oct 13, 2024

I would suggest fully disabling the server-side implementation whenever someone is using Noxesium. Originally I was going to have qibs require logic on both sides but the server is simply too delayed to catch up. Everything should run on the client and the server should take more of an anti-cheat approach where it simulates the client and reigns it in if it breaks what's expected. Although I would have the server just fully ignore Noxesium players for a basic implementation.

@SuperNeon4ik
Copy link
Owner

Thank you for your suggestions!

I guess it could be made so if a player is not using Noxesium the plugin would mimic the mod's behavior, but server-side.
Cool thing that idk if would work well: there could be some sort of a prediction mechanism, that would predict the position client-side using player's ping for non-Noxesium players.

Also, how should the plugin act as an anti-cheat? Is it something like it should check if the velocity matches what is expected, adding/removing potion effects server-side etc. when the according Qib effect is triggered?
I do agree that it could be omitted from the initial implementation.

@Aeltumn
Copy link

Aeltumn commented Oct 14, 2024

I think you're over-estimating how complicated a server implementation would be, a simple one would just use the interaction entities already used by the client, build a PRTree just like the client (much faster than 100+ bounding box intersection checks), trigger collisions for all players not on Noxesium (using their current position as far as the server knows), and for a nice universal implementation just run the qib effects directly but server-side, you can copy a bit of the code from the client mod although some of the velocity-based effects need to be replaced with packets directly like add velocity needs a TNT explosion packet.

The note about anti-cheats is only relevant for people using this in public events. The way Noxesium is set up is the client is entirely trusted to run the game, that means any hacked client can do whatever it wishes. If you have a set-up where there is a risk of players using hacked clients (like MCC Island), you need to develop your own anti-cheat custom built for the qib system basically. But this is beyond the scope of what people need currently, I would just put a warning on there saying it's dangerous to use the qib system client-side if you have a public server.

@SuperNeon4ik
Copy link
Owner

Yup, sounds clear! Thank you!

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

3 participants