Why people don't use libraries
"Other people's code sucks! Screw libraries -- I can do it myself!"
For nigh on 20 years this has been the rallying cry of the gaming community. Using a library was a sign of mental weakness...it meant you thought the library creator was better than you, and that just couldn't be. I know of a guy whose first effort every time he moved to a new company was to write his own memory manager and word processor, because he couldn't trust those things in the hands of anyone else.
Of course the result was he had a buggy memory manager and low-quality word processor, since they'd been stress-tested by a total of one person. But hey, at least he wrote it himself!
I don't know what the code is doing
People get sucked into this concern because with a BYOND library they can look at the code, so suddenly they want to know how it works. Nothing wrong with wanting to know how it works, but the real question is "Does it work?"
If it works, and the API is clear enough that you know how to call the functions, what more do you need? You probably don't avoid doing things on your computer because you don't know how the code works for what you are doing. For example, do you know what code Windows executes when you double-click a file, or what code BYOND uses when you send text to a player, or exactly which relays are triggered when you press the gas pedal in your car? I'm guessing that you don't avoid double-clicking files or sending text to players or driving your car just because you don't know exactly what happens under the hood.
Think of a library as just extending the built-in BYOND functionality. Pretend you can't see the library code. Now, is the library useful to you? If the library works and does what you need, then use it.
I don't like having to read other people's code
This is similar to the first concern...if the library is properly done, you don't need to read the code! You should be able to use it by reading the documentation (just like you do for BYOND, right?) or the demo and calling the functions as specified. Just because the code is there doesn't mean you need to read it.
If the library has no documentation or tells you to "just read the code" to understand it, then it's a bad library. Don't use it.
I want to learn to do it myself.
Libraries are definitely good places to learn coding techniques, especially if they are well-commented. Using them as a source of sample code is a fine approach -- but beyond playing with a copy of the code to see how things fit together, why reinvent the wheel? If you need a calendar object and someone has already written a calendar object that works, has been fully debugged, and does what you need, why spend time doing the code again? If you need to learn, why not learn doing something new? Why not spend time doing code no one has done before?
It's too trivial a task to use a library for
Trivial stuff is perfect for libraries! Why should you have rewrite or go find and copy the say verb for the 50th time? Why not just be pulling it from a library, whether written by someone else or by yourself? You'll save yourself a lot of hassle, and get a debugged version of the trivial task.
I'll just have to change the library anyway
A good library is designed so that you can make changes to it by overriding its functions or seting variables. Just like you'd override Move() in BYOND or set a mob's name. If the library doesn't let you do what you want, make a copy of the library code, change it as necessary, and send your changes to the library creator so they can improve the library for everyone.
Why you should use libraries
Because you are smart. Because you don't want to waste your time. Because you don't want to add new bugs to your game.
Far from being a weakness, using and creating libraries show that you understand the importance of modularized code and not reinventing the wheel. Even if you don't use libraries created by other people, putting your own frequently-used code in a library for yourself improves your code in the ways described below.
Creating a library doesn't mean you have to let others use it, by the way. If I find myself using any function in more than one game, it goes into a library. Most of the libraries I use are private libraries for myself or my team that never get publically released.
Here are some of the benefits you get from libraries, whether you create them yourself or use those written by others:
Libraries encourage proper encapsulation of code
Any functionality that can be used by multiple games should be. If it's a general problem, it should be solved once and the solution used wherever needed.
Write once, use everywhere.
Libraries take care of the drudge work, so you can focus on the cool stuff
Putting general functionality into libraries, even if you never distribute them publically, improves your games and cuts down your own development time. You or someone else as already spent the time doing the drudge work -- why not reuse that and just do the cool stuff for your new game?
Libraries encourage general well-tested solutions instead of one-time buggy hacks
Popular libraries, such as s_admin or CharacterHandling, have been in development for years, with hundreds of people using them and filing bugs and enhancement requests. That means that by using one of those libraries, you get the benefit of everyone else's time and efforts. The libraries are fully debugged with lots of functionality. Anything you write yourself is almost guaranteed to have more bugs and less functionality than the stuff that has been well-used.
Libraries let you game more games done better and faster
This is simple: If someone else wrote the code for you, or if you are using code you already wrote for another game, then you have more time for new functionality on the game you are working on now. And since you have to write less code for your new game to get it done, you'll create fewer bugs.
What it comes down to is this: If a library exists that does what you want and you aren't using it, why are you wasting your time? Don't you have a game to finish?
i use
spazzum.s_damge
dantom.htmllib
deadron.test(somtimes to makesure everythings running right)
dearon.texthandeling ( for some of my chat stuff )
these libs are smashing, and worth having especial when u wanna do certen things