YSI:History

From SA-MP Wiki

Jump to: navigation, search

YSI as a project was started in March 2007, shortly before the release of SA:MP 0.2 as an additional set of libraries to provide greater functionality using only PAWN. The idea was basically to do the complex processing code for modes for people and provide a simple though powerful and flexible API for people to simply build modes on top of, saving them the massive overhead of writing a reliable back end for object streaming, checkpoint streaming, user registration etc. The other motivation was that most existing libraries were written as one offs, code was made to do one thing and people would pick and choose code from multiple sources to get their mode working, most of the time resulting in a mode which didn't work because the libraries used were entirely incompatible and the mode writer simply gave up. The final motivation was a personal one to the main developer (Y_Less), to write a modular and extensible system which was well documented and constructed correctly from the start so the code wouldn't be repeatedly scrapped and almost entirely restarted as so often happened with his code, resulting in very little ever being released. Unfortunately this hasn't happened but the effect has been seriously reduced due to the modular nature of the libraries - while one section was being scrapped others were left untouched.

While most of the code was written from scratch much of it was based on existing code previously written by the author for other modes:

The checkpoints, areas and properties code was based on Alex "Y_Less" Coles area script, aiming to provide the same level of customization but with a simpler to use function based API rather than array based data input.

The object streamer was based on an earlier object streamer (e_objects.inc), originally written for use in beta tests before the release of 0.2 and the first object streamer written (and the motivation behind writing the per-player object code in SA:MP). However this object streamer used a method similar to other object streamers available which is very limited in terms of top numbers of objects so the code was combined by a streaming method from Peter grouping objects into areas to only check objects known to be near the player, increasing the practical limit from around 3,000 to around 1,000,000. Other improvements and modifications were also made resulting in the only obvious similarities being certain code API function names being the same and the IsValidModel being mostly the same.

The modules, commands and text systems were originally from an admin system being developed called YSS (Y_Less's Server Script - server not just admin as the idea was it did more than just provide admin commands). It was the most obvious predecessor to YSI as much of the ideology was similar. This also had it's own user system but this is not related to the YSI user system in any way. It also used the idea of groups, not admin levels, to control access to commands but this system was only used in the command system and although the logical parent of the YSI groups system is not related in code at all. The admin system had gone through about 4 or 5 almost complete rewrites each time adding more functionality and flexibility, the later ones also including a lot of compile time options for what features to include and exclude, very similar to YSI and in fact it was this single feature getting so out of hand that was the seed for the idea of YSI. The command system used had integrated /help <command> system, rename-able commands, optional prefixes and integrated per-user system like YSI but again much of this was re-written almost from scratch or has since been modified beyond all recognition. The original didn't use binary tree searching but it did have a basic command addition and removal system, but this was done on a per module basis, they just registered a public function with a list of their commands in, not each command individually. The text system was also based on the idea of multiple languages but was more hard coded, a mode just had a list of the text it used in an enum and loaded only required text, YSI can load any required text without being told in advance what's needed - the original version of this can be found referenced here, but there's no code released.

The final major piece of code ported is the race system, this originally comes from the San Andreas Underground race mode being created by Y_Less but very little of this remains, only the Race_OnPlayerEnterRaceCheckpoint code is the same (although updated from the original 0.1 code using normal checkpoints).

Personal tools
Navigation
Toolbox