Helps

sitelogo

So I’m at a bit of a crossroads here.  I plan on releasing a new version of Gorgon by the end of next week (then I’m on holiday in Winnipeg… I need my head examined).  I’m running out of steam for working on Gorgon.  And I think I’ve done as much as I want to do with it.  It’d be a shame to give it up and just let it die, I did put a lot of time into it. 

So with that in mind I’d like to put a call out for help.  Basically I need someone other than myself to help with maintaining the code, and so on.  So if you like Gorgon and you think you can do it better, then please, leave a message either in the comments section or on the forums and we can get talking.  Even if you just want to write (or already have written) examples or tools for Gorgon, that’d be a help. 

Eventually I’d love to just leave this project in the hands of whatever “community” is interested in Gorgon and then I can go on my merry way.

Animation is fun

So I took on a major undertaking this weekend and fixed up some outstanding issues with the SpriteEditor’s animation editor system.  Mostly tweaks and bug fixes for the next release, nothing major.  The major undertaking was the new track view panel I added.

One thing that’s bugged me for a long time is that the animation editor never had a standard track view where you could add keys and see all the other tracks in relation to the track you were busy building.  The downside to this was that building an animation with multiple tracks could be tricky to sync up.  The reason for this is because in the public incarnation, the animation editor only has a combo box displaying the track names and a track slider to advance through the keyframes.  If I wanted to sync up a rotation to match up to a position key frame, I’d have to switch back to the position track find the key, make a mental note, switch to the rotate, add the key and pray it worked.  This of course was designed this way because I’m very lazy and wanted something quick.  No real animation package would work this way.  They all have this wonderful grid of boxes with each row representing the animation track and the cells indicating the individual key frames.  All very pretty, and very annoying to code.

But this weekend, I did this:
Behold the track system at the bottom.  And it’s got those funky glassy buttons that we all hate but secretly love because they do look fairly awesome.  I think it looks much better now.  And of course the thing is functional, if you click on a keyframe button, it’ll jump to that frame, and if you click on the track name, it’ll load the appropriate editor.  Assigned keys show up in blue, and so on, It’s just fantastic.   

One thing I ran into while building this behemoth (aside from the spectacularly shitty code I’ve written for the sprite editor in general) was that once an auto scroll has an AutoScrollMinSize of (32767, 32767) it stops responding to events.  What’s even more funky is that it still works, it scrolls right to the end even if the size is greater than 32767.  Unfortunately this causes issues for my animation system as you can have thousands upon thousands of keyframes if you so choose.  The solution to this hiccup was to make the keys wrap underneath after 1024 keys (1024 was the highest number of keys that could be displayed before the scrollbars went into overflow).  Of course, not the best solution to the problem, but it works.

Anyway, this will be included in the next milestone of Gorgon or if you’re addicted to subversion, you can grab the most recent build from the trunk.

Intel needs to STOP making video cards.

Because they’re TERRIBLE at it.  Yesterday I got a bug report about Gorgon displaying nothing but corrupted garbage on an Intel 945 Express chipset.  Of couse my alarm bells when off when I read the word “Intel” and I immediately set out to find someone else to confirm this.  Of course, finding someone with these older chipsets is like trying to find gold in my toilet and thus I had no way to confirm or even know where to start. 

That is, until today when I remember that the machines in the office all have onboard video in addition to having Radeons.  I checked the computer next to me and lo and behold it had an Intel 82865 integrated nightmare.  So I set it up for development with Gorgon and found the issue that was causing the corrupt graphics.  Lo and fucking behold.  It turns out to be, wait for it… a driver bug

Here’s what went wrong:
My code creates one vertex buffer to display the sprites.  It never, ever, ever, changes the structure of the buffer, nor does it have any other reason to re-create the buffer.  All it does is modify the contents of the buffer.  So with this in mind, I only call SetStreamSource once for the lifetime of the application (except in cases of a device reset) – this is a performance thing, while not terribly slow, it still helps speed things up a tiny bit.

So in my search to find what’s wrong I run the ball demo through PIX (which is godly) and get a snapshot of my vertex buffer in action.  For my test I had set up 2 sprites, each using a different texture so it’ll force a flush of the renderer.  Sprite 1 was sized 64×64, sprite 2 was 200×56.  The first sprite was displayed in the upper left of the screen at (0, 0) and the 2nd was place at the lower right (600, 544).  When viewing the contents of the vertex buffer when it was submitted to DrawIndexedPrimitive I saw this for the first sprite:

  • Left, Top coordinates: 0, 0
  • Right, Bottom coordinates: 64,64

