SFML

From Mario Fan Games Galaxy Wiki
Revision as of 06:13, 8 August 2009 by OniLink10 (talk | contribs) (Created page with '{{Needsattention}} '''SFML''', or ''Simple and Fast Media Library'', is a free and open-source media library written in C++, although it has ports to C, [[C#]…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 Stub.png This article or section is in need of expansion.

Please add further information.

SFML, or Simple and Fast Media Library, is a free and open-source media library written in C++, although it has ports to C, C#, Python, D, and Ruby. It has 5 Core Libraries, System, Window, Graphics, Audio, and Network. All of the Libraries depend on System, and Graphics also depends on Window. The Libraries are currently at V1.5, and there is a V1.6 and a V2.0 in development. V2.0 will be a complete rewrite of the Libraries.

System

Multi-Threading

The System Library has good support for Function-Based Multi-Threading. This means that it can create Threads, or "Mini-Programs", that run at the same time as the Main Program. These Threads use a Single Function for determining their code, which can use other functions as well. This Function is passed to the Thread class, sf::Thread, in the Constructor of the Thread. However, to provide more flexibility, the Thread Class can also be used as a base Class, and the code for this Base Class is stored in the Run() virtual function.

Random Number Generator

The System Library also has a good Random Number Generator. Scratch that, it has a good Pseudo-Random Number Generator. Computer's can't generate truly random numbers, Computers use a "Seed" to generate the number. Just pass the Random Number Generator's Class a Seed, usually the result of time() from the ctime library, and use the Random(min, max) member function, It will return a float or an int for a random number, depending on the seed, min, and max you gave it.

Window

Information Soon...

Graphics

Information Soon...

Audio

Information Soon...

Network

Information Soon...

External Links