samp "revolution"
#1

Hello guys!

Since I started being a part of this community (not a long while since then) I've met some limitations or "things" I really don't like. I would post in the suggestion topic, but I wanted to hear your opinion first.

Here is the list (they are in no particular order):
  • Update Pawn to 3.3.4127. Why? Lots of bug fixes.
  • Get rid of per-player functions. For example: keep TextDrawCreate and CreatePlayerTextDraw, but merge TextDrawDestroy and PlayerTextDrawDestroy. This suggestion applies to any features that has a "per-player" clone. Why? It eases development.
  • Merge functions like AddStaticVehicle and AddStaticVehicleEx, but add an optional parameter. This:
    Code:
    native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2);
    native AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay);
    becomes this:
    Code:
    native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay = -1);
    More over, get rid of CreateVehicle and do some checks internally.
    Why? It eases development.
  • Make samp-server (only the server) open-source. I already opened a thread about this, but some people got my point wrong and started talking about MTA vs SAMP. Why? Faster bug-fixes, more features, better in-sight for developers.
  • Revamp distributed packages. I've seen that there are lots of outdated scripts. Also, there is a streamer.inc, but no .dll or .so included. What's the point? Pawno is ugly and outdated aswell, maybe you can replace it with some newer IDEs posted on these forums? I personally use SublimeText2, but it would come in handy for noobs. Why? As I already stated, it would be useful for noobs.
  • Make Incognito's streamer part of server's core. Why? No need for third party plugins, no more confusions, etc.
  • Fix sync issues. Maybe Kalcor will find time and completely rewrite it since most of it sucks.
  • Add more features in SA-MP client (e.g. start the client in window mode, add more features for debugging, implement some kind of map editor in client).
  • Add the documentation in .inc files respecting Pawn's documentation comments standards.
THIS WILL CERTAINLY BREAK SOME SCRIPTS, BUT A "BRIDGE" INCLUDE FILE CAN BE WRITTEN TO REPAIR THEM (although I find it easier to upgrade the script properly).
Reply
#2

Some of the things have been discussed before.
Quote:
Originally Posted by Dan..
View Post
  • Update Pawn to 3.3.4127. Why? Lots of bug fixes.
Quote:
Originally Posted by Kalcor
View Post
SA-MP scripters have so much code bound to enum style structs. I doubt this would be an easy transition.
Quote:
Originally Posted by Dan..
View Post
  • Pawno is ugly and outdated aswell, maybe you can replace it with some newer IDEs posted on these forums? I personally use SublimeText2, but it would come in handy for noobs.
Quote:
Originally Posted by Kalcor
View Post
Pawno is just a simple editor for SA-MP pawn scripts. There is no reason it would need to be updated.


I agree with the rest.
Reply
#3

Quote:
Originally Posted by Macluawn
View Post
It has been discussed before.



I agree with the rest.
Kalcor was speaking about Pawn 4.0. That version has a lot of syntax edits. Pawn 3.3.4127 is pretty much the language we are used to.

As I said, I really don't care about Pawno, but there are some nice IDEs released on these forums.
Reply
#4

I agree with everything, if the SAMP developement team can infact add a map editor as a part of SAMP, hats off.
Reply
#5

I agree with the majority of these ideas. However, wouldn't updating to PAWN 4.0 be better than 3.3.4127? Even if it breaks scripts, I'm sure it would be better for everyone in the long run.

Why not make it so we don't need a streamer to have an "unlimited" amount of objects? Why not just have inbuilt object streaming on the SA:MP server/client?

I would personally prefer just having CreateVehicle instead of AddStaticVehicle because I don't use static vehicles in my servers whatsoever. So, just having CreateVehicle would be better.
Reply
#6

Quote:
Originally Posted by Sandiel
View Post
I agree with everything, if the SAMP developement team can infact add a map editor as a part of SAMP, hats off.
Maybe not a real map editor (as it would be time consuming; JernejL already created a great one), but some debug functions (like /dl) to let us place objects in debug mode.

