Monthly Archives: December 2008

Gorgon v1.1.3266.898

sitelogoA new version of Gorgon has been released.  The current version is now 1.1.3266.898.  This fix includes some enhancements to the sprite editor animation editing interface and several bug fixes.  You can see the change list here.

This will be the final release for Gorgon for a while.  I’m going away on vacation at the end f the week and real life (i.e. work) has become increasingly busy so I have no time to devote to Gorgon at least until later in the new year.  If someone wants to pick up the reins and take over for a bit, post a comment here or contact me through the forums.

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.