After getting Visual Studio all installed and updated again on the current PC I’m using (and we all know how long that takes, blah!), I decided to go ahead and get started using Simple Fast Media Layer (SFML). I used to use SDL for such projects but SFML has a .NET wrapper and is somewhat cleaner in general.
After downloading the .NET version of SFML I found out that some of the things needed to properly utilize it were rather scattered about, and decided to go ahead and write up a quick guide to save future SFML users from having to search about for the necessary pieces of the puzzle. So without further adieu, here is how to set up SFML in C#:
I will go ahead and assume that you already have Visual Studio/C# installed and set up. You’ll also need an archiving program. I recommend iZarc because it’s free and supports a load of file formats.
- Download the latest version of the .NET SFML library and unpack it somewhere.
- The SFML site has details on how to set up Visual Studio so it will be able to find the compiled libraries, but if you’d like to simply have them work from anywhere, copy the files from the extlibs directory into your System32 directory.
- Go grab the latest version of the Tao Framework and install it. It’s not strictly required for SFML, but the OpenGL sample uses it.
- The .NET SFML package only has a solution file for Visual Studio 2005, so you’ll want to open it once and let it convert if you’re using a newer version.
- After that you should be good to go, enjoy!
I know that seasoned developers reading this will find it a bit old hat, but I hope this helps someone out down the road anyway.