Quote:
Originally Posted by RealCop228
View Post
I agree with the majority of these ideas. However, wouldn't updating to PAWN 4.0 be better than 3.3.4127? Even if it breaks scripts, I'm sure it would be better for everyone in the long run.

Why not make it so we don't need a streamer to have an "unlimited" amount of objects? Why not just have inbuilt object streaming on the SA:MP server/client?

I would personally prefer just having CreateVehicle instead of AddStaticVehicle because I don't use static vehicles in my servers whatsoever. So, just having CreateVehicle would be better.
Yes, in the long run Pawn 4.0 would certainly be better, but I've seen Kalcor's post and made me think that Pawn 3.3.4127 would be a better choice (for now). (btw, it will break plugins aswell)

That was pretty much my point.

I really don't care wether it is CreateVehicle or AddStaticVehicle, it was just an idea. This is why I posted these suggestions here, I wanted your opinion! Actually, CreateVehicle sounds better (and it fits the naming convetions: CreateTextDraw, CreatePickup, CreateObject, etc.)
Reply
#7

Do you know the difference between AddStaticVehicle and CreateVehicle?
Reply
#8

This should be considered. Very good points you brought.
I wonder if there is a specific argument about releasing the server code as community property.
Reply
#9

One thing for which I'd bluntly say that I agree is the native streaming of elements such as objects, 3D text labels, pickups, etc.

I think it would be better if its implementation was internal in SA-MP. The most obvious reasons of course are that the streaming checks and similar operations could be done on the local player's computer. This would mean less server resource usage and could mean less traffic between the client and the server. Note that I do not have any research to confirm that any of this would currently be a problem, but I think it could provide more streaming "quality" as well.
Reply
#10

Agree with pretty much everything bar two things - the server being open source. I can't even begin to imagine how spread the community would become. We'd have multiple communities running their own poorly "optimized" version of San Andreas Multiplayer.

Quote:

Fix sync issues. Maybe Kalcor will find time and completely rewrite it since most of it sucks.

That's a bit harsh. I'm no developer, but I'm pretty sure improving the synchronization process is pretty advanced and requires time - since SA-MP is a modification, and based on memory hacking as far as I know. They don't have access to the game source nor its engine. Though it's always nice to see improvements in regards to the sync.
Reply
#11

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
"Eases" development for whom? Kalcor? No. People porting their existing scripts? No.
Its for the sake of consistency, which is always good. And porting existing scripts will be a matter of seconds - Replace all is a thing.
Reply
#12

Possibly.

Anyway, a thought - if you want open-source development, and want PAWN-style documentation comments in the various SA-MP includes, why not start there and write said comments? I'm sure Kalcor would be far more willing to include them if they already exist (Disclaimer: I said "more" willing, I don't speak for him and so that doesn't mean he WILL take them).

Also, if you want consistent functions, why not submit a patch to fixes.inc? It would be pretty easy to do something like:

pawn Код:
if (id & PLAYER_TEXT_DRAW_FLAG) PlayerTextDrawFunc(id & ~PLAYER_TEXT_DRAW_FLAG);
else TextDrawFunc(id);
Wrap all the natives with that, and make sure the "Create" functions append the correct flag, and you're away. Though I admit that's more of a stop-gap.
Reply
#13

I really ask for none of the others but this, but I agree on the updates.

Код:
Add more features in SA-MP client (e.g. start the client in window mode, add more features for debugging, implement some kind of map editor in client).
Make the client a little more advanced, give us MORE options!

Get permission and rights of JernejL to distribute his map editor with the sa-mp package
Add options to start the SA-MP Modification in windowed mode and resolutions that your monitor supports!
Add an option to start the SA-MP Modification in debug mode (this one isn't needed because we can just click the debug.exe, I guess it shouldn't be included but why the heck not?)

I'm just kinda sick and tired of doing ALT + Enter everytime I connect.
Reply
#14

