Should I start Using Libraries?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
TheScriptan
Citizen
Posts: 56
Joined: Wed Feb 27, 2013 7:53 pm

Should I start Using Libraries?

Post 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?
User avatar
SneakySnake
Citizen
Posts: 94
Joined: Fri May 31, 2013 2:01 pm
Contact:

Re: Should I start Using Libraries?

Post 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.
TheScriptan
Citizen
Posts: 56
Joined: Wed Feb 27, 2013 7:53 pm

Re: Should I start Using Libraries?

Post by TheScriptan »

Thank you for the response! :)
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Should I start Using Libraries?

Post by kikito »

I wrote my answer to that here: Cool Stuff vs Yak Shaving
When I write def I mean function.
TheScriptan
Citizen
Posts: 56
Joined: Wed Feb 27, 2013 7:53 pm

Re: Should I start Using Libraries?

Post 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! :)
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Should I start Using Libraries?

Post 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.
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Should I start Using Libraries?

Post 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.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Should I start Using Libraries?

Post 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.
User avatar
SiENcE
Party member
Posts: 804
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Should I start Using Libraries?

Post 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.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests