Nerdity

Mar. 11th, 2012 09:06 pm
bcholmes: Memories must make do with their delirium (fishies!)
[personal profile] bcholmes

Work has been pretty darn busy since I got back from Haiti in November. December was brutal. January was bad. And the first half of February was brutal. Most nights, I'd come home, lie on the couch and watch videos. That was all I had the mental energy for. I burned through all five seasons of Babylon 5 pretty quickly that way.

By the time Louis Riel Day came around (okay, it's really called Family Day in Ontario, but that's a pretty lacklustre name), I was beat. Conveniently, I'd pre-arranged to take an extra-long weekend to recharge my batteries.

I made a big point of planning nothing. I didn't want to see anybody; I didn't want to do anything. I wanted to sit around and do whatever moved me. Somehow, the thing that moved me was a little coding project.

Okay, here's nerdity. There's a tool for role-playing gamers. It's called Campaign Cartographer. I bought a copy of it many years ago (including a number of add-on products). People use it to draw maps. Like, y'know... dungeons and whatnot. I haven't touched it in years, because it only runs on Windoze, and not only is my Windoze box 10 years old, it's not actually in a state that's easy to turn on. It's mostly disconnected.

Campaign Cartographer is based on CAD (specifically FastCAD). It's basically a vector drawing tool (although the most recent versions of the product have favoured mapping using raster images. No judgement.) Have I mentioned recently that I love vector drawing? Thing is, I prefer SVG and Inkscape.

Somehow, that weekend, I was looking at RPG map making, and one thing led to another, and I was writing some code that could read a Campaign Cartographer file (FCW) and convert it into SVG. And it's been a bit of an obsession. I'd find these new problems: like, how do I assemble a collection of lines and path parts into a one multipoly? How do I handle curves? How many different ways are there to handle fills?

The maps themselves feel a bit retro. 255 colours! Cheesy symbols! But the technical obstacles keep fascinating me. Like, I have a file that defines a bunch of symbols. What's the best way to lay out a sample sheet where I can see all of the symbols at once? Is that like the packing problem?

At this point, I can probably handle about 90% of the vector capabilities. Raster is a big bag o' hurt, and I doubt I'll tackle that.

Tonight, I finally had a breakthrough on splines. Go me!

Take this map (PNG) as an example. Look at those splines! I converted Cubic B-Splines into Bezier curves, and my algorithm worked on the first attempt!

(no subject)

Date: 2012-03-12 01:59 am (UTC)
emceeaich: (rawk)
From: [personal profile] emceeaich
You win at Geek and Nerd!

(no subject)

Date: 2012-03-12 12:59 pm (UTC)
elainegrey: Inspired by Grypping/gripping beast styles from Nordic cultures (Default)
From: [personal profile] elainegrey
Fabulous vacation!

(no subject)

Date: 2012-03-12 01:25 pm (UTC)
From: [personal profile] maize
That's incredibly awesome. :)

Profile

bcholmes: (Default)
BC Holmes

February 2025

S M T W T F S
      1
2345678
9101112131415
16171819202122
2324252627 28 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Powered by Dreamwidth Studios