Found it…

I figured out the bug. As I had suspected, it was stupidly simple. I was immediately overwriting the saved map with the saved game variables. That explains the mysterious sequence of numbers. I don’t know how I thought that would work: writing, not appending, different information to the same file.

The next problem was that the special object array wasn’t being regenerated correctly. That was another easy problem, as I had simply neglected to make a function call.

I’ve had trouble working from someone else’s code. At least these problems are fixed now, and I like to think I’m getting the hang of it. I’m happy the problem wasn’t a fundamental misunderstanding of C on my part. I still don’t understand why the special object array exists in the first place.

I’ve also added pausing, and plan to work on the difficulty curve, customizable key bindings, a main menu, general code cleanup, and smoothing out the rough edges in the UI.

Essay and More

The first draft of this is dated October 18th, so many things in it are now dated, but here goes.

I’ve been thoroughly shaken by an essay question on a college application. Not that it’s a difficult question or anything.

Tell us about a time you used your creativity.

It should be easy enough. The problem is I’m having trouble thinking of recent uses of my creativity. I haven’t made any new Flash movies since 8th grade, although perhaps that’s for the better. They’re becoming increasingly embarrassing now. I made some comics Freshman and Junior year, but thaose were both for literature projects. I started making a 3D maze the last time I went to Camp CAEN, but that was the summer before last, and I stopped after I ran into an issue with sound under Linux in Zenilib. Writing about it makes me want to try picking it up again, but finding the time to do so will be difficult. It seems I have somewhat inadvertently found ways of being unproductive that are not obviously so, such as browsing Reddit instead of playing TF2. That’s not to say I’m not working hard, which I am.

My Dad’s Rosewill fan failed suddenly by making horrible grinding noises. Although PCI slot fans seem like a good idea, they might be too much trouble to be worth it. I’ll probably stay away from PCI slot fans for the time being.

Because I’ve had so much homework, namely in Precalculus, schoolwork has displaced my life somewhat. Synthetic division is nice because of the very predictable amount of space it takes up, and it’s oddly fun to multiply together factors to get a polynomial with the desired zeros. It’s making the math work to make something, rather than the other way around. It’s also strangely entertaining to factor in my head.

Thanks to this page I was able to figure out an otherwise extremely cryptic error in my crontab. It was in the line for server backups to the alarm upstairs. It’s not offsite, but at least it’s not in the same room. I also got GZIP compression working, with the assistance of these pages. To boil it down, the magic line is ob_start("ob_gzhandler");

I recently downloaded Cavez of Phear and it was fun. However, the lack of save functionality made it frustrating, as I had to continually replay levels after dying. As it is open source, and I had compiled it, (requires libncurses-dev) I decided to crack open the code and give it a go. With the very low number of comments it is somewhat difficult to read. It seems that once it loads in a level file made of of low-level, unprintable ASCII, it replaces special objects with the stone character, and makes entries in another array. I have yet to figure out why it needs another array for this. I’m also currently mystified as to why the save function (I didn’t write it, it works in the editor,) produces complete gibberish even right after I load the map and haven’t moved. It still does this when I undo the replacement of special items. I’ll probably have to rip chunks out of the program until it’s more evident. I really should try gdb. Maybe I should start a Git repo to make all this easier to manage, as although my memory is fuzzy on the matter I think I had parts of this working better before.

Despite my problems figuring this out, it is meaningful for me because although I’ve long known philosophically and logically that open source is far better for innovation and rapid development, I’ve never been able to directly participate in helping that process. (I’ve donated to and reported bugs for Wine, but that’s about it.) Even though it is a very simple contribution, it’s something that with a closed-source product would take emailing the developer or doing some strange dark arts with DLLs. With open source, I am able to open up the code and start to add a new feature. This is amazing.

I got my plate of food together and left it in the kitchen. Asking my sister to guard it against cats, I took my salad and milk out to the table. I returned for my plate, and noticed the empty one intended for Sarah sitting on the counter as Sarah held a full plate. I asked her if the plate was mine. No, she mumbled around the ham.

Matt called me over and asked if I wanted his old machine. He said it had stability problems. I’m now agreeing with that, as when I tried to connect to it just now to check the specs, it was unreachable. What I can remember is Athlon 39(?)00+ 3700+ at 2.4 GHz with 512MB RAM. It seemed stable at first… Maybe I should check the BIOS settings again, as I seem to recall it complaining about failed overclock upon POST.

Sick

My nose is congested and I was sneezing yesterday. I got up around 2am because I was having trouble sleeping. I think taking Psych is messing with me, as I to some degree harbor irrational fears that I exhibit symptoms of whatever mental disorder we covered last. It’s a really interesting class. If I had more time I’d gladly upgrade to AP. The current Psych assignment is annoying to me, as the podcasts we have to describe a study from seem to discuss a phenomenon in broad terms rather than talking about a specific study. I found an interesting article on conditional love.

I read about Steve Roberts, who seems interesting.

School has been overwhelming. I’m taking two APs: AP Computer Science, which teaches Java, and AP English Literature. AP Computer Science is at least currently pretty easy, as it apparently assumes no coding experience, which I find strange for an AP course. I wonder if it might be improved through an entrance exam and skipping the easier stuff, with the intro being instead in the existing Intro to AP Computer Science? As I haven’t coded Java before, although it is very similar in syntax to C++, it might be good that the class starts out lower-level.

One of the things I find about coding is that I seem to be unable, on my own, to think of reasons to program. My current line of thought is that simple games might be boring: they’re simple and will probably be clones of Pong or Tetris or something. When we actually wrote simple games in Advanced C++ Game Development at CAEN in 2008, (I didn’t go back last summer; they took away the dorm option so we didn’t get to spend evenings on our own machines.) it ended up being fun anyway. It could be fun to rewrite my maze game… The next problem I have in this is that I don’t have much free time with my current class load, so I’d have to sacrifice browsing reddit or something. At least it would be more productive, and perhaps more educational. Qualifying many of my statements seems to make my writing more verbose… (See! I did it again!)

AP English is satisfyingly rigorous, and I have by no means been able to complain that we aren’t doing enough. I’m going to a University of Michigan campus visitation over today and Monday, and I’m going to bring Hamlet and attempt to annotate during downtime; Act I Scenes 1-3 are due Tuesday.

I am told Computational Physics is equivalent to an AP, although it doesn’t seem bad at all in contrast to APE or Precalc. Relativity is really interesting, and the equations aren’t bad; it’s the logic I usually get tripped up on. That’s not to say my algebra never utterly fails. I really like Olstad. His website is very impressive. He is very careful about definitions, and on the first day (or so?) we discussed the differences between schooling, training, and education. After listening to our definitions, Olstad defined schooling as what goes on at school, training as specialized refinement of skills, and education as longer-term outlook for learning. He frequently calls schooling “the game,” (which makes Irfan lose often) and not the point of being there; I find this appealing. He also likes semicolons, calling them yield signs. This has influenced my semicolon use in this post. I’m not sure whether I’m overusing them.

Precalc and AP English give the majority of my homework. Precalc assigns homework consistently, even when the Seniors are gone, as I have learned the hard way. Now that I’m aware of that, hopefully I will manage things better. Pline has an evil genius chair, and I have yet to determine why.