Coding a CSV editor and viewer

It’s not terribly exciting to most people, but over the last couple days I’ve been using my spare time to put together a fairly full featured but still ultra-simple CSV file editor and viewer. You can click here for the ZenCSV page which has the program, documentation, and source code.

zencsv-screencap

Messing around with PUNG

Wracking my brain to remember math — embarrassingly simple math — that I really haven’t thought much about in twenty years is both rewarding and titillating, and highly frustrating at the same time. I’m going to switch over to some late night reading, but I wrote about half of the collision detection and “angle-of-reflection” type code for the new game (which really would have been much easier to just write in Flash). Of course, the balls don’t actually do anything but detect a collision — while they do bounce off the sides, they ignore the game architecture (which is randomly twitching) and the other balls, just passing through them, although they do light up to indicate the collision and also render the line representing the collision angle between the two in brown, as well the white lines that show the direction and, in a thicker stroke, that ball’s kinetic energy. Hopefully this holds my attention long enough to finish it…

I agree completely, Amazon!

Today I added “redo the layout of all my books (ModCon, Opening Up, etc.) so that they can be easily read on ebook readers” to my welcomingly engorged to-do list. After seeing how dismally the (thankfully free) ModCon PDF renders on the Kindle (and the gigantic Opening Up is only marginally better), to say nothing of the lack of indexing and so on, I felt committed to porting that material for the latest media… And perhaps it will give me the energy to put the final touches on my latest book of interviews on genital mods — a massive tome that’s all done other than a little editing — as well as my biography, which is closer to half done. I don’t know a thing about ebook publishing, having done all my past books in Quark XPress, so I’ll have to do a little research first.

Anyway, I decided it was time to add some content to my currently lonely electronic library, which this morning held only Pill Head (which has been a great read so far). A nice thing about the Kindle is that you can get free samples of books (the first chapter or something), so I was just browsing Amazon for books to check out, and I noticed the oddest thing in the “Biographies and Memoirs” section… specifically the “Criminals” subsection:

amazon-bible-section-1

Now, I’m very much and very aggressively in the “God is NOT Great” camp — enough so as to get me banned from the surprisingly pro-superstition and Muslim-fearing BoingBoing, maybe the first time I’ve been dumped by an online girlblogfriend — so I totally support the way Amazon filed the Bible, but I had to click through to see it in more detail. After first chuckling that the most-likely fictional authors are actually listed with the same hot-linked “what else has Moses written” validity as Stephen King might be, then yes, after scrolling down I saw that, indeed, that God’s memoir has been filed along with the other criminal masterminds that this world has produced.

amazon-bible-section-2

…and yes, this world produced God, not the other way around!

[Note: Full screen caps of the above here; 1, 2, 3]

Anyway, today is a great day. I spent most of the day learning how to do better multi-channel sound output for a game I’m working on, and scratching my head over the trig and geometry (and the various shortcuts to avoid as much of it as possible) involved in calculating the motion vector changes that happen when two billiard balls collide in various ways — which also made me think that after I finish the couple programming projects that I’m fiddling with that I might like to create a zero-gravity 3D pool game, with the pockets placed at the corners of the big cube that the game is played inside… I think it might be fun, and not particularly hard to write with my new skills. Of course, now that Caitlin has an iPhone, I’m also wondering whether that might be fun to do some development for…

Not just a great day for me: Nefarious’s school went skating today at a nearby rink, and right now she’s off at her gymnastics class (I’ve got to keep my eye out on Craigslist for some mats for here I think), and then we’re going to order a pizza, and stay up late watching movies and reading another chapter or two of The Goblet of Fire… The whole weekend should actually be pretty good. I’ve promised Nefarious and a friend that I’d take them to see the Tooth Fairy movie tomorrow (I will of course be reading in the lobby!), and on Sunday Caitlin’s parents are going to visit and I think we’re going to all go and see some Egyptian exhibit at the art gallery. Even with this wretched, torturous hell that I struggle with as my musculature breaks painfully down and I contemplate my demise, life is good and I feel so lucky.

Long time no post

I’ve been under the weather for most of the week so most of my time has been spent prone and moaning, and not in a good way. I loathe being sick, because not only is it unpleasant for me, but it puts such stress on Caitlin and Nefarious as well, and the guilt I feel about that is much worse than the physical pain. However, today things took a turn for the better in a few ways, not least of which was my neighbor signing for a UPS package for me that I missed due to listening to music at a higher volume than the doorbell. I got Caitlin a Kindle for Christmas, and she seems to really like it. I wasn’t sure if I would be able to really get into a Kindle, because “it’s not a book”, and as someone who’s always been surrounded by books I found it hard to believe that the experience would have the same tactile satisfaction. However, when I took Nefarious and Cassie to see The Squeakquel on the weekend — something I had zero interest in attending — I brought her Kindle along to try it out in the lobby as they giggled away in the back row of the theatre, and I loved using it. I found that not only was the experience of reading as good as on a paper book, but that because of the single-page isolation of the interface that I found myself reading sequentially with care and attention, a skill that I worried I’d lost after years of hopping around the net consuming a scattered chaos of bite-sized fragments of disconnected data… So in some ways it was actually better than a book. I immediately went and ordered myself a Kindle as well, although I got the big one for myself, and that’s what came in the mail today. Anyway, below is my new toy, as well as a neat crystal that Nefarious grew from a Christmas stocking gift… I think it’s salt but I’m not sure. Oh, and Nefarious read for an hour and a half tonight, making it to halfway through The Goblet of Fire‘s well over six hundred pages. It’s actually quite amazing how quickly it goes.

amazon-kindle-dx

salt-crystal

Self-Training in Sprite Animation

With UFOs and the floating head of Nefarious no less!

Last night and tonight I put together another graphics test program, this one intended to investigate methods of doing shaped sprite animations, as well as scrolling endless backgrounds, collision detection, and on the fly modifications of the sprite and layer bitmaps. I think it turned out pretty nicely so I’m posting it as a tutorial-minded application that includes all the source code and source images that I used.

Due to a great many embedded graphics that I haven’t bothered to optimize or compress — mostly a nice picture of Costa Rican — this exe is uncharacteristically large at about a meg and a half. You cand download the executable (which contains everything you need to try this) here: ZenSpriteTest.exe

You can also download the fully-commented source code here: ZenSpriteTest.bas and ZenSpriteTest.rc

You can also download the images and icon here (these really explain instantly how the shaped sprites are composited): ZenSpriteTest-images.rar

Feel free to check out the YouTube video I made of the program running… As always, the capture process has caused some degredation in quality and framerate. Anyway, I had fun putting this together and it was much easier than I’d thought it would be. On Monday I’m going to quickly write a more complex collision detection function, and also maybe do a little OpenGL work before I dive into coding the “PUNG” video game with Saira. BTW, feel free to open the video in its own window instead.