SRL Archive - Suggestions

2 functions at once


JPHamlett

2010-08-17 23:38:24

Idk if this is possibly but would it be possible to ahve two or amybe even 3 function going at one time such as have antiban, findnormal randoms, and paint all running simultaneously?

I think that would be great and would make antirandoms better cause it would never miss one


and if it found one it would wait till the end of the current function and then solve it

idk jsut an idea

Nava2

2010-08-17 23:43:06

Noope.

That would involve multi-threading/processes.

Heavenguard

2010-08-18 00:49:04

Lol [Offtopic] I <3 this thread name. Sounds erhmm..

Frement

2010-08-18 08:36:38

Can't we integrate multi-threading plugin to simba?

Wizzup?

2010-08-18 10:17:48

I don't see how this would be great at all. You'll have several threads all stealing the mouse, which results in misclicks and unhuman behaviour. There's no reason to check for Random Events ALL the time, as they don't occur at any moment. A good script doesn't need multiple threads. Logic will do.

IMO anyway…

nielsie95

2010-08-18 10:22:49

You could create a thread for the mouse.

Maybe the next engine will support threads?

CX gamer

2010-08-23 08:02:11

Sorry for necro.
From: Wizzup?
A good script doesn't need multiple threads. Logic will do.

It took me a couple days, but I think I have found a requirement of multi-thread for a good script.
Say I want to rotate my camera while bringing my mouse to an estimated position (like I do some times). I would need the mouse procedure to be running on the same time of a camera procedure.
So multi-thread would create more realistic human behaviour, rather than doing one thing at a time.

If seperate threads are ran on seperate CPU's, it would drasticly increase performance on scripts that take advantage of this. Like I was recently testing 1 mil samples to plot different gauss functions, I could divide the processing time by eight. :D
Unless I'm horribly mistaking and multi-thread doesn't correspond with multi-core.

Well, I would love multi-thread, but I have no idea how much work this would be for you. So I was just throwing out my arguments. ;P

nielsie95

2010-08-23 08:07:53

From: CX gamer
Sorry for necro.

It took me a couple days, but I think I have found a requirement of multi-thread for a good script.
Say I want to rotate my camera while bringing my mouse to an estimated position (like I do some times). I would need the mouse procedure to be running on the same time of a camera procedure.
So multi-thread would create more realistic human behaviour, rather than doing one thing at a time.


But this is already possible, it just requires you to write a function which does both at the same time..

Threads do not correspond with cores. Almost every application uses multiple threads. Threads can be divided among the cores of your cpu, but I believe Delphi doesn't support this. I'm not sure about FPC, though.

Wizzup?

2010-08-23 08:10:17

From: nielsie95
But this is already possible, it just requires you to write a function which does both at the same time..

Threads do not correspond with cores. Almost every application uses multiple threads. Threads can be divided among the cores of your cpu, but I believe Delphi doesn't support this. I'm not sure about FPC, though.


I'm pretty sure Simba uses multiple cores if you run multiple scripts. FPC spawns native threads, at least on Linux (each thread is a process, essentially) but I doubt it is any different on Windows. :)

@CX Gamer: You can call KeyDown(), then do some mouse movement for some time, and then call KeyUp().

CX gamer

2010-08-23 08:31:26

Oh, I didn't know that. :(

@wizzy: Hmm yes.. I've thought of that.. Though the randomness of the mouse function and the randomness of the camera makes it so that the first one to finish it's task is random, meaning I need to detect both, during the function itself. But I don't like to copy several functions of srl to run through each other.