FreeBasic Games Directory Forum

FreeBASIC Game Development => Programming => Topic started by: aleofjax on December 27, 2007, 03:38:57 AM

Title: The Dark Art of External Libraries
Post by: aleofjax on December 27, 2007, 03:38:57 AM
This may be a little general, but I think it would be especially useful to game developers.

Several times now, I've posted in the freebasic forum asking how to use this or that library. I think instead of cluttering the boards with continual requests like this, it would be a good idea to have a tutorial that teaches basically how to impliment any external library in FB. For designing games, I'm sure there are tons of libraries that would be great to use, but only a select few have been ported to FB.

Here's what we need:
1 - how to use external libraries in FB (assuming the library is precompiled, and headers are available)
2 - how to convert headers from other languages into .bi headers (using SWIG or doing it manually)
3 - how to compile external library source code (using GCC, of course) and make it FB compatible
... anything else that I missed

I think with this information available, we would have a lot fewer requests for code conversions, and a lot more people actually contributing to the project. I know that sounds like a fb.net motive, but who needs to be able to use a broad set of external libraries more than solo game developers?
Title: Re: The Dark Art of External Libraries
Post by: notthecheatr on December 27, 2007, 11:05:19 AM
That would probably be great, but it would also be a very long thing to write. And even then the absolute n00bs wouldn't cease their questions.  Perhaps more useful would be to write specific tutorials for each library.  If you use a library and nobody else has written a tutorial for it, write one!

Generally though, if you want to be a good programmer, you have to be willing to do some experimenting, exploring, etc.  I learned to use wx-c by paintstakingly looking through the headers and figuring out how functions worked based on their name and arguments (of course, the examples helped).  If people understand that that's what it takes to learn something new, then they'll do it (as opposed to asking someone else to do it for you, because if you don't understand what they did then you aren't really learning anyways).

It would also be good to have a newbie tutorial for understanding C.  Not writing C code, just understanding C from a FreeBasic perspective.  That would make converting headers and things much easier.