Page 1 of 1

Should I start Using Libraries?

Posted: Sat Apr 19, 2014 11:24 am
by TheScriptan
Hello everyone, so I was thinking should I start using libraries, or try to invent everything from scratch? For example, should I use middleclass library or try to create my own kind of classes and oop system with metatables?

Re: Should I start Using Libraries?

Posted: Sat Apr 19, 2014 11:34 am
by SneakySnake
If you want to learn how to implement the things these libraries do, then you could create your own libraries.
Otherwise, you should use them, unless an existing library does not satisfy your needs. Then you can either create a library that does satisfy your needs, or modify the existing library in order for it to satisfy your needs.

Re: Should I start Using Libraries?

Posted: Sat Apr 19, 2014 12:02 pm
by TheScriptan
Thank you for the response! :)

Re: Should I start Using Libraries?

Posted: Sat Apr 19, 2014 12:22 pm
by kikito
I wrote my answer to that here: Cool Stuff vs Yak Shaving

Re: Should I start Using Libraries?

Posted: Sat Apr 19, 2014 2:41 pm
by TheScriptan
Thank you for your blog link, I read it and it was really helpful, I am going to start using libraries, but I just want to quote one thing from that text :P
kikito wrote: And I think that it is a proven fact that learning from others is more effective than having to learn it by yourself[/url]
This fact personally for me is true for 60~80%. If you try to learn something by yourself and you succed in it, you will remember that thing that you learned by yourself longer than you learned it from someone else! :) Anyways, thanks for the link, it truly changed my mind! I should read your blog, I bet there is tons of articles like that! :)

Re: Should I start Using Libraries?

Posted: Sat Apr 19, 2014 2:55 pm
by Inny
The answer to that question is another question: Do you want to make a game or do you want to make a library?

Because if you want to make a game and don't use libraries you'll get stuck making your own.

Re: Should I start Using Libraries?

Posted: Sat Apr 19, 2014 4:58 pm
by davisdude
Alternatively, you could also make your own libraries, simply to learn how they might work. Just as a good exercise to learn. :)
Of course, you may never use the library, but that doesn't matter. Also, if you do use people's libraries, make sure you know how they work. I see so many people have "problems" with a library simply because they don't understand how to use the library.
Just my two cents.

Re: Should I start Using Libraries?

Posted: Sun Apr 20, 2014 10:37 pm
by Roland_Yonaba
The Great Inny already provided a nice response.
Inny wrote:Do you want to make a game or do you want to make a library?
You should really ask yourself that question before any attempt to write a library for your games. Most of the peple in gamedev would just grab some existing libs, try them, and select the one which seems to do the job. In case you get nothing like this, well, you can start writing your own module, and share it as a third-party so that some other people would reuse it.

In some cases, too, you can find some libraries, but you do not like the way they handle feature X or feature Z. In that case, you can contact the developer itself and ask for some changes, or monkeypatch the module itself if its API/ license permits it, or just write your own module as a last option.
But the thing is, as soon as writing your own module drives you away from working on your original project (i.e a game), then there should probably be another way to go.

Re: Should I start Using Libraries?

Posted: Tue Apr 22, 2014 9:28 am
by SiENcE
After coding several years, i realized, there is always a better coder out there ;).

* Checkout some well implemented libraries. Should be obvious if you know lua. You can git a lot of them on github.
* Write a Library Test, if it fit your needs for your game (of couse you should know what you need before everything else -> game development document).
* If the library suits your needs (also see license) use it. It saves time.
* If it doesn't suit your needs, write your own and give it back to LÖVE community :-).

As Inny already said, ask yourslef if you want to make a game or a library/engine.