Main Page » My Games » Villainmad »

2011/11/25 (Villainmad): The "I'm Not Dead Yet" Update

Created: / Modified:

Always use secure-HTTP / Unsecure HTTP / Permanent Link

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 queue Yay, 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.

9 Comments (auto-closed) (rss feed)

Player Three

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)

I almost want to take on that challenge.

Dizzy H. Muffin

That would be silly!


Ack, used < and > normally, my bad. What it was meant to say was

< Insert obligatory Sakuya joke here >

Formica Archonis

I almost want to take on that challenge.

Dude, don't trigger warp mode on the Matrix emulators. Last time someone did that I woke up with sixteen of the same cat and an Enderman in my bed.


@Formica Archonis
Hope you didn't look at it in the face! and did you find good homes for the cats?


Im more concerned about the endermen... dont look at it not even for a moment. Good luck,
The Doctor

Dizzy H. Muffin

Oh, I figured out how to deal with the integer-overflow thing. But, um, I have gotten bogged down with figuring out how to implement a New Feature, when I should really be working on implementing Existing Features Which XNA Had But Which OpenTK Doesn't.

Formica Archonis

No worries, BigB & Marbo. I'm very skilled at not making eye contact with anyone I wake up next to!:)