open.mp forum
[Plugin] samp-precise-timers ?: A timer plugin written in Rust - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Releases (https://forum.open.mp/forumdisplay.php?fid=13)
---- Forum: Plugins (https://forum.open.mp/forumdisplay.php?fid=32)
---- Thread: [Plugin] samp-precise-timers ?: A timer plugin written in Rust (/showthread.php?tid=576)



samp-precise-timers ?: A timer plugin written in Rust - bmisiak - 2019-05-21

samp-precise-timers ?
github.com/bmisiak/samp-precise-timers


Briefly
Developed for net4game.com (RolePlay), this plugin provides precise timers for the server. It is written in Rust, a memory-safe language.

Why rewrite timers?
I had a lot of safety concerns with some of the existing solutions. They weren't written with data integrity, memory safety or preventing server crashes in mind and seemed to have quite a few bugs. As privacy and safety is our primary concern at net4game, I wrote this in Rust, which combines high-level ergonomics with the performance of a low-level language. ?

Please check out the code to see the benefits. You might like Rust a lot. The code is much simpler than C equivalents, especially the ones which still use *char, free() and delete[] instead of modern C idioms such as std::unique_ptr, but as Rust has no runtime, there is no overhead ??

We would like your help! ??
Oh, and if you enjoy working on servers, we are looking for a team to help our international expansion. ??? net4game has been around for a decade as the biggest Polish server. We introduced a lot of innovations over the years and we are almost ready to become international. Shoot me an e-mail at [email=bm犇@net4game.com]bm犇@net4game.com[/email] if you're interested.

Downloads on GitHub
Also available on sampctl as
Code:
bmisiak/samp-precise-timers

On top of all of the above, I would love to help with?developing?open.mp!


RE: samp-precise-timers ?: A timer plugin written in Rust - JustMichael - 2019-05-21

Finally made it over here, huh? :D



Nice work, especially since it's written in Rust uwu


RE: samp-precise-timers ?: A timer plugin written in Rust - hual - 2019-05-21

Welcome, Misiek. Why not drop by our Discord as well?


RE: samp-precise-timers ?: A timer plugin written in Rust - Y_Less - 2019-05-21

Very nice.I'm impressed by how simple the code is compared to other versions.


RE: samp-precise-timers ?: A timer plugin written in Rust - ohmios - 2019-05-21

(2019-05-21, 05:36 AM)bmisiak Wrote: Oh, and if you enjoy working on servers, we are looking for a team to help our international expansion.



Great! And you have a mumble server too! I wish I knew Polish :(


RE: samp-precise-timers ?: A timer plugin written in Rust - Toretto - 2019-05-21

I don't know Rust, but the code is self-explanatory by reading the comments, great job!


RE: samp-precise-timers ?: A timer plugin written in Rust - SyS - 2019-05-21

Nice!


RE: samp-precise-timers ?: A timer plugin written in Rust - ShowTime - 2019-05-21

Finally, here?s a great plugin! Nice job???


RE: samp-precise-timers ?: A timer plugin written in Rust - Kar - 2019-05-21

Think I'll try it out.


RE: samp-precise-timers ?: A timer plugin written in Rust - Gudio - 2019-05-21

Great job! ;>


RE: samp-precise-timers ?: A timer plugin written in Rust - bmisiak - 2019-05-21

Thanks y'all! Definitely looking for some feedback. ??



(2019-05-21, 11:27 AM)ohmios Wrote: Great! And you have a mumble server too! I wish I knew Polish :(

FOSS all the way! Obviously for the international expansion we will need people who speak English, not Polish, so this is not a concern! ??


RE: samp-precise-timers ?: A timer plugin written in Rust - Hoxxy - 2019-05-22

There seems to be a problem with the Linux version.


Code:
[sampgdk:warning] Native function not found: GetPlayerInterior
[sampgdk:warning] Native function not found: GetPlayerVirtualWorld
[sampgdk:warning] Native function not found: GetPlayerState

This only happens when loading this plugin and only on Linux.
Other plugins I use and their order is as follows:?crashdetect.so mysql.so samp-previse-timers.so sscanf.so streamer.so regex.so
All of them are on their latest versions.


RE: samp-precise-timers ?: A timer plugin written in Rust - Markski - 2019-06-04

A small benchmark of this plugin.

https://gist.github.com/markski1/13444efd17e8e6d6637e10f186fafd0f

Might be the most accurate and consistent timer option, even than timerfix. Good job.


RE: samp-precise-timers ?: A timer plugin written in Rust - 6cadilab9 - 2019-07-29

(2019-05-22, 10:09 AM)Hoxxy Wrote: There seems to be a problem with the Linux version.





Code:
[sampgdk:warning] Native function not found: GetPlayerInterior

[sampgdk:warning] Native function not found: GetPlayerVirtualWorld

[sampgdk:warning] Native function not found: GetPlayerState



This only happens when loading this plugin and only on Linux.

Other plugins I use and their order is as follows:?crashdetect.so mysql.so samp-previse-timers.so sscanf.so streamer.so regex.so

All of them are on their latest versions.



Yes this started happening to me since I moved to this plugin, at first I thought that the streamer was causing the problem, but now..

I'm getting:



[sampgdk:warning] Native function not found: DeletePlayer3DTextLabel


RE: samp-precise-timers ?: A timer plugin written in Rust - RogueDrifter - 2019-07-29

For some reason, sometimes the timers are never placed, mostly when it's deleted and replaced.


RE: samp-precise-timers ?: A timer plugin written in Rust - Logan - 2019-09-09

(2019-07-29, 11:20 AM)RogueDrifter Wrote: For some reason, sometimes the timers are never placed, mostly when it's deleted and replaced.

True, haven't got time to figure it out?so I switched back to settimer. But after some time it started wierding up and not even starting timers.


RE: samp-precise-timers ?: A timer plugin written in Rust - Hype - 2020-05-18

Nice Misiak, I appreciate your honest work!

Love from Poland :)))