Quote:
Originally Posted by MP2
Посмотреть сообщение
Do you know the difference between AddStaticVehicle and CreateVehicle?
Yes I do know. AddStaticVehicle should be used in OnGameModeInit whilst CreateVehicle anywhere else. I suggested that all functions were deleted with the exception of CreateVehicle which would check INTERNALLY if the gamemode was already initialized or not.

Quote:
Originally Posted by steki.
Посмотреть сообщение
This should be considered. Very good points you brought.
I wonder if there is a specific argument about releasing the server code as community property.
You can see some here: https://sampforum.blast.hk/showthread.php?tid=443585

Quote:
Originally Posted by AndreT
Посмотреть сообщение
One thing for which I'd bluntly say that I agree is the native streaming of elements such as objects, 3D text labels, pickups, etc.

I think it would be better if its implementation was internal in SA-MP. The most obvious reasons of course are that the streaming checks and similar operations could be done on the local player's computer. This would mean less server resource usage and could mean less traffic between the client and the server. Note that I do not have any research to confirm that any of this would currently be a problem, but I think it could provide more streaming "quality" as well.
That's an even better idea, but it might suck for those who have bad PCs. Altough, having the SA-MP's server source the Streamer plugin can be heavily optimised. How? Well, it's easy. You don't have to create and destroy objects every time, you just make sure you "skip" some of them in the player-updating process.

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
I've said before why upgrading PAWN is a terrible idea at this point, and will continue to argue that, especially given that we know pretty much all the bugs now and they are few and far between.
There is a difference between Pawn 4.0.4548 and Pawn 3.3.4127. The amount of broken scripts would be minimum.

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
"Eases" development for whom? Kalcor? No. People porting their existing scripts? No.
Especially for new people, but not only.

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
pawn Код:
native _AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay = -1) = AddStaticVehicleEx;
#define AddStaticVehicle _AddStaticVehicle
Done.
I know that most suggestions can be implemented via an include, but I was hoping that they were implemented in order to keep consistency.

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
If you view Help->About you'll see that pawno was written by the SA:MP team. It may be simple but its included because they have permission to distribute it.
They can ask for permission the author of a great IDE that was released around here and bundle it in the package. I'm sure he won't disagree since he released the IDE already.

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
I also don't see much point in integrating the streamer plugin in to the core - it's already loaded as a dll so already runs at native speed. If people don't understand how plugins work that's not really the team's fault, especially given the high number of useful plugins used by most people - should they all be integrated? And if so, how should the various licenses be resolved? Maybe an enhanced plugin API would be of some use, and there actually are ways to bypass PAWN entirely for things like the streamer plugin, it just doesn't use them.
Not the real plugin (read above, I posted another and optimized approach), but some thing that would remove SA-MP's limitations.

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
If they can even BE fixed (see my first point).

Edit: To seem less harsh, the other points I either agree with or have no strong views on (I've said before that I know why SA-MP is closed source, but can't say unfortunately).
Most of them CAN be fixed. If we worry about breaking support for scripts we will never evoluate. I can find some reasons why SA-MP's client is closed source, but not the server.

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
Possibly.

Anyway, a thought - if you want open-source development, and want PAWN-style documentation comments in the various SA-MP includes, why not start there and write said comments? I'm sure Kalcor would be far more willing to include them if they already exist (Disclaimer: I said "more" willing, I don't speak for him and so that doesn't mean he WILL take them).
I actually wanted to do that, but I don't like working in vain, so if Kalcor would like to see those comments in the includes, I'd be happy to write them.

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
Also, if you want consistent functions, why not submit a patch to fixes.inc? It would be pretty easy to do something like:

pawn Код:
if (id & PLAYER_TEXT_DRAW_FLAG) PlayerTextDrawFunc(id & ~PLAYER_TEXT_DRAW_FLAG);
else TextDrawFunc(id);
Wrap all the natives with that, and make sure the "Create" functions append the correct flag, and you're away. Though I admit that's more of a stop-gap.
I already know that there are various ways of doing what I suggested via an include file, but I was hoping that they would be implemented in the core.
Reply
#15