That’s correct for the first sprite, but here’s what I got in the vertex buffer for the 2nd sprite:

  • Left, Top coordinates: 0, 0
  • Right, Bottom coordinates: 64,64

Clearly the second sprite is not writing to the buffer.  But why?  So on a hunch i found culprit:  SetStreamSource.  Like I said earlier, it’s only called once to bind the vertex buffer.  So I set it to be called every frame and sure enough, the application worked. 

Here’s why it’s Intel’s fault:
On some advice I ran the program with the reference rasterizer and using the debug runtimes (which I always check first anyway). 

The reference rasterizer is the guide to indicate how D3D is SUPPOSED  to behave.  And when an app doesn’t behave the same way on the refrast as the hardware, then the drivers are in question. 

Anyway, I was concerned that I was doing something wrong by only calling SetStreamSource once, even though it worked on just about -every- piece of hardware that I’ve been using.  So I ran my original code through the refrast and sure enough – it worked.  Thus, the intel driver is broken. 

I think for any other projects that I publish (not including Gorgon since I’m already in too far), I won’t be supporting Intel’s buggy drivers.

Quicktime is a whore

Quicktime is garbage.  It’s ugly, slow and useless.  But more than that, it hijacks some file associates and MIME settings.

Tonight I spent about 2 hours trying to make Quicktime let go of the PNG MIME association.  Why?  Because every time I opened a PNG in IE7, the fucking thing would launch quicktime and use THAT to display the PNG.  So, instead of ranting on further about how awful quicktime is, here’s how you cut that piece of shit off:

  1. Run regedit.  Back up your registry – Be very careful about fucking with your registry, you can damage your install of Windows.  No, I don’t take blame if you’re too dumb to be careful.
  2. In the following places:  HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\MIMEAssociations\
    Delete anything to do with png, you’ll see keys like image/png and image/x-png.  Delete those.  Quicktime has placed those keys there.  Try out IE and see if you can display PNG files.  If you can, we’re done.  If not, see step 3.
  3. HKEY_CLASSES_ROOT( and KEY_LOCAL_MACHINE\Software\Classes)\MIME\Database\Content Type\
    Look for the following keys:image/png and image/x-png.  Do not delete these keys.
    In these keys you should have these two string values:
    Name: “Extension”, Value: “.png”
    Name: “Image Filter CLSID”, Value: “{A3CCEDF7-2DE2-11D0-86F4-00A0C913F750}”
    Only those keys should be there, remove any extra keys.
  4. For x64 users: Perform step 3 and include KEY_LOCAL_MACHINE\Wow6432Node\Software\Classes as well as the other two locations.

I hope this helps someone.  Because, Christ, there’s next to NO info on how to fix this problem.

Gorgon v1.1.3246.24958

It’s that time again.  A new version of Gorgon has been released into an unsuspecting populace to help spread terrorism and christianity at the same time.

There are multiple bug fixes, and these are detailed here.  The most fun thing is that I’ve included a new example that demonstrates how to make per-pixel lit (and bump mapped) sprites via normal maps.  It’s pretty spiffy if I do say so myself.

Other than that, the biggest change is the upgrade to the November version of SlimDX.  With this version the requirement for the Visual C++ 2008 SP1 runtimes has been dropped (about goddamn time too) and the SlimDX guys have created awesome installers for SlimDX.  The big deal about dropping the runtimes is that Gorgon no longer requires the runtimes to be distributed with its own installer and this has decreased the size of the installer (a little).  But the biggest deal comes from the SlimDX runtime installer and x64.  This installer will put SlimDX (both x64 and x86 versions if you’re on an x64 version of Windows) into the GAC.  This means that if you’re running with a project configured for AnyCPU (Project Properties->Build Tab), and you’re running on an x86 OS, it’ll use the x86 version of SlimDX automatically, and if you’re on an x64 version of Windows it’ll use the x64 version automatically.  This means there’s no longer a need to maintain two project/solution files for x86 and x64.  This is a great relief to me as it was a pain in the ass to keep updated.  Of course, this only works if both platform versions of SlimDX are installed into the GAC (e.g. if you only have the x86 version of SlimDX installed and the program is forced to compile to x64 – it’ll fail). 

Wait… what’s that?  You -want- an x64 (or x86) only version of your program?  Well, just set it to compile for x64 (or x86) instead of AnyCPU and the runtime will automatically use the x64 (or x86) version of SlimDX.  Fantastic!

