2011/11/25 (Villainmad): The "I'm Not Dead Yet" Update
Created: / Modified:
So ... what with one thing and another, I haven't posted here in a while; I have been learning the ways of OpenTK, and I believe I have learned enough to move forward in spite of the atrocious documentation. I decided not to use SDL.Net, after discovering that there's no way to make alpha-channels work very well, and the only coherent tutorial I could find claimed — I am not making this up — that this "should be now[sic] problem because of the fact that Alpha Channels are rarely used in Games." Since every modern game ever uses alpha channels, this made me want to throw SDL.Net across the room. OpenTK it is, then.
I'm nowhere near the point where I was when I left off with XNA; however, in the name of showing off what I've got now, here's my test-file of OpenTK. (Here's the source-code; if you want to compile it, you'll probably have to change the location of the OpenTK.dll and OpenTK.Compatibility.dll references.) Windows-users will require the .Net framework, which you most likely already have, and Linux and Mac users will require the Mono framework, which you may or may not already have. You might need to install OpenAL, but maybe not. That said, this thing should work perfectly well across Windows, Mac, and Linux with no problems at all! Instructions: "Esc" or "Alt+f4" to exit; "enter" to pause and unpause the music.
A couple of notes:
- Do not let the audio run for more than 2,147,483,647 loops (which will optimally take 817 years, for the two-second loop in this test), or there will be integer-overflow errors. (
Todo: figure out how to remove an already-played sound-buffer from an OpenAL queueYay, I got it! Uh, there's still limitations to this approach, since it will break if the loop-part begins and ends between frames-of-animation (for whatever reason, such as because the loop-part is too short, or because the program has temporarily frozen), and I haven't re-uploaded it, but ...)
- I seriously cannot figure out how to get Ogg files to work directly with OpenTK's audio, so we're stuck with tens-of-megabytes WAV files for music at the moment.
- Note to self: keep better track of my graphics artist(s), so that it does not take two months for me to hear from 'em.
- Current projected time of the game's actual completion: July 2012.
Previous: 2011/09/01 (Villainmad): The Collision-Detection Update
Next: 2011/12/09 (Villainmad): And (almost) back to where we were.
Back to Villainmad
Back to My Games
Back to Main Page