Engineering and Minecraft

It’s been a while. I get the feeling that I’m writing to an empty room, which contributes to the lack of content. If this is not the case, please let me know. These are still nice to write sometimes though.

I’ve discovered Minecraft. It’s a sandbox game like no other. The world is a natural landscape generated out of one-meter cubes: hills, mountains, valleys, caves, forests, beaches, deserts, plains, tundra. The fact that’s it’s generated makes it not only different each time, but also incredibly huge: the maximum size of the Minecraft world is limited only by the precision of a 64-bit double. This apparently works out to eight times the surface area of the earth. There’s a lot of exploring to do. However, that’s not all that makes Minecraft different: there’s no goal. There is no objective that the player is pushed to, other than to make their own. I can easily see this being a bad thing for some people, but after playing my fair share of linear games I find it quite refreshing. The player starts out with nothing more than a pair of hands to manipulate the world and works up from there: resources can be gathered to form ever more powerful tools, which can be used to manipulate the world faster. As it’s constructed of blocks, the entire world can be removed block by block, and placed back as seen fit. This allows for the construction of huge castles, tunnels, pits, mines, houses, and highways. There’s a pride in standing inside a shelter built with one’s own virtual hands. I also found Minecraft-Overviewer, which is an application which parses Minecraft maps and renders them into Google Maps tiles so that it can be inspected from above at multiple zoom levels, which sets it apart from single-image renderers such as Cartographer, although Cartographer has many more options. If you’re interested, you can view my world, but I warn that I haven’t built much above ground and it brings the lack of upload bandwidth into sharp focus with its slowness. But it’s there. (EDIT: never mind.) Monsters spawn in the dark: nightfall is terrifying.

In my engineering course I’m part of a small group that elected to automate a small hovercraft instead of relearn programming concepts we’ve already been over multiple times. Instead of learning more coding, we’re focusing on hardware. Our current status is soldering the chips on a board so that we can attach is to the rate table without it flying apart and eventually mount it on the hovercraft. I spent a few hours with gnuplot_i and GNU Scientific Library to make these graphs. I know the value of R^2 is wrong, I’m not quite sure what it is as I’m having trouble with the statistics functions in GSL and have never taken a statistics course. I hope to get it sorted out soon.

Graph of ADC3 calibration

Graph of ADC5 calibration

Graph of ADC6 calibration

What these show is the data we collected for the channels: we fed it known voltages in 0.1v increments and recorded the count given by the ADC, then found a best fit line for each one. They’re similar, but slightly different: I hope the difference isn’t just sampling error. At the very least they all seem to dip down until around 0.4v and float up until around 1v, so we may need to make something more complicated than a straight line to account for that.

Wolverine Soft

It’s not fun when you have to scroll down to see the last link to a required piece of online homework that’s not done. That monotony aside, things are going pretty well. I’ve discovered that Wolverine Soft is great – I hadn’t really realized how much I missed sitting and coding on a game for a day.

College!

The freedom is nice and simultaneously daunting. There’s nothing to stop me from staying up to 1am, but I have to attend class the next day. The workload, at its peaks, is overwhelming. I’ve found that at least currently, when I don’t have to work, even though I am acutely aware that I should, I have trouble focusing.

Published
Categorized as Life

Heading Off to College with The Monolith

It’s official: I’m registered for classes at the University of Michigan and I move into the dorms August 31st. Although I’m excited to learn more, go onto another stage of life, and experience what college has to offer, this summer has been excellent, and if I could repeat it or just sections of it I gladly would. I’m rather scared to move on; I think I will be able to handle the independence, though it will surely take time to get used to it. Most of all, I feel going off to college will mean saying goodbye – the phone just isn’t the same as being in the same room.

My cat died – our guess is either a seizure or a stroke. It was very sudden, and marks my second pet to die unexpectedly and swiftly. I’m glad that at least she didn’t suffer long. In a few hours my knowledge went from “your cat is sick and at the vet” to “your cat is dead.” I was shocked. By this point I’m okay, though.

As a graduation present, I built a $1,500 desktop and upgraded to a widescreen LCD.

Phenom II x 4 @ 3.4GHz

8GB DDR3 RAM

1.5 TB HDD

ATI Radeon HD 5770 1GB GDDR5

It runs incredibly smoothly. The bottleneck is of course the hard drive. I’d have gone for an SSD if they were reasonably priced, but that day has yet to come.

I’m enjoying my internship at IDV. I’ve gotten to look at both the sysadmin and developer side of things. There’s quite a learning curve to coming up to speed with a new codebase, but I got it. Coding requires long bouts of focus, while sysadminning can be more intense, but frequently stopped by waiting for the computer to complete some semiautomated process. I’ve also done more work on Cavez of Phear.

Keep on keepin’ on

My social life is shifting away from these precious tubes of ours in many ways. Being within walking distance of places I would actually want to go really helps. I find it far more fulfilling to talk face-to-face with people, and the Internet, Reddit in particular, seems to just fill that void with funny captioned pictures and the occasional interesting article. I’ve been keeping a journal of sorts and that’s proven enjoyable. The freedom that the summer and my parents give me is fantastic.

I have an internship at IDV and it’s interesting. I am happy to report that when actually coding, such as in C#, much less so in configuration files, programming techniques are generally applicable. It’s nice after floundering around to have little sections of activity where I actually feel like I know what’s going on.

As a graduation present I’m putting together a monster gaming rig. I was very happy to be notified that this would happen. Once I get the parts and snapped together ordered I’ll put together a writeup on the build.  I’m looking forward to it.

Sound Modification and Logic Games

I found a sound tool that’s interesting. I built the SVN version, and while following the Install From Source page I ran into two problems: my ffmpeg wasn’t compiled with –enable-libmp3lame, which apparently resulted in 0-byte output, and I didn’t realize the ‘where ffmpeg’ part of the link was meant for me to fill in, although in retrospect I feel silly. If people are interested in a more in-depth tale I can put together a guide for getting it running under Debian/Ubuntu.

I also discovered via Reddit an interesting logic game called Manufactoria. My sense is that it takes a rather strange type of individual to enjoy it. My complaint is that the music is quiet and the mute button doesn’t actually stop it.

Published
Categorized as Software

Even More Progress

I’ve made big changes to Cavez of Phear!

Because most terminal windows default to 80×24, it now fits in that space. There is no longer a lives system because it was only frustrating and didn’t add anything to the gameplay. A game should not be difficult through starting over again if you make too many mistakes. With the saves and without the lives, it allows for focus on the puzzles. Upon death, the savefile will load if it’s of the same level. I recoded the key bindings to be cleaner, and it now supports multiple keys for a single command. Sortie made very nice tutorial levels.

The editor is much improved and can now place bombs in addition to bomb packs, apply physics to a level, and make changes in rectangles and whole-level fills in addition to single points.  It also is more flexible in opening and saving files. I also fixed the persistent and seemingly vague problem that it sometimes required multiple keypresses to get back to the main menu. It ended up being caused by recursive calls to main_loop(). There’s now yet another while(true) in the main loop that gets break;‘d out of for it to go back to the beginning and load a level or save as needed. I greatly improved the screen dissolve function – it only writes to each position once, and is guaranteed to cover every location in 1840 writes. I fill an array with all possible positions, perform a Fisher-Yates shuffle on it, then iterate over the array, writing spaces. Writing the shuffle algorithm was interesting. The previous one did overwrite – it was pure rand() – and took 10000 writes, which led to horrid performance over SSH, and it wasn’t even guaranteed to clear everything. In general I’ve tried to improve the UI – the reaper on the main menu only comes in from the left on the first run, after which the menu comes up without pause. I’ve cleaned up a lot of code, but there remains is_ready(), which Sortie tells me has something to do with asynchronous file operations, and do_the_monster_dance(), which I’ve been avoiding because it looks messy.

In playtests I’ve had trouble with people getting confused because they don’t read the directions. I’m resisting making big boxes proclaiming what the controls are because I’m assuming players are intelligent, and so far they’ve managed to figure it out. I got embarrassed when I didn’t realize which commits had gone through and made an inaccurate, duplicate commit. I’m worried that I might get caught up in a never-ending parade of new features and not stop long enough to add more levels. I suppose with all the improvements to the editor it’ll be much easier.

Next on the list of feature additions is support for level packs, cleaning up the level code by actually reading the directory instead of relying on a #define, figuring out why the game spontaneously quits on some keypresses and freezes on Ctrl-S, and perhaps reimplementing the menus in light of the knowledge that ncurses has menu functionality.

If you’d like to try it out, either grab PuTTY and ask me for a shell account, or download the source, compile it yourself, (requires ncurses) and have fun!

