🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Shhhh! Be vewy, vewy qwiet. I'm hunting bugs...

Published January 17, 2005
Advertisement
Squashed a few bugs in Accidental, and made some small changes to the way things are done. I've decided to eliminate the ability for scripts to change the map dimensions, and instead locked the dimensions at 257x257 tiles (or whatever values are specified in the configuration file). I was running into some strange problems sometimes, trying to reallocate the buffers to increase in size, and it was just all in all a pain. Especially since I rarely changed sizes anyway. 257x257 gives you a nice, hefty chunk of level and plenty of room to do just about anything with, so it'll be fine. It's simple enough to edit Config.txt to change the map dimensions anyway, and I avoid the reallocation mess that can occasionally crop up due to memory fragmentation and such.

I'm currently working on scripts for a cave generation technique that combines meta-balls (or, rather, meta-circles) and accretion fractals to 'grow' a cavern complex. I seed the level with an initial circle, then proceed to attach or grow additional random circles outward. I'm still hammering out the best method for performing the accretion; currently, I spawn a random circle somewhere out in the void and move it along a line toward some existing random point in the fractal until it collides with a portion of the fractal. Once I've accreted a sufficient number of circles, I generate fields (meta-circles; 2D versions of the meta-blobs, or blobby objects, that are so fun to play with in 3D) and trace the outline of the fields at a given threshold to generate the cave. It's a little hackish, but it gives me decent results. (Incidentally, this is a pretty decent method to use in 3D with meta-spheres. It can grow some pretty interesting 3D cave complexes.)

I'm also refining my random path code. I've build a sub-division poly-line generator that can create a 'squiggly' path between two points, useful for generating slightly random, meandering paths through a level, paths that must connect two specific points but which must also have a degree of randomness to eliminate the unnatural straight lines. I'll probably end up compiling a lot of this stuff into a core library that map scripts can call upon. (This stuff will come in very handy when I settle on an engine and finally try to finish a game.)
Previous Entry Finally.
Next Entry Accretion fractals
0 likes 1 comments

Comments

LRiotto
Hey Josh, do you sleep? Just curious. The amount of code you generate leads me to think you crash at night with your keyboard in your hands. 8>)

BTW, can't wait to see how your cavern stuff comes out.
January 18, 2005 12:07 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement