Archive for May, 2008

Some stuff

Tuesday, May 6th, 2008

I got some more Platformer stuff done. First, here’s what the level editor is looking like:

Right now you can only edit collision tiles, but I’m working on adding the visual tile and entity placement stuff.

And also, here’s the Sprite Crammer tool I’m working on to put multiple frames (relatively) efficiently into texture pages, using some sprites from Ravuya’s Glow. The benefits of this are twofold. First, it cuts out extraneous transparent borders on images, saving some information in an XML file so you can draw them back at the correct offset; that saves you some video RAM. Second thing, it reduces the amount of texture switches necessary, which is nice if you have lots of sprites onscreen. Some other nice features it has are a commandline mode (for using it in build systems), and Linux support if you want to run it under Mono. The UI looks a little weird due to variances in font sizes not really playing well with .NET’s absolute layout rules, but it still works, as does the commandline version.

The Glow sprites, again, are Ravuya‘s.

S&MDI

Tuesday, May 6th, 2008

Okay, so has anyone else noticed a curious blurring between SDI and MDI apps happening? The main culprits here are Microsoft Office and Adobe Acrobat Reader. Let me demonstrate. Normally, a program either has one window per document (thus, one taskbar button per document), or one window and subwindows for each document (only one taskbar button.) MDI apps have generally been decreasing in popularity recently, generally only sticking around for things like IDEs, Photoshop, or web browsing, if you count tabs as documents. However, if you open MS Excel or any Office program, and do a File->New (well, the equivalent now that there’s no actual menus), you’ll find that you have two taskbar icons, but one actual window.

Now, I guess they did this so the somewhat more confusing MDI system is easier to use from the taskbar. But it totally mixes metaphors. You actually have only one window, but you’ve got N taskbar icons. I think they probably should have just converted entirely to SDI, seeing as it’s gotten the better evaluation from UI experts (as far as I understand.) But the practically annoying thing about it is this:

Because of whatever black-magic voodoo is going on to make taskbar icons for nonexistant extra windows, you can no longer close an entire group of them on the taskbar, or do any of the other actions on the menu for the group. I regularly close lots of windows from the taskbar when I finish working on something, going down the line and purging stuff I don’t need anymore, but I can’t do that with this behavior.

The weirdest thing is, if you go into the Excel window (with the documents “maximized” like normal, not in a non-maximized state like the screenshot) and hit the “X” for the whole outer window, only the top document closes.  So basically none of the normal “close all of these windows” actions works at all.

Adobe Acrobat Reader is exactly the same, except the “X” closes everything, which is also somewhat annoying if you had multiple PDFs open and intended to just close one. (I tend to forget an app is MDI if I use it 100% of the time with the document sub-windows maximized, like I imagine most people would.)

The weird part is they seem to have gone out of the way to make the programs behave like this half-single, half-multiple document chimera, as usually each main window gets its own taskbar icon.