EDIT: I like to think that my desk’s keyboard platform is falling off because I coded so hard all day and it couldn’t take the greatness. The friggin’ monitor is hot!

Published
Categorized as Coding

Progress

Nine school days until seniors leave! Both my APs are now what amounts to study hours now that testing is over. It’s nice. Comp Physics created some quality quotes yesterday:

“Light pours forth from your rear and keeps you from falling through your chair.” (In reference to photons, the electromagnetic force boson behind most Newtonian forces.)

“We call it the ‘Ultrapurple.'” (Ultraviolet)

I’m working more on Cavez of Phear. The save file format is now one file, the code has been further cleaned up, (Mostly eliminating copy-paste) and I’m working on adding features to the editor. I had some problems with not closing file pointers initially, which caused very strange behavior until I realized what I had forgotten. If anyone wants look at the github repo, it’s here.

Update

The power outage made for a very interesting problem. I had inadvertently broken PHP by turning on compression in php.ini when apparently I wasn’t supposed to. This was back when I was trying to get the WordPress compression working. I didn’t know PHP’s configuration wasn’t working until the server was forced to reboot due to the power outage. The initial problem was that the server was not set to turn back on automatically after power loss, which I had set intentionally fearing damage if it attempted to turn on during a brownout, but perhaps I should enable that ability. Even once it turned on, after a fsck (over 330 or so days of uptime I think) it hanged on setting the clock and needed a hard reboot, which necessitated that I go over to the server physically and reboot it. Before this I set the DNS entries to my dad’s house so that I could display an explanation of what had happened, and I changed my password for my DNS service as it had gone too long without being reset, and subsequently forgot to correct it in the call to the update script. I managed to get the DNS fixed, then I found PHP was broken, then in the course of my attempts to fix that, lighttpd refused to start at all. I was unaware that I could only declare one error.log, so it appeared that it was not giving any error output, but it was writing to the last error log I had declared, and I was checking the wrong one. Thanks to incredible help from the folk in #lighttpd on freenode, it’s working again.

In other events, I set up Skype on my Grandma’s machine, and I hope she finds it useful. I’ve been working on Breakout in AP Comp Sci and physics collision is interesting, but I think if I end up making a game I’ll be using a physics library for sure. MIT didn’t accept me, as I anticipated. I’ll be going to University of Michigan, but I still have work to do and forms to fill out on the way.

New Machines!

My dad’s work got new computers, and instead of throwing them all out, I got two.

Pentium 4 @ 3GHz with HyperThreading

3 GB DDR 533 MHz

160GB HDD

I’m moving my graphics, sound, and Gigabit Ethernet card over to one of them, which is my new desktop. It’s not true dual core, but the clock speed increase alone is enough to warrant a move. I don’t have Windows on it yet, and I intend to get Windows 7 if my dad’s work isn’t able to loan me a CD to reinstall XP. Hopefully this machine will be able to handle Assassin’s Creed without stuttering. I plan to remove my 1.5TB external from its enclosure and mount it internally over SATA. That should fix the horrible latency and throughput issues I’ve had over USB. The other machine I have working as a Freenet node. I’m using full-disk encryption on both machines, and it’s cool. There doesn’t seem to be a drastic hit to performance, as I feared. The only issue is my own fault: I almost forgot the encryption passphrases, and actually forgot the root password on the Debian box. I remembered it, though.

The machines run fairly hot. I now have a mouse-hand heater. That doesn’t seem good. The room is warm, too, and I’m not sure how much of that is due to the sun, and how much is due to the three computers. My network architecture confused me by doing exactly what I told it to do. I set up static DHCP mappings based on MAC address, then DNS entries based on those IPs. This allows me to ping dad.asksteved.com and have it resolve locally to my dad’s machine. It didn’t occur to me as I moved my Gigabit card from my old box to this new one that the IP and DNS entry would follow. It took me a while to realize I was trying to log into myself, which was why the key wasn’t matching. It was pretty funny. The old box is going to work on MilkyWay@Home. My next step is getting the requisite power strips and Ethernet cords to put the two non-desktop machines in the closet. One of them could run the alarm songs in the morning so that I don’t have to keep my desktop on at night.

Homework’s going well. I have a small amount of additional Precalc studying possible, then AP English. Comp Physics is done.

Published
Categorized as Hardware