Monday, October 13, 2014

SFML Tutorial: Hello World

In this tutorial, we'll create a SFML window and draw a shape and some text, and demonstrate a basic animation.

This tutorial assumes that you already have the SFML.Net libraries and their dependencies, but we will create a new project file for this tutorial. This and all future tutorials will assume that you are using Visual Studio (however, it's definitely possible to use SFML.Net with Mono!).

A portion of the code used in this tutorial (and likely future tutorials) is taken from the official examples for SFML.Net.

Friday, October 10, 2014

Setting up SFML.Net

SMFL.Net is a binding of the Simple and Fast Multimedia Library that allows us to use its functions in C# and VB.Net. It's simple to use (hence the name) and portable (although my tutorials will only focus on Windows).

However, setting it up requires some extra work compared to some other libraries. The pre-built libraries available on the SFML website are not only a year old (so they're missing quite a few changes made since then), but the dependencies included probably won't work and one of the DLLs is MIA (technically it wasn't missing at the time, but now it's an important part of the library).

(I know things have been mostly OpenTK up until this point, but I needed a bit of a break. And if these SFML.Net tutorials go on long enough, they'll end up back in OpenTK territory, so don't worry!)

Sunday, July 13, 2014

OpenTK Tutorial 6 Part 3: Putting it all together

Now that we have TexturedCube, and a way to load shaders and textures, we can finally get to the good part, drawing some textured objects!

In this tutorial, we'll be wrapping up the texturing content. At the end, we'll have two cubes being rendered with different textures on them.

Monday, June 23, 2014

Sorry for the Delay

I'd like to apologize for how long it's taken to get the last part of the newest tutorial up. My eternal excuse is that I'm busy with work, which is true (but it's always true, welcome to life), but I don't want to put it off much longer. If I can't get a real break soon, I'll probably just make a more barebones version that has all the code, but much less commentary.

Wednesday, April 23, 2014

OpenTK Tutorial 6 Part 2: Loading Textures and the TexturedCube Class

Now that we have our shaders loaded in a new, more object-oriented way, we're a third of the way to having textured objects in our program!

In this tutorial, we'll add a function to send textures to the graphics card and write a new class to give us a cube with texture coordinates. Unfortunately, we'll need to wait for part 3 to put these to use, but I'll try to hurry it along (summer is almost here)!

Tuesday, March 11, 2014

OpenTK Tutorial 6 Part 1: Loading Shaders with a Class

This tutorial will cover basic texturing. To add a texture, we will first need to have a shader that handles it. Right now, we're using one shader, with no way to easily switch to another without requiring everything to use that shader. In a real game or program, we would probably want to be able to use multiple shaders (for example, UI elements probably don't need lighting applied to them, but game objects probably do), so we're going to handle this with a class that allows us to easily add more shaders if we need them, and switch between them at will.

This tutorial is split in parts, based on how long it is. Each step is rather substantial (and this groundwork will make things easier down the line), so I hope everyone understands why it needed to be split up like this.

Tuesday, February 18, 2014

Minor tutorial update

Since OpenTK 1.1 is officially out now, the tutorials have been updated to use it. There's a minor change to the Program class in all of them, which is required for them to run (thanks to an anonymous commenter for pointing it out). Other than that, Tutorial 5 is the only one with major changes, which make it no longer reliant on System.Windows.Forms, instead using the new OpenTK.Input classes.

Thursday, February 13, 2014

Good news!

Small update here, but I figure some good news is definitely better than no news.
 
OpenTK 1.1 will be released later this week. It includes a lot of fixes and a lot of changes, so my first priority will be to update the old tutorials to use it. A commenter pointed out that none of the code will work without changes, due to something that was modified in how GameWindows work. Even the newest one needs some fixes (the OpenTK.Input classes completely change how we'll want to handle input), but it should be a very short process.

Friday, January 10, 2014

OpenTK Tutorial 5: A Basic Camera

Now that we have many objects displayed, let's make a way to see them properly.

In this tutorial, we will be creating a simple camera with WASD controls and mouselook.


Monday, January 6, 2014

Navigation changes

Quick update here, changed the blog navigation (at the top) to make things a little nicer. There's a list of all the tutorials so you won't have to search anymore (it'll end up being a bigger issue as time goes on), a downloads page for older tutorials (content being uploaded as fast as I can) and a list of expected future tutorials too. I'm still really busy with work right now, but the next tutorial will get hopefully not take too much longer to be finished.