Leaderboard
Popular Content
Showing content with the highest reputation on 11/08/21 in Posts
-
Hello MTA community, for quite a while I have been thinking about the Lua language. I think that we can all agree on this fact: that the Lua language is simple and beautiful, especially inside MTA San Andreas. Would any of you be interested in a service that lets you compile Lua directly into machine code, for example into a stand-alone PE executable file? I am not talking about srlua or LuaJIT, rather a completely new application/web service where you could queue your Lua code for compilation. There are major benefits to compiling to machine code rather than Lua bytecode. When I'd finish this project then I would implement a C++ interface and port it into MTA aswell. Benefits of machine code translation Speed boosts during script execution due to native format of the code Code cannot be reversed into Lua anymore Lua code optimizations that the reference Lua compiler does not perform (constant optimizations, function inlining, computation node grouping, loop unrolling, etc) The ability to market your programs I am thinking about a future business partnership with the MTA team where electronically-signed machine code translated from Lua would be securely run on MTA clients. The modernization of the Lua component would bring more freedom in designing the future scripting possibilities too. If you guys voice enough interest for this product then I would be greatly encouraged to create it. There is no such product available yet and it's creation would be both interesting and challenging. What do you think, community member? - Martin2 points
-
That leads to the well known problem of syncing. How do you sync physics behaviour between clients it ultimatively depends on clients FPS? What I was refering to is make a simple collision mesh of the default SA map, load it completly or in chunks into server, but without built in GTA functions as you will quickly hit the limit. Once the server has such a navigation mesh, syncing of elements (vehicles/projectiles) could be offloaded to server for more accuracy rather than depending on clients sync.1 point
-
1 point
-
1 point
-
1 point
-
I don't think we are fully aware of the risk associated with big features like this: Is the proposed API easy to learn for scripters? Has the Bullet API been properly used according to documentation, best practices? Is there any exploit inside the Bullet collision framework that could be escalated to crashes or worse? What about longterm support of this feature? Will OP be around to keep the code up-to-date? Are there any estimations about the cost/benefit tradeoffs? But maybe this is being too cruel to new feature proposals. Consider the amount of time that new content like this takes for development. Verification should take less time, if there was an elected board of experts for decisions like this. Possible Benefits: Bullet Collision is known across the internet so we could attract scripters that want more "bang for their buck" Encouragement for working on new features can be increased1 point
-
The issue with Lua bytecode is that it can express more than can be written down with the Lua syntax. I agree that junking about with the bytecode will just lead to problems so I suggest multiple protections against it: Reject execution of unsigned Lua bytecode binaries; instead allow self-signed ones for testing purposes For special cases where "exploit-y" bytecode is used we slow down execution with safeguards such as Lua stack virtualization with pre-and-post zeroing-guard No Lua VM will be shipped with my approach. I will be taking personal responsibility and liability for any exploit found within my product that leads to severe casualties such as shellcode execution. I have much experience in this field and am performing research to mitigate any possibility prior to it occuring. Suffice to say I am taking this topic of security very seriously. Signed code execution is a great security feature. If the MTA team signs all binary scripts that run on both MTA servers and clients then only code that comes from official compilers, not binary/machine code twisters can run on MTA software. It comes with the burden of maintaining security certificates and their recommended properties (due-by date, strong ciphers, etc).1 point
-
Really not trying to flame or whatever, but sadly i doubt that this will release ever. Also, nice to see you back, The_GTA!1 point
-
ههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههه اتفق اتفق وبشدة1 point
-
Hi! The idea is really good and would be awesome to have something like that in MTA, since .luac doesn't provide full protection (ofc). But... I think we don't have it for good reasons, just like bytecode isn't safe and the Lua VM can be exploited "easily". Thats why Roblox removed bytecode support in 2012: https://blog.roblox.com/2012/08/bye-bye-bytecode/ Could these vulnerabilities be fixed or exists at all with your method of compiling directly to machine-code?1 point
-
1 point
-
Dear MTA community, this resource renders mathematical formulas in scientific notation. It does solely contain internal Lua functions that should be used inside this resource. You are allowed to take the code from this resource into your own project without restrictions (if you do I would greatly appreciate a post in this thread with a link to the project you used my code in, maybe for further support). GitHub: quiret/lua_math_formulas: Math formulation renderer for MTA San Andreas written in Lua (github.com) Example commands: dt disfract dt fraction dt sqroot dt realdf dt realfract dt realexp dt realexpfract dt realrootfract dt realadd dt realaddcomplex dt realaddcomplex2 dt realaddcomplex3 dt realaddcomplex4 dt realdiv dt realdivcomplex dt realdivcomplex2 dt realdivcomplex3 dt realdivcomplex4 dt realdivcomplex5 dt off Public API: fraction createFraction( df counter, df divisor ) real createRealNumber( realvalue value ) number math_add( number a, number, b ) number math_sub( number a, number b ) number math_mul( number a, number b ) number math_div( number a, number b ) number math_pow( number a, number b ) number math_neg( number a ) number math_inv( number a ) number math_simple( number a ) bool math_eq( number a, number b ) bool math_lt( number a, number b ) bool math_le( number a, number b ) number is a regular Lua numeric value (1, 2, 3, 4, math.pi, math.exp(1), etc) any approximated value is not calculated-on in the math engine, you should stick to fractions which require natural numbers, zero or negative natural numbers (df type) objects returned by the math_ family of functions as well as createFraction or createRealNumber have the Lua operators +, -, /, *, ^, ==, <, <= overloaded to simplify usage real numbers such as math.pi or math.exp(1) are generarilly not specially implemented beyond visual representation; to simplify the implementation of real number comparison I have resorted to calculating the machine approximation and comparing based on that; improvement would require proven real number representation comparisons and their implementations; feel free to contribute any add-ons to the code in this topic which I might merge drawobj createDrawingFormula( number formula ) void drawobj.draw( float xoff, float yoff, float scale ) float(x), float(y) drawobj.getSize() Motivation: This resource should be used to get a mathematical result that is scientifically correct and is not based on a machine-accelerated approximated calculation. I created this code as part of a mathematical project I am working on that I will disclose at a later date. Noteworthy technology: A custom UI layout engine is being used to draw the formulas. Dependency graph logic is being used to perform node-based computation, reusing many results with efficiency in mind. Have fun!1 point
-
I back to work on BP! I Successfully added support for multithreading, so simulation will work smooth until you get crazy. Also set of function get changed, old function has changed and new get added. Here's current progress:1 point
-
مالي دخل بالموضوع صراحة لكن إذا نشرت شي و واحد استعمله بسيرفر ماتقدر تطلق عليه " سرقة " ليه ناشره اصلًا؟ لو ماتبي احد يعدله تقدر تحط رخصة إستخدام بالمود وهنا اقول لك حق لأن ذا إنتهاك بس ماتوقع انك كاتب شيء انت بنفسك اعتقد شايل رخصة الإستخدام حقت التصميم نفسه يلي مفروض ماتشيلها1 point
