RuneScape Classic > RSC Server Development / Discussion

Contributing to https://github.com/Lothy/elysium-single-threaded

<<< (6/7) >>>

-Nothing:

--- Quote from: RSCShadow on February 01, 2015, 12:41:30 PM ---
--- Quote from: -Nothing on February 01, 2015, 11:51:15 AM ---
--- Quote from: Lothy on January 31, 2015, 04:04:21 AM ---Check out the new script manager:
https://github.com/MoparClassic/elysium-single-threaded/tree/master/src/main/java/org/moparscape/elysium/script

The idiom for writing a script is quite simple:

--- Code: ---        ScriptManager.registerItemOnItemScript(1, 1, ScriptManager.PRIORITY_DEFAULT,
                (player, itemA, itemB) -> {
                    // Perform your task here.

                    // Return true to indicate that other scripts for this event, if they exist, should run.
                    // Return false if execution of scripts for this event should terminate.
                    return true;
                });

--- End code ---

--- End quote ---
How are you going to do delays on scripts, e.g dialogues?

--- End quote ---
Schedulers.

EDIT: Do you plan on putting this under some sort of license?

--- End quote ---
Example? Using anything like what RSCD currently has needs to be ditched. You should be able to delay the script by 1 line and so far the best solution for that has been short lived threads per script which get killed after script is done.

imthenull:

--- Quote from: -Nothing on February 01, 2015, 04:23:03 PM ---so far the best solution for that has been short lived threads per script which get killed after script is done.

--- End quote ---
thats a horrible solution. the original system would be a million times better than this namely because you won't have any concurrency issues, which are a bitch to deal with

-Nothing:

--- Quote from: imthenull on February 01, 2015, 04:32:56 PM ---
--- Quote from: -Nothing on February 01, 2015, 04:23:03 PM ---so far the best solution for that has been short lived threads per script which get killed after script is done.

--- End quote ---
thats a horrible solution. the original system would be a million times better than this namely because you won't have any concurrency issues, which are a bitch to deal with

--- End quote ---
Only if you don't know how to deal with them. Also I meant it would be best for usability.

imthenull:
RSCD was not designed to be multithreaded. such would require a huge overhaul of the source. as i said before, it's not a good design choice. at all.

-Nothing:

--- Quote from: imthenull on February 01, 2015, 04:38:44 PM ---RSCD was not designed to be multithreaded. such would require a huge overhaul of the source. as i said before, it's not a good design choice. at all.

--- End quote ---
Sure it wasn't, it barely works in single threaded environment. lol.  If you know what you are doing and you know bunch about concurrency it wouldn't take long get RSCD working with it.

I shall repeat myself:

--- Quote from: -Nothing on February 01, 2015, 04:35:37 PM ---I meant it would be best for usability.

--- End quote ---

Not everyone can be bothered to write thousands of lines when you can write hundred.

EDIT: And this thread is not about RSCD, so if you want to talk about making script system for RSCD make another topic. Elysium is in early stages and anything can be done.

EDIT2: There's not many things that the 'script' threads needs to be using concurrently with the main thread. It is mainly just setting off client updates and modifying inventory.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version
Powered by SMFPacks SEO Pro Mod |