Monthly Archives: January 2011

Terraforming Finally Done

So I think I’ve finally gotten the terraforming algorithm for Feralor to an acceptable level.  You can have a look and see how far it’s come.

I did complete converting libnoise to PEAR, but it turned out to be incredibly slow, so I actually went a different PECL path: I created a Feralor PECL extension that handles all of the interfacing with libnoise (and eventually other C and C++ libraries too, most likely).  This hybrid method seems to work well: I can do all the fancy C++ object stuff and still return data to PHP in a sensible way.

I still have one area that needs work: presently, I’m using the noiseutils library that comes with libnoise to generate map images, but correlating the apparent elevations from an image generated that way to individual calls to the elevation object’s GetValue function turns out to be a bit difficult (and anyhow, the noiseutils image generation routines don’t deal with saturation data, so the whole world is green rather than having some deserts).  So, I’ll be re-writing that part of the library this weekend hopefully – but that should be absolute cake compared to everything else that’s happened so far.

Yay progress!

Porting libnoise to PEAR

I was trying to port libnoise to be a PECL extension, but it turns out that’s a lot harder than it sounds.  So, I decided to port libnoise to a PEAR extension for now, and perhaps take another look at the PECL library later on.

The difference is that PEAR extensions operate as interpreted PHP code, whereas PECL extensions operate as native C or C++ code, which gives you a considerable performance boost in many cases, especially if your extension is very CPU-bound.

The reason I decided to switch for now is that I can’t hold up Feralor for weeks or months more to finish the port to PECL, which was proving to be quite a challenge.  I’m not really much of a C or C++ programmer (although I have learned quite a bit about both in recent months) and I figure that if I can get the extension to work properly as a PEAR extension, which should be much easier, then I can get Feralor off the ground and come back to the PECL extension when time allows (or perhaps hire someone else to do that port for me).  In the end, switching from the PEAR extension to a PECL extension should be mostly transparent to the rest of the code; the only difference should be a marked increase in performance.

My best guess is that I’ll have the PEAR extension ready to go either late this week or sometime next week, and then I can move on to more fun parts of the game.

I really feel like this part of the project is dragging on for too long and I’d like to get the game to a point where people can reliably log in and start interacting with the virtual world.  Getting to that point is more important than absolute efficiency right now.

A Suggestion to Hardware Manufacturers

Dear Hardware Manufacturers,

Please make a motherboard (and also PCIe adapters) with 16 SATA ports and no RAID controller.  I want to use ZFS’s internal RAID system and not your hardware solution.  I don’t want to have to fiddle with your cumbersome RAID solution to take each of my 16 disks and make 16 individual “volumes” before using those volumes to create a ZFS pool.  I just want access to each of the 16 disks independently, without another layer of abstraction between them and my operating system.

Thanks.

Feralor Updates

So, tonight I got to spend a few hours working on the Feralor map generation software, and it’s coming right along:

http://feralor.com/feralor/map

This terrain is completely procedurally generated using libnoise and a custom PHP module that I’ve written.  I am still playing around with the terrain parameters – I’d like to continents to be a bit bigger and I’d like there to be a bit more separation between them – but it’s coming right along.  Using libnoise is so much faster than the Perlin library that I created from scratch, and it has so many more features.  I’m really glad I found it.

365 Days Without a Cell Phone

Well, it’s been exactly a year now that I haven’t had a cell phone.  Last year, my Blackberry got a little wet and stopped working properly, and I decided that I just didn’t want to deal with the trouble and expense of getting it repaired.  So, I transferred my cell phone number to a VOIP phone.

Since that time, I really have not felt any loss for not having a cell phone.  There have been a handful of time that I went out to do some errands and Ruth wasn’t able to get hold of me, but for the most part is hasn’t been any sort of a problem.  On the weekends, if I’m going to do some errands and Ruth isn’t coming along, I usually take her cell phone in case she wants to call me to ask me to pick up something that we didn’t add to the list.

So, I’m heading now into year two without a cell phone and I suspect that I still won’t have a cell phone this time next year.  The savings are significant: about $50/month for a phone plan.  That’s $600 per year!

In addition to that, I really enjoy getting back some privacy and the ability to disconnect and make myself unavailable whenever I want to have a weekend off.  I’ve often been upset by people who take offense when you don’t answer their calls – as if it’s OK for anyone to interrupt me whenever they choose, regardless of what I might be doing.  Now that I don’t have a cell phone, people aren’t so offended when they can’t get hold of me.