Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mctwist

Pages: 1 2 3 [4] 5 6 7 8 9 ... 70
46
Add-Ons / Re: [Support] EventScript - Sharing events for the future
« on: January 28, 2018, 03:46:52 AM »
I do approve leopard.hosting as a service, but not as a site for uploading add-ons. I'm trying to upload to BLG, but what I don't like about it that it takes time to get your uploads approved. I do know that due to how the community works, it is fully possible that people will abuse the system by uploading stuff that is not of enough quality to be put there, but I'd like it to be more of the direction of "upload and download for free, and get certified verification by moderator".

47
Add-Ons / Re: [Support] EventScript - Sharing events for the future
« on: January 28, 2018, 03:20:41 AM »
I appreciate the positive response. It's really difficult to spread any mods through BL community, so I might have to move around soon and put stuff on BLG or the like.

48
Add-Ons / Re: [Support] EventScript - Sharing events for the future
« on: January 27, 2018, 03:59:25 AM »
Quote from: v1.6 changelog
Added workaround for Mac keybind.
UI fixes.

Download

49
can it calculate pi

Like Ipquarx said, but you need to handle it yourself. This library does not support floats, so you need to simulate floats through an integer.

50
Add-Ons / Re: LockPick Mod (v0.01) [Revised]
« on: January 24, 2018, 04:55:36 PM »
I got several points to address about the quality and functionality of this mod.

First off, you could have easily added this event without having to modifying the current mod. This is also bad manners that you didn't ask for permission to modify the code. Altering by adding functionality through packaging is fine, but this is basically theft.

Secondly, I do not see any lock picking, but just an event that is called. Is this the intention of the item? Because if it is, it could only be used for certain game modes where the host tells which doors that can be picked.

Finally, it was a long time ago since I read the code the last time, so I'm not sure of the quality of it, but the current state of quality is horrible. You are inconsistent with the use of spaces and tabs; The indentation is off on several lines; There is also some minor performance issues as you are calling getMinigameFromObject twice in certain occasions.

I cannot speak for Tezuni, but I can see that my code is not even there, so having me credited in the description.txt is not even needed. Also, why give it version v0.01 when you claim in the file that it is v3?

I would recommend that you follow my advise to only keep the packaged method as that is basically what you really are out for. This results you to claim the ownership on the mod completely and can remove both me and Tezuni from credits. Keep in mind that you need to rename the mod, though, as the functionality is not a tool anymore, ie: Event_OnLockPickHit.

51
Great. Let me know if there is anything else.

52
I tried it with some bot events, so it should. Please tell me if it does not and give me links to those add-ons you are using.

53
Code: (Changelog v8) [Select]
Added support for Event_onRelay
Minor modifications

54
I also need SetFullScale event add-on. I can't seem to find it in my list, so it's not default.

Edit: I located the issue. I'll see what I can do about it.

Edit2: I fixed it. I just need to know what events that can be used other than those listen in onRelay so I can add them as well.

55
Like I said: the script is made in such a way that would you add more targets for onRelay, it would work out of the box. Try it and you'll see that it should work.

If not, then send me your add-on so I can have a look.

56
This works only with onRelay. However, I did made it in such a way that it should be possible if I called an another event for bots. If you tell me an event that should have this kind of functionality, I'll make an event that works with it like this event.

57
calling functions in ts incurs pretty heavy penalty, so if you want to up performance dont subdivide functions.
Yeah stuff like .length() is making this slower

This is true. I didn't divide it up for the sake of not destroying the algorithm too much. Wanted to keep the similarities intact. However, now it is time to merge everything together to normalize the function into bigger solid ones.

also use only local or global vars for fastest performance

I thought this would make a great impact on the performance, but when I removed the use of object and went global all the way, it in fact went slower. Could be due to the concatenation of array strings.