Agree with everything, but probably no one cares about our opinions and etc. Y_Less, in that thread you agreed with mine argument why to upgrade to a newer compiler. I don't know why, but as I see, you can find any reason why not to do something that is better for most of people.
Also, things like workarounds should be fixed internally, like kick with client messages and many things like in fixes include. Because now, honestly, developing for sa-mp sucks a lot, all these workarounds for almost everything, these streamers and etc. If all sa-mp thing would be placed on git, there could be updates every month and not every year.
By the way, Dan, you won't make any update with having server source only, only updates that are not related with clients, right?
Reply
#16

Quote:
Originally Posted by zgintasz
Посмотреть сообщение
By the way, Dan, you won't make any update with having server source only, only updates that are not related with clients, right?
Since the server is connected with the client, some updates to the server will be propagated to the client aswell. In any case, it won't be anything major.

Anyway, the client will certainly not be released (because Rockstar forbids reverse engineering). Kalcor can keep updating it and let the community take care of the server.
Reply
#17

Quote:
Originally Posted by Dan..
Посмотреть сообщение
Yes I do know. AddStaticVehicle should be used in OnGameModeInit whilst CreateVehicle anywhere else. I suggested that all functions were deleted with the exception of CreateVehicle which would check INTERNALLY if the gamemode was already initialized or not.
I was under the impression that vehicles created with AddStaticVehicle are pre-loaded for clients (which they are), but it turns out that's also the case for CreateVehicle, but only under OnGameModeInit. So yeah, they could be combined, there's no reason for separate ones.
Reply
#18

Quote:
Originally Posted by zgintasz
Посмотреть сообщение
Y_Less, in that thread you agreed with mine argument why to upgrade to a newer compiler. I don't know why, but as I see, you can find any reason why not to do something that is better for most of people.
I agree with the need to update and upgrade over time, and have been doing so for the last 8 years! To put this in perspective:
  • Dynamic memory allocation.
  • Inline functions.
  • Compile-time meta-programming (string hashing).
  • One line callback hooking.
  • Compile-time parameter checking for remote and timer functions.
  • Localisation.
  • Data type abstraction.
  • Vararg function handling.
  • AMX meta-data.
  • Inter-script communication.
  • Unit test framework.
  • Resizable arrays.
  • "foreach".
  • Compressed bit arrays.
Those are some (most) of the ways I have improved the PAWN language over many years to make coding faster and simpler. Also, from other people:
  • Timer fix (Slice).
  • Self modifying code (Slice/ZeeX).
  • Many more I can't even think of off the top of my head...
The main reason I was opposed to the upgrade was that I didn't feel that sacrificing many of those updates for the sake of a few tiny changes elsewhere was in any way a fair exchange! "We may have lost inline functions, but at least the compiler now makes slightly fewer redundant malloc calls!!! Wooo..."

THAT is why I was so adamantly against the update, especially these "fixes" from pre-4 versions:

3.1.3541 (the compiler may be modified 3.2.3664, but the VM is 3.0.3367):

Quote:

* BUG fix for the sleep opcode: the STK and HEA registers were not updated in
the AMX structure (ANSI C and GNU C versions only; the assembler versions
were correct). Reported and fixed by "chop".

Breaks dynamic memory allocation, and thus inline functions and timers that use it.

3.3.3875:

Quote:

* Opcode checking has become stricter: when initializing an abstract machine,
the abstract machine tests the parameters of branch instructions and of
instructions that access data in the data segment or the stack/heap.

We already worked around some opcode checking on data access by finding a hole in the checks. Stricter checking results in that hole being closed. This breaks ANY script that uses those techniques to access data it shouldn't:
  • Inline functions.
  • One line callback hooking.
  • Vararg function handling.
  • AMX meta-data.
  • Unit test framework.
  • Resizable arrays.
  • Timer fix (Slice).
  • Self modifying code (Slice/ZeeX).
