Just a random thought here.
Does anyone here dislike using libraries or code that they didn't write themselves in their games?
I always feel that when I do this, I rely too much on said library and if something happens, the entire game could be all for naught.
What do you guys think?
Using Libraries
- dreadkillz
- Party member
- Posts: 223
- Joined: Sun Mar 04, 2012 2:04 pm
- Location: USA
Re: Using Libraries
This is an age old question in programming. There have been earlier discussions about this:
viewtopic.php?f=4&t=8608&p=53181#p53181
viewtopic.php?f=3&t=9826&p=60279&hilit= ... ies#p60279
http://c2.com/cgi/wiki?NotInventedHere
I personally enjoy using libraries as long as they have good documentations and examples, especially for more more complex tasks such ask tile handling, collision, animations etc. Sometimes, I like to read its internal working and see if I can improve upon it rather than building the same thing from scratch (unless its really poor code, I'll try to make my own version).
If it hasn't been done yet, you could also be the nice guy and share your work so other people can improve upon it. But really, if you have a lot of free time, go right ahead and try to do things on your own.
viewtopic.php?f=4&t=8608&p=53181#p53181
viewtopic.php?f=3&t=9826&p=60279&hilit= ... ies#p60279
http://c2.com/cgi/wiki?NotInventedHere
I personally enjoy using libraries as long as they have good documentations and examples, especially for more more complex tasks such ask tile handling, collision, animations etc. Sometimes, I like to read its internal working and see if I can improve upon it rather than building the same thing from scratch (unless its really poor code, I'll try to make my own version).
If it hasn't been done yet, you could also be the nice guy and share your work so other people can improve upon it. But really, if you have a lot of free time, go right ahead and try to do things on your own.
- slime
- Solid Snayke
- Posts: 3172
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Using Libraries
Why are you using this, then? https://bitbucket.org/rude/love/src/a66afb2d4fd0/srcRaylin wrote:Just a random thought here.
Does anyone here dislike using libraries or code that they didn't write themselves in their games?
I always feel that when I do this, I rely too much on said library and if something happens, the entire game could be all for naught.
What do you guys think?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Using Libraries
Not finishing a project because of a library you used does not happen very often. Not finishing a project because you try to do too much yourself is, however.
Help us help you: attach a .love.
Re: Using Libraries
Peronally I always make my own libraries wherever possible because otherwise I feel the game isnt really entirely mine
Your screen is very zoomed in...
Re: Using Libraries
I can understand the desire to write and use your own stuff. However, the more time I spend writing libraries, the less time I spend making games. This is part of the reason I'm using LÖVE instead of C++ with SFML.
Where's my big, fat hammock time?
I should pimp my neglected game dev blog.
I should pimp my neglected game dev blog.
Re: Using Libraries
Personally I only use some basic libs like AnAL and some of the HUMP libs (Class, Gamestate).
Most of the other libs didn't handle things like I would like to use them so I write "simple" libs like gui / collision / fade / text libs on my own.
Most of the other libs didn't handle things like I would like to use them so I write "simple" libs like gui / collision / fade / text libs on my own.
Re: Using Libraries
Given the nature of Lua where the entire global state is your responsibility, more or less, I feel like some of the more traditional library design styles, i.e., the multiple file and multiple directory module, are too imposing. Most of the Lua community seems geared more towards a one-useful-function or one-useful-file style. It's no surprise that module function was deprecated and the Return Local Module style is starting to become very common. But that's not to say that some of the larger Libraries are shunned because they have too many files. Penlight certainly sees a lot of traction.
If I had to make a recommendation, and see it take on a large community role, I would say that Library makers should design their libs to be ripped apart function by function and used as the app and game programmers see fit. Fortunately, most code written in Lua is zlib or mit licensed, so we can in fact do this kind of thing. Just, well, expect it. Kikito's middleclass follows this mentality. Though if I had to make one change, it should probably be upgraded to the return local module style, rather than changing anything in _G.
If I had to make a recommendation, and see it take on a large community role, I would say that Library makers should design their libs to be ripped apart function by function and used as the app and game programmers see fit. Fortunately, most code written in Lua is zlib or mit licensed, so we can in fact do this kind of thing. Just, well, expect it. Kikito's middleclass follows this mentality. Though if I had to make one change, it should probably be upgraded to the return local module style, rather than changing anything in _G.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Using Libraries
Funny that you mention that. It's totally on my TODO list for middleclass v3.0 (which I plan to release at some point this year).Inny wrote:Though if I had to make one change, it should probably be upgraded to the return local module style, rather than changing anything in _G.
When I write def I mean function.
Who is online
Users browsing this forum: No registered users and 13 guests