Objects also store all variables inside them as strings (even if it's obviously an integer or a float), so avoid storing the actual number information in them and delegate it to global variables.

I didn't know this, but I know one thing from what I found out while developing this: I could use the numbers fine without any penalty on result or performance. It actually, as mentioned previously, went slower when I tried to optimized it through global variables. However, I did not try any numbers that reaches anything higher than 6 digits in size.

Once all those things are done, then you should have yourself a much much faster library (I can probably send some pull requests your way for this)

I would be happy if you could provide some pushes. As long as the general algorithm is like it is now, unless a better one is found, then this is the fastest library when it were written in JavaScript. Keep in mind that as this is TorqueScript, several more changes needs to be made in order to optimize this further. I am all ears for improvement suggestions, but please keep in mind that test results through the included test suit needs to be provided to make sure that the speed is indeed faster. I'll update it later on to make it easier to see changes from previous runs.



On an another note, I added a quick way for the functional version to determine the size of the number and do a calculation directly on it instead of converting it to an array. The speeds have been updated to mirror this change.

58
I would love to get some help on this, unless you want to integrate mine into yours.

A quick introduction would make it easier for you to get up to speed:
I'm using objects heavily. Tried to strip it down to not using it, but it actually hurt performance instead of helping it. Not sure why that happened.
The library is currently working with 3 digits for each part, almost 10bits. This is currently only for laziness, but it sure should be easy to make it support up to 5 digits. I would like to make it bit-compatible, like you did, but due to how the library this was derived from was built, I think it would be hard to do such a thing without damaging the performance even further. It's not impossible, just hard. Would love to have this go up to 16bit.

There is a multiplication algorithm I added, but never tested. It's used when a certain criteria is met. Like if both numbers exceeds 1600 positions, which is extremely rare. I have no idea how fast it is, but apparently it is used only when big numbers are introduced. The sad part with that is that it heavily relies on objects.


Other than that, the divMod functionality I guess that you want to use for your own purpose. If you want, then go ahead, take it. It currently uses some objects already, but only to a certain extent.

59
Few requested for it, but no one wanted it that badly to even bother doing it. However, I came to the conclusion that if something is possible through JavaScript, it should be possible to do it trough TorqueScript, to some extent.

Therefore I searched and found a library that would do perfectly to be ported to TorqueScript. After a coupe of days I managed to finally make BigInt, the library that can handle any size of number thrown at it, and will calculate it within reasonable time.

GitHub

Performance tests
All iterates 16,384 times each

Add with strings
500 + 150:       32ms  avg: 0.00195313ms
1500 + 2500:     64ms  avg: 0.00390625ms
100 digits:  28,416ms  avg: 1.73438ms
Add without strings
500 + 150:      896ms  avg: 0.0546875ms
1500 + 2500:  1,088ms  avg: 0.0664063ms
100 digits:   8,256ms  avg: 0.503906ms

Subtract with strings
500 - 150:       32ms  avg: 0.00195313ms
1500 - 2500:     64ms  avg: 0.00390625ms
100 digits:  44,960ms  avg: 2.74414ms
Subtract without strings
500 - 150:    1,024ms  avg: 0.0625ms
1500 - 2500:  1,280ms  avg: 0.078125ms
100 digits:   8,416ms  avg: 0.513672ms

Multiply with strings (last does 2,048)
500 * 150:       32ms  avg: 0.00195313ms
1500 * 2500:    288ms  avg: 0.0175781ms
100 digits:  68,704ms  avg: 33.5469ms
Multiply without strings (last does 2,048)
500 * 150:    1,760ms  avg: 0.107422ms
1500 * 2500:  3,296ms  avg: 0.201172ms
100 digits:  61,280ms  avg: 29.9219ms

Div with strings (last does 2,048)
500 / 150:       64ms  avg: 0.00390625ms
1500 / 2500:     64ms  avg: 0.00390625ms
100 digits:  12,480ms  avg: 6.09375ms
Div without strings (last does 2,048)
500 / 150:   44,416ms  avg: 2.71094ms
1500 / 2500: 34,112ms  avg: 2.08203ms
100 digits: 18,848ms avg: 9.20313ms


Compare it to an another library.

Current issues
Smaller calculation on objects is currently not done. This was a hard nut to crack, as checks needs to be done in such a way that it might hurt the performance. I've added the smaller variants of each operator, just need to stitch everything together.

60
Add-Ons / Re: [Support] EventScript - Sharing events for the future
« on: January 15, 2018, 05:09:21 PM »
Quote from: v1.5 changelog
Added support for case-insensitive events.
Finalized support for newlines anywhere and events on the same line.
Fixed issues with escapes.
Fixed issue with names not added correctly.
Added so labels can be retrieved from list object.

Download

Pages: 1 2 3 [4] 5 6 7 8 9 ... 70