Originally Posted by
Kris
Don't get it wrong.
That mentality is completely wrong in this specific case. While yes, in many other areas it applies perfectly fine - you gotta put in effort to get the gains, however in this case you'd be focusing on all the wrong places. I don't think some of you understand the importance of the base structure of the server you're working on. We're suggesting people to stay away from this type of sources because of the base structure of the code, not the flaws in the actual content or lack of content. Content isn't something you should be worrying about right away, while yes it is a very important part of a server, its importance falls down to the base structure.
Let me give you some examples.
When you look into this specific source, you'll notice there are literally tons of duplicate methods. It's a part of PI unfortunately; people prefer to make new methods instead of patching up old ones. This creates confusion. Other developers - due to the lack of commentation and all of that will be unable to develop on a source such as this because they will not know what methods to use; when you have methods like ObjectManager.spawnObject1(), ObjectManager.spawnObject2(), ObjectManager.spawnObject3(), how in the hell are they meant to pick the method to use? It's all wasted effort. This specific example is actually taken from my own experience while doing a service for someone on a PI source.
Another clear example is the lack of structure; Everything in PI is slapped into just one class. For example, if you want to make a NPC perform something special, you'd have to go to that one special class(I don't know the names of them so I won't be trying to make that up) which is thousands of lines long, if not tens of thousands, and contains switch() blocks to switch between NPC ids in the process loops. This is an extremely poor way of managing NPCs, and should be avoided at all costs. The correct way to handle these things would be to create the respective abstract NPC classes and override the methods that need to be overridden, effectively causing no harm whatsoever compared to one massive loop and tons of if-sentences. Not only does your code become much more readable, it also gets much better performance wise. A PI server by default will struggle to hold more than 50 players - I'm positive of this. A properly designed server however should be able to hold the limit - which is 2000 - with ease.