27 July 2005

board

I've been playing with POV-Ray again, making 3d models and rendering them. It's the program I used back when I was rendering LEGO models, and I had even used it for a college class to make some very impressive prototype mockups, but I haven't touched it in over a year and thought I was getting rusty. The POV-Ray Scene Description Language isn't exactly difficult, just complicated.

I write it all by hand, of course. Figuring out how to easily turn primitive shapes and solids (cones, spheres, boxes, planes) into interesting objects is just half of the challenge: the other half, of course, being the typing them in without making too many mistakes part. There are programs out there that can do it all visually on screen, all CAD-like and cool, but that's just not my bag, baby.

So what was my project this time? Pac-Man. I wanted to be all authentic, so I tracked down an arcade ROM* and a program to emulate it (thank you XMAME) and then set out in my quest to have a pixel-proportionate copy of the game screen, minus the titular character and ghosts.

Well, for now minus them. They're not exactly so complicated that I couldn't duplicate them with some more simple shapes...

So this is what I have, more or less. The key is turning it into something cool.

One rendering: does it look familiar?


* Actually the ROM I ended up using is the original Japanese Puck-Man, but when Namco brought the hallowed game to our shores somebody smart noticed that the name (in big bold letters on the side of the cabinet) could very, very easily be changed to something not quite appropriate for an arcade full of impressionable kids.

Incidentally, I wasn't really ever that big a fan of Pac-Man. I never played it in an arcade. We had it for the Atari 2600 (say what you will about that not being a true port, it was the best we could get) but it was the first, and only, game cartridge that has ever died. Pac-Man has brought me little but trouble all along, I guess. The reason I ended up with Puck-Man was that I was having some minor difficulties with XMAME reading the correct pacman.zip, so I gave up and went with what worked. It's the same game anyway.

20 August 2004

the great layout challenge

So I have decided to tackle the well-known Opera / Wordpress issue with the post editing page. It seems that Opera 7+ lays out fieldsets differently from IE and Firefox, or rather doesn't lay them out at all. It just throws them in on top of each other, not next to each other as do the other browsers.

So what I did was to wrap each fieldset on the post.php page in a div (bad semantics, but if it works I won't complain) with this CSS:.xxx {
clear: all;
float: left;
margin: 2px;
padding: 0;
}

I removed the categories fieldset as all of my posts are in General, but other fieldsets disappeared, some at random. Resizing the window had some funny effects, but I do not doubt that a more masterful CSS hacker couldn't take this and run with it.

This is what my five minutes of monkeying around gave me:Screenshot of my modified wordpress post page

26 June 2003

simple uses for a complicated tool

Seeing as I use a very simple kluge to separate the links and writeups for my (other) blog, I needed a simple kluge to get the titles of my links back out. Surely, I thought, nobody else puts a link in EntryMore with only "link" for text and the actual site name in the link title, thus nobody would've made such an otherwise pointless plugin. Whilst searching for information on how to develop my own, I stumbled across Kevin Shay's Collect, which while being much more useful and powerful, nevertheless can easily be coaxed into doing precisely what I want. Non bloggers need not read on.

Basically, my entries are structured like this: a couple paragraphs in the regular Entry describing a link given in the EntryMore, as in this example:<a title="Ketchup, my links blog" href="http://mikelietz.org/ketchup/">link</a">It's set up this way to be easily updatable and consistent, and so far it works pretty well. The problem I encountered is that all of my EntryMores read exactly the same text: link, and only can be told apart in a browser supporting title attributes. And MT doesn't natively support any sort of a->title parsing. So for me to make a master list of every link ever blogged, I'd need some help. Enter a plugin.

I stumbled across Collect, and with a little trial and error I came up with this snippet of code. It spits out the entry's title and a link named with the link's title. Not too bad for ten minutes' work. My index template using it is now functional if not totally styled, and you can see it here. My code is below for anyone interested, though I doubt anyone else is cheating quite in the same way I am.

<MTEntries lastn="999999">
<MTCollect tags="a">
<$MTEntryTitle$>
<MTCollectThis>
<$MTEntryMore$>
</MTCollectThis>
<MTIfCollected tags="a">
<MTCollected tags="a">
<a href="<$MTCollectedAttr attr="href"$>"><$MTCollectedAttr attr="title"$></a>
</MTCollected>
</MTIfCollected>
</MTCollect>
</MTEntries>