ALL gone! So what was introduced in 3.3.3875 in place of these features?
  • Overlays and compression - Useful for constrained memory devices, unlike the huge servers that run SA-MP servers.
  • Numerous fixes not relevant to SA-MP's use.
  • Debug information included extra functions.
  • Stack usage was not correctly reported for recursive functions.
  • Array comparison - That is more useful I'll admit.
NOW do you see why I was so adamantly against these updates? They introduced trivial updates here and there, with useful upgrades that apply to SA-MP few and far between, while at the same time breaking almost every advance in the PAWN language we have managed to make ourselves.

HOWEVER...

The issue with dynamic memory allocation is actually not hard to work around. The old version did it differently, only the new version uses the heap to avoid huge arrays at compile time. That just requires a reversion. The big issue remains memory access for advanced features, and that again is not an issue. Why? Because I read the wrong version in the first place!

As I said, we bypass memory checks such as this:

pawn Код:
case OP_LOAD_S_PRI:
    case OP_LOAD_S_ALT:
    case OP_LREF_S_PRI:
    case OP_LREF_S_ALT:
    case OP_STOR_S:
    case OP_SREF_S:
      tgt=*(cell*)(amx->code+(int)cip); /* verify address */
      if (tgt<-stacksize || tgt>stacksize) {
        amx->flags &= ~AMX_FLAG_VERIFY;
        return AMX_ERR_BOUNDS;
      } /* if */
      cip+=sizeof(cell);
      break;
That code checks that the parameter to "LOAD.S.pri" and similar OpCodes is within the stack, so that you can't read memory outside it (there are similar checks for LOAD.pri etc for the data segment). The work-around relies on "LREF.S.pri" - this loads a variable, then uses that value as a pointer to load more data. The variable it loads is checked to be within the stack, but the pointer contained in that variable isn't - that being the hole we exploit! That tiny bug has led to MASSIVE improvements throughout, but I just today discovered a mistake I made years ago - I used the wrong AMX version! As I said, the SA-MP server is on version 3.0.3367, which doesn't have ANY of those data segment checks - they ARE the improved ones introduced in version 3.3.3875. Apparently when I was first investigating this I looked at a later version of the source and found a way to bypass the enhanced checks, and not the non-existent checks already in the server, and we've been bypassing the upgraded checks ever since!

So, in short, when I saw that the later versions had "stricter" checking on OpCodes, I assumed this meant "stricter than the checks we already bypass" and not "just the checks we already bypass". So all code using this technique is actually already written for the new version and I no longer have serious objections to upgrades within the 3.x branch. Sorry.

Quote:
Originally Posted by zgintasz
Посмотреть сообщение
Also, things like workarounds should be fixed internally, like kick with client messages and many things like in fixes include. Because now, honestly, developing for sa-mp sucks a lot, all these workarounds for almost everything, these streamers and etc. If all sa-mp thing would be placed on git, there could be updates every month and not every year.
"kick with client message" is NOT a bug, as has been explained MULTIPLE times since the intentionally introduced change.

Also, if the workarounds have already been written, it's not really a hassle even if it should be fixed internally - just include the fixes and go.
Reply
#19

Speaking of bugs, I always wondered why Kalcor still didn't fix the empty string bug in CallLocalFunction. It's been known for years even before the fixes.inc include came out (remember that isnull() thing in YSI, zcmd, etc?) and it's pretty easy to fix with literally just a couple of lines...
Reply
#20

Quote:
Originally Posted by xeeZ
Посмотреть сообщение
Speaking of bugs, I always wondered why Kalcor still didn't fix the empty string bug in CallLocalFunction. It's been known for years even before the fixes.inc include came out (remember that isnull() thing in YSI, zcmd, etc?) and it's pretty easy to fix with literally just a couple of lines...
This is one of the reasons why I suggested the samp-server to be released as open-source. Anyone will be able to fix small and annoying bugs like this.

He is a lazy-ass. #plsnoinfract
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)