So what are you waiting for?  Happiness is only a download away.

New Gorgon Example

So I kind of broke my promise to not add anything new, and added a new example.  This one deals with per-pixel bump mapping.  It will be included in the next round of bug fixes for Gorgon (of which there are many).   I’ve put up a screen shot of it in action, although it really needs to be seen in its fully animated glory to get the full effect.

As I said there are many bug fixes that have been implemented in Gorgon and I’ll package and distribute another release by the end of the month (I want to be sure to catch as many as possible).  None of them are show stoppers, just annoyances.  You can easily keep up to date by grabbing the code from the sub version repository on the google code page.  I’m aiming for the end of the month for a release unless I find a really major bug, so it’s entirely possible that it could come sooner.  But the way things are looking, it looks like I’ll stay on schedule.

As always, I’ll keep all two of us posted.


Edit: I just encountered a bug with the 1.1.0.0 installer. If you attempt to install the source code it’ll complain about installing x64 components if you’re using an x86 version of Windows. Just deselect “Install Source” before installing. If you need the source, you can get it from the subversion repository. Sorry about that, I’ll get that straightened out with the next release.

President Obama

So my US counterparts.  You have a new president. 

I’m a Canadian, and I’m a very proud Canuck.  For the last 8 years I’ve watched the US get flushed down the toilet by incompetence and greed.  Because of this it became a shadow of its former glory.  And now you’ve gone and elected a man who can possibly repair the damage done by that imbecile, George W. Bush.  I sincerely hope he can start the US back on the path to greatness.

I followed the election coverage tonight with great interest.  Certainly with more interest than I showed for my own country when our election came around (Stephen Harper’s another imbecile btw, too bad we don’t have a candidate with 0.0000000000001% of Obama’s charisma).  I cared so much about it because not only was it the potential end of the reign of incompetence, but also because of the historic connotations brought about by electing the first black president.  I’m proud to have been able to witness this in my lifetime.  And I’m proud, for the first time in a very long time, of the USA for having the foresight to elect this man.  Not because of the colour of his skin, but by the quality of his character.

The USA has always claimed to be the greatest nation on the planet.  Tonight, they have taken the first step to proving this to the rest of the world.

Yay!  Now I can come visit Seattle.  Finally.  Btw, Mr. Obama, will you please do something about this stupid passport requirement (I have one, but we were such good friends once, that I didn’t require it)?

Congratulations USA.  I wish your country and its people the greatest luck on your road to recovering your status as the great nation you were before Bush.

Gorgon v1.1.0.0 released from it’s beta cage to cause untold carnage.

Version 1.1.0.0 (Ionian) is now live.  This is a final release version and that means v1.1.x is now out of beta.  The list of changes are located here.

Note that since the beta, I’ve yet again changed installers.  I know some people don’t like installers (and I don’t either sometimes), but it’s really handy when I need to set up file associations, and have some sort of automated uninstall.   Plus the installers will automatically detect whether the Visual C++ 2008 SP1 runtimes are installed and install the necessary files if needed.  That’s a convienence that I appreciate.  Note that I don’t have redistributables for DirectX or .NET 3.5 SP1.  Those installers are huge, and I don’t think I’m allowed to package the web installers – nor am I able to write the install scripts required to download them (yet).  For now it just tells you that you need those packages and will abort until they’re installed.  Links to those installers are provided on the downloads page.

From this point on, I’m only going to be making small corrections to the library if a critical bug pops up.  I don’t plan on doing any other major additions or upgrades (at least, not for a while).  I’m going to focus on other projects in the coming months.  I will be keeping an eye out for bug reports on the forums and on the google code issues page so I’m not abandoning the library.  However, if there’s anyone who’d like to pick up the reins of this project and move it on to the next level, let me know via the forums and I’ll add you to the project user list. 

With that said about installers, please be sure to remove any previous version of Gorgon before installing.  If you were using the betas, this should just amount to deleting the directory you installed Gorgon into and the start menu folder by hand.

Anyway, enough of that.  Go download it and write something spiffy.

Blogs are for idiots.

And thus why I did this.  Plus I’m wanting to move away from my gamedev journal, it’s… yeah, it’s just fucking bad.

So from here on, all Gorgon related announcements will appear here and my rants, which are just fucking awesome, will appear here as well.  Any future projects will have announcements here as well.

So yeah, it’ll be updated every time a random random number generator in a random country returns 3.5322874.  Which is quite often if you have a life expectency of 150,000 years +/- 